Gio.TlsPassword¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(flags, description) | 
| get_description() | |
| get_flags() | |
| get_value(length) | |
| get_warning() | |
| set_description(description) | |
| set_flags(flags) | |
| set_value(value) | |
| set_value_full(value, destroy) | |
| set_warning(warning) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
| do_get_default_warning() | |
| do_get_value(length) | |
| do_set_value(value, destroy) | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| description | str | r/w | Description of what the password is for | 
| flags | Gio.TlsPasswordFlags | r/w | Flags about the password | 
| warning | str | r/w | Warning about the password | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Gio.TlsPassword(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - Gio.TlsPasswordClass- Holds a password used in TLS. - New in version 2.30. - 
classmethod new(flags, description)[source]¶
- Parameters: - flags (Gio.TlsPasswordFlags) – the password flags
- description (str) – description of what the password is for
 - Returns: - The newly allocated password object - Return type: - Create a new - Gio.TlsPasswordobject.
- flags (
 - 
get_description()[source]¶
- Returns: - The description of the password. - Return type: - str- Get a description string about what the password will be used for. - New in version 2.30. 
 - 
get_flags()[source]¶
- Returns: - The flags about the password. - Return type: - Gio.TlsPasswordFlags- Get flags about the password. - New in version 2.30. 
 - 
get_value(length)[source]¶
- Parameters: - length ( - intor- None) – location to place the length of the password.- Returns: - The password value (owned by the password object). - Return type: - int- Get the password value. If length is not - Nonethen it will be filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only pass- Nonefor length in contexts where you know the password will have a certain fixed length.)- New in version 2.30. 
 - 
get_warning()[source]¶
- Returns: - The warning. - Return type: - str- Get a user readable translated warning. Usually this warning is a representation of the password flags returned from - Gio.TlsPassword.get_flags().- New in version 2.30. 
 - 
set_description(description)[source]¶
- Parameters: - description ( - str) – The description of the password- Set a description string about what the password will be used for. - New in version 2.30. 
 - 
set_flags(flags)[source]¶
- Parameters: - flags ( - Gio.TlsPasswordFlags) – The flags about the password- Set flags about the password. - New in version 2.30. 
 - 
set_value(value)[source]¶
- Parameters: - value ( - bytes) – the new password value- Set the value for this password. The value will be copied by the password object. - Specify the length, for a non-nul-terminated password. Pass -1 as length if using a nul-terminated password, and length will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.) - New in version 2.30. 
 - 
set_value_full(value, destroy)[source]¶
- Parameters: - value (bytes) – the value for the password
- destroy (GLib.DestroyNotifyorNone) – a function to use to free the password.
 - Provide the value for this password. - The value will be owned by the password object, and later freed using the destroy function callback. - Specify the length, for a non-nul-terminated password. Pass -1 as length if using a nul-terminated password, and length will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.) - New in version 2.30. 
- value (
 - 
set_warning(warning)[source]¶
- Parameters: - warning ( - str) – The user readable warning- Set a user readable translated warning. Usually this warning is a representation of the password flags returned from - Gio.TlsPassword.get_flags().- New in version 2.30. 
 - 
do_get_value(length) virtual¶
- Parameters: - length ( - intor- None) – location to place the length of the password.- Returns: - The password value (owned by the password object). - Return type: - int- Get the password value. If length is not - Nonethen it will be filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only pass- Nonefor length in contexts where you know the password will have a certain fixed length.)- New in version 2.30. 
 - 
do_set_value(value, destroy) virtual¶
- Parameters: - value (bytes) – the value for the password
- destroy (GLib.DestroyNotifyorNone) – a function to use to free the password.
 - Provide the value for this password. - The value will be owned by the password object, and later freed using the destroy function callback. - Specify the length, for a non-nul-terminated password. Pass -1 as length if using a nul-terminated password, and length will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.) - New in version 2.30. 
- value (
 
- 
classmethod 
Property Details¶
- 
Gio.TlsPassword.props.description¶
- Name: - description- Type: - str- Default Value: - None- Flags: - READABLE,- WRITABLE- Description of what the password is for 
- 
Gio.TlsPassword.props.flags¶
- Name: - flags- Type: - Gio.TlsPasswordFlags- Default Value: - Gio.TlsPasswordFlags.NONE- Flags: - READABLE,- WRITABLE- Flags about the password