secret.item

Module for [Item] class

Types 3

A secret item

#SecretItem represents a secret item stored in the Secret Service.

Each item has a value, represented by a struct@Value, which can be retrieved by [secret.item.Item.getSecret] or set by [secret.item.Item.setSecret]. The item is only available when the item is not locked.

Items can be locked or unlocked using the [secret.service.Service.lock] or [secret.service.Service.unlock] functions. The Secret Service may not be able to unlock individual items, and may unlock an entire collection when a single item is unlocked.

Each item has a set of attributes, which are used to locate the item later. These are not stored or transferred in a secure manner. Each attribute has a string name and a string value. Use [secret.service.Service.search] to search for items based on their attributes, and [secret.item.Item.setAttributes] to change the attributes associated with an item.

Items can be created with [secret.item.Item.create] or [secret.service.Service.store].

Methods
GType _gType() @property
Item self()Returns `this`, for use in `with` statements.
ItemGidBuilder builder()Get builder for [secret.item.Item] Returns: New builder object
secret.types.ItemFlags flags() @propertyGet `flags` property. Returns: A set of flags describing which parts of the secret item have been initialized.
bool locked() @propertyGet `locked` property. Returns: Whether the item is locked or not.
secret.service.Service service() @propertyGet `service` property. Returns: The `class@Service` object that this item is associated with and uses to interact with the actual D-Bus Secret Service.
void create(secret.collection.Collection collection, secret.schema.Schema schema, string[string] attributes, string label, secret.value.Value value, secret.types.ItemCreateFlags flags, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Create a new item in the secret service.
secret.item.Item createFinish(gio.async_result.AsyncResult result)Finish operation to create a new item in the secret service.
secret.item.Item createSync(secret.collection.Collection collection, secret.schema.Schema schema, string[string] attributes, string label, secret.value.Value value, secret.types.ItemCreateFlags flags, gio.cancellable.Cancellable cancellable = null)Create a new item in the secret service.
void loadSecrets(secret.item.Item[] items, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Load the secret values for a secret item stored in the service.
bool loadSecretsFinish(gio.async_result.AsyncResult result)Complete asynchronous operation to load the secret values for secret items stored in the service.
bool loadSecretsSync(secret.item.Item[] items, gio.cancellable.Cancellable cancellable = null)Load the secret values for a secret item stored in the service.
void delete_(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Delete this item.
bool deleteFinish(gio.async_result.AsyncResult result)Complete asynchronous operation to delete the secret item.
bool deleteSync(gio.cancellable.Cancellable cancellable = null)Delete this secret item.
string[string] getAttributes()Set the attributes of this item.
ulong getCreated()Get the created date and time of the item.
secret.types.ItemFlags getFlags()Get the flags representing what features of the #SecretItem proxy have been initialized.
string getLabel()Get the label of this item. Returns: the label, which should be freed with `funcGLib.free`
bool getLocked()Get whether the item is locked or not.
ulong getModified()Get the modified date and time of the item.
string getSchemaName()Gets the name of the schema that this item was stored with. This is also available at the `xdg:schema` attribute. Returns: the schema name
secret.value.Value getSecret()Get the secret value of this item.
secret.service.Service getService()Get the Secret Service object that this item was created with. Returns: the Secret Service object
void loadSecret(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Load the secret value of this item.
bool loadSecretFinish(gio.async_result.AsyncResult result)Complete asynchronous operation to load the secret value of this item.
bool loadSecretSync(gio.cancellable.Cancellable cancellable = null)Load the secret value of this item.
void refresh()Refresh the properties on this item.
void setAttributes(secret.schema.Schema schema, string[string] attributes, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Set the attributes of this item.
bool setAttributesFinish(gio.async_result.AsyncResult result)Complete operation to set the attributes of this item.
bool setAttributesSync(secret.schema.Schema schema, string[string] attributes, gio.cancellable.Cancellable cancellable = null)Set the attributes of this item.
void setLabel(string label, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Set the label of this item.
bool setLabelFinish(gio.async_result.AsyncResult result)Complete asynchronous operation to set the label of this collection.
bool setLabelSync(string label, gio.cancellable.Cancellable cancellable = null)Set the label of this item.
void setSecret(secret.value.Value value, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Set the secret value of this item.
bool setSecretFinish(gio.async_result.AsyncResult result)Complete asynchronous operation to set the secret value of this item.
bool setSecretSync(secret.value.Value value, gio.cancellable.Cancellable cancellable = null)Set the secret value of this item.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
T flags(secret.types.ItemFlags propval)Set `flags` property. Params: propval = A set of flags describing which parts of the secret item have been initialized. Returns: Builder instance for fluent chaining
T service(secret.service.Service propval)Set `service` property. Params: propval = The `class@Service` object that this item is associated with and uses to interact with the actual D-Bus Secret Service. Returns: Builder instance for fluen...

Fluent builder for [secret.item.Item]

Methods