Top | ![]() |
![]() |
![]() |
![]() |
GHashTable * | secret_retrievable_get_attributes () |
guint64 | secret_retrievable_get_created () |
gchar * | secret_retrievable_get_label () |
guint64 | secret_retrievable_get_modified () |
void | secret_retrievable_retrieve_secret () |
SecretValue * | secret_retrievable_retrieve_secret_finish () |
SecretValue * | secret_retrievable_retrieve_secret_sync () |
GHashTable * | attributes | Read / Write |
guint64 | created | Read / Write |
gchar * | label | Read / Write |
guint64 | modified | Read / Write |
#define | SECRET_TYPE_RETRIEVABLE |
SecretRetrievable | |
struct | SecretRetrievableInterface |
SecretRetrievable provides a read-only view of a secret item stored in the Secret Service.
Each item has a value, represented by a SecretValue, which can be
retrieved by secret_retrievable_retrieve_secret()
and
secret_retrievable_retrieve_secret_finish()
.
GHashTable *
secret_retrievable_get_attributes (SecretRetrievable *self
);
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.
a new reference
to the attributes, which should not be modified, and
released with g_hash_table_unref()
.
[transfer full][element-type utf8 utf8]
Since: 0.19.0
guint64
secret_retrievable_get_created (SecretRetrievable *self
);
Get the created date and time of the object. The return value is the number of seconds since the unix epoch, January 1st 1970.
Since: 0.19.0
gchar *
secret_retrievable_get_label (SecretRetrievable *self
);
Get the label of this item.
Since: 0.19.0
guint64
secret_retrievable_get_modified (SecretRetrievable *self
);
Get the modified date and time of the object. The return value is the number of seconds since the unix epoch, January 1st 1970.
Since: 0.19.0
void secret_retrievable_retrieve_secret (SecretRetrievable *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
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.
self |
a retrievable object |
|
cancellable |
optional cancellation object. |
[nullable] |
callback |
called when the operation completes |
|
user_data |
data to pass to the callback |
Since: 0.19.0
SecretValue * secret_retrievable_retrieve_secret_finish (SecretRetrievable *self
,GAsyncResult *result
,GError **error
);
Complete asynchronous operation to retrieve the secret value of this object.
self |
a retrievable object |
|
result |
asynchronous result passed to callback |
|
error |
location to place error on failure |
the secret value which should be
released with secret_value_unref()
, or NULL
.
[transfer full][nullable]
Since: 0.19.0
SecretValue * secret_retrievable_retrieve_secret_sync (SecretRetrievable *self
,GCancellable *cancellable
,GError **error
);
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.
self |
a retrievable object |
|
cancellable |
optional cancellation object. |
[nullable] |
error |
location to place error on failure |
the secret value which should be
released with secret_value_unref()
, or NULL
.
[transfer full][nullable]
Since: 0.19.0
typedef struct _SecretRetrievable SecretRetrievable;
An object representing a read-only view of a secret item in the Secret Service.
Since: 0.19.0
struct SecretRetrievableInterface { GTypeInterface parent_iface; void (*retrieve_secret) (SecretRetrievable *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); SecretValue *(*retrieve_secret_finish) (SecretRetrievable *self, GAsyncResult *result, GError **error); };
The interface for SecretRetrievable.
the parent interface |
||
implementation of |
||
implementation of
|
Since: 0.19.0
“attributes”
property “attributes” GHashTable *
The attributes set on this item. Attributes are used to locate an item. They are not guaranteed to be stored or transferred securely.
[transfer full]
Owner: SecretRetrievable
Flags: Read / Write
Since: 0.19.0
“created”
property “created” guint64
The date and time (in seconds since the UNIX epoch) that this item was created.
Owner: SecretRetrievable
Flags: Read / Write
Default value: 0
Since: 0.19.0
“label”
property “label” gchar *
The human readable label for the item.
Owner: SecretRetrievable
Flags: Read / Write
Default value: NULL
Since: 0.19.0