Secret.Retrievable

g GObject.GInterface GObject.GInterface Secret.Retrievable Secret.Retrievable GObject.GInterface->Secret.Retrievable

Implementations:

Secret.Item

Methods

get_attributes ()

get_created ()

get_label ()

get_modified ()

retrieve_secret (cancellable, callback, *user_data)

retrieve_secret_finish (result)

retrieve_secret_sync (cancellable)

Virtual Methods

do_retrieve_secret (cancellable, callback, *user_data)

do_retrieve_secret_finish (result)

Properties

Name

Type

Flags

Short Description

attributes

GLib.HashTable

r/w

Item attributes

created

int

r/w

Item creation date

label

str

r/w

Item label

modified

int

r/w

Item modified date

Signals

None

Fields

None

Class Details

class Secret.Retrievable
Bases:

GObject.GInterface

Structure:

Secret.RetrievableInterface

A read-only view of a secret item in the Secret Service.

Secret.Retrievable provides a read-only view of a secret item stored in the Secret Service.

Each item has a value, represented by a [struct`Value`], which can be retrieved by [method`Retrievable`.retrieve_secret] and [method`Retrievable`.retrieve_secret_finish].

New in version 0.19.0.

get_attributes()
Returns:

a new reference to the attributes, which should not be modified, and released with [func`GLib`.HashTable.unref]

Return type:

{str: str}

Get the attributes of this object.

The attributes are a mapping of string keys to string values. Attributes are used to search for items. Attributes are not stored or transferred securely by the secret service.

Do not modify the attribute returned by this method.

New in version 0.19.0.

get_created()
Returns:

the created date and time

Return type:

int

Get the created date and time of the object.

The return value is the number of seconds since the unix epoch, January 1st 1970.

New in version 0.19.0.

get_label()
Returns:

the label, which should be freed with [func`GLib`.free]

Return type:

str

Get the label of this item.

New in version 0.19.0.

get_modified()
Returns:

the modified date and time

Return type:

int

Get the modified date and time of the object.

The return value is the number of seconds since the unix epoch, January 1st 1970.

New in version 0.19.0.

retrieve_secret(cancellable, callback, *user_data)
Parameters:

Retrieve the secret value of this object.

Each retrievable object has a single secret which might be a password or some other secret binary value.

This function returns immediately and completes asynchronously.

New in version 0.19.0.

retrieve_secret_finish(result)
Parameters:

result (Gio.AsyncResult) – asynchronous result passed to callback

Raises:

GLib.Error

Returns:

the secret value which should be released with [method`Value`.unref], or None

Return type:

Secret.Value or None

Complete asynchronous operation to retrieve the secret value of this object.

New in version 0.19.0.

retrieve_secret_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – optional cancellation object

Raises:

GLib.Error

Returns:

the secret value which should be released with [method`Value`.unref], or None

Return type:

Secret.Value or None

Retrieve the secret value of this object synchronously.

Each retrievable object has a single secret which might be a password or some other secret binary value.

This method may block indefinitely and should not be used in user interface threads.

New in version 0.19.0.

do_retrieve_secret(cancellable, callback, *user_data) virtual
Parameters:

Retrieve the secret value of this object.

Each retrievable object has a single secret which might be a password or some other secret binary value.

This function returns immediately and completes asynchronously.

New in version 0.19.0.

do_retrieve_secret_finish(result) virtual
Parameters:

result (Gio.AsyncResult) – asynchronous result passed to callback

Returns:

the secret value which should be released with [method`Value`.unref], or None

Return type:

Secret.Value or None

Complete asynchronous operation to retrieve the secret value of this object.

New in version 0.19.0.

Property Details

Secret.Retrievable.props.attributes
Name:

attributes

Type:

GLib.HashTable

Default Value:

None

Flags:

READABLE, WRITABLE

The attributes set on this item.

Attributes are used to locate an item. They are not guaranteed to be stored or transferred securely.

New in version 0.19.0.

Secret.Retrievable.props.created
Name:

created

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The date and time (in seconds since the UNIX epoch) that this item was created.

New in version 0.19.0.

Secret.Retrievable.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The human readable label for the item.

New in version 0.19.0.

Secret.Retrievable.props.modified
Name:

modified

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The date and time (in seconds since the UNIX epoch) that this item was last modified.

New in version 0.19.0.