secret.retrievable_mixin

Module for [Retrievable] interface mixin

Templates 2

tmplRetrievableT()

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

#SecretRetrievable 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 [secret.retrievable.Retrievable.retrieveSecret] and [secret.retrievable.Retrievable.retrieveSecretFinish].

Functions
ulong created()

Get created property.

Returns

The date and time (in seconds since the UNIX epoch) that this

item was created.

void created(ulong propval)

Set created property.

Parameters

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

Get label property.

Returns

The human readable label for the item.
void label(string propval)

Set label property.

Parameters

propvalThe human readable label for the item.
ulong modified()

Get modified property.

Returns

The date and time (in seconds since the UNIX epoch) that this

item was last modified.

void modified(ulong propval)

Set modified property.

Parameters

propvalThe date and time (in seconds since the UNIX epoch) that this item was last modified.
string[string] getAttributes()

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.

Returns

a new reference

to the attributes, which should not be modified, and released with [glib.hash_table.HashTable.unref]

ulong getCreated()

Get the created date and time of the object.

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

    string getLabel()

    Get the label of this item.

    Returns

    the label, which should be freed with funcGLib.free
    ulong getModified()

    Get the modified date and time of the object.

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

      void retrieveSecret(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)

      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.

      Parameters

      cancellableoptional cancellation object
      callbackcalled when the operation completes

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

      Parameters

      resultasynchronous result passed to callback

      Returns

      the secret value which should be

      released with [secret.value.Value.unref], or null

      Throws

      [ErrorWrap]
      secret.value.Value retrieveSecretSync(gio.cancellable.Cancellable cancellable = null)

      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.

      Parameters

      cancellableoptional cancellation object

      Returns

      the secret value which should be

      released with [secret.value.Value.unref], or null

      Throws

      [ErrorWrap]
      tmplRetrievableGidBuilderT()
      Functions
      T created(ulong propval)

      Set created property.

      Parameters

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

      Returns

      Builder instance for fluent chaining
      T label(string propval)

      Set label property.

      Parameters

      propvalThe human readable label for the item.

      Returns

      Builder instance for fluent chaining
      T modified(ulong propval)

      Set modified property.

      Parameters

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

      Returns

      Builder instance for fluent chaining