Gio.TlsPassword - Classes - Gio 2.0 (original) (raw)
g GObject.Object GObject.Object Gio.TlsPassword Gio.TlsPassword GObject.Object->Gio.TlsPassword
Subclasses:
None
Methods¶
Inherited:
Structs:
class | new (flags, description) |
---|---|
get_description () | |
get_flags () | |
get_value () | |
get_warning () | |
set_description (description) | |
set_flags (flags) | |
set_value (value) | |
set_value_full (value, destroy) | |
set_warning (warning) |
Virtual Methods¶
Inherited:
do_get_default_warning () |
---|
do_get_value () |
do_set_value (value, destroy) |
Properties¶
Name | Type | Flags | Short Description |
---|---|---|---|
description | str | r/w | |
flags | Gio.TlsPasswordFlags | r/w | |
warning | str | r/w |
Signals¶
Inherited:
Fields¶
Inherited:
Name | Type | Access | Description |
---|---|---|---|
parent_instance | GObject.Object | r |
Class Details¶
class Gio.TlsPassword(**kwargs)¶
Bases:
Abstract:
No
Structure:
An abstract interface representing a password used in TLS. Often used in user interaction such as unlocking a key storage token.
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.TlsPassword object.
Returns:
The description of the password.
Return type:
Get a description string about what the password will be used for.
New in version 2.30.
Returns:
The flags about the password.
Return type:
Get flags about the password.
New in version 2.30.
Returns:
The password value (owned by the password object).
Return type:
Get the password value. If length is not None then 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.
Returns:
The warning.
Return type:
Get a user readable translated warning. Usually this warning is a representation of the password flags returned fromGio.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.
Parameters:
flags (Gio.TlsPasswordFlags) – The flags about the password
Set flags about the password.
New in version 2.30.
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 aslength 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.DestroyNotify or None) – 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 aslength 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.
Parameters:
warning (str) – The user readable warning
Set a user readable translated warning. Usually this warning is a representation of the password flags returned fromGio.TlsPassword.get_flags().
New in version 2.30.
do_get_default_warning() virtual¶
Return type:
virtual method for Gio.TlsPassword.get_warning() if no value has been set using Gio.TlsPassword.set_warning()
do_get_value() virtual¶
Returns:
The password value (owned by the password object).
Return type:
Get the password value. If length is not None then 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.DestroyNotify or None) – 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 aslength 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.
Property Details¶
Gio.TlsPassword.props.description¶
Name:
description
Type:
Default Value:
Flags:
Description of what the password is for.
New in version 2.30.
Gio.TlsPassword.props.flags¶
Name:
flags
Type:
Default Value:
Flags:
Flags about the password.
New in version 2.30.
Gio.TlsPassword.props.warning¶
Name:
warning
Type:
Default Value:
Flags:
Warning about the password.
New in version 2.30.