Item

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.

class Item : DBusProxy , Retrievable {}

Members

Functions

deleteFinish
bool deleteFinish(gio.async_result.AsyncResult result)

Complete asynchronous operation to delete the secret item.

deleteSync
bool deleteSync(gio.cancellable.Cancellable cancellable)

Delete this secret item.

delete_
void delete_(gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Delete this item.

getAttributes
string[string] getAttributes()

Set the attributes of this item.

getCreated
ulong getCreated()

Get the created date and time of the item.

getFlags
secret.types.ItemFlags getFlags()

Get the flags representing what features of the #SecretItem proxy have been initialized.

getLabel
string getLabel()

Get the label of this item.

getLocked
bool getLocked()

Get whether the item is locked or not.

getModified
ulong getModified()

Get the modified date and time of the item.

getSchemaName
string getSchemaName()

Gets the name of the schema that this item was stored with. This is also available at the xdg:schema attribute.

getSecret
secret.value.Value getSecret()

Get the secret value of this item.

getService
secret.service.Service getService()

Get the Secret Service object that this item was created with.

loadSecret
void loadSecret(gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Load the secret value of this item.

loadSecretFinish
bool loadSecretFinish(gio.async_result.AsyncResult result)

Complete asynchronous operation to load the secret value of this item.

loadSecretSync
bool loadSecretSync(gio.cancellable.Cancellable cancellable)

Load the secret value of this item.

refresh
void refresh()

Refresh the properties on this item.

setAttributes
void setAttributes(secret.schema.Schema schema, string[string] attributes, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Set the attributes of this item.

setAttributesFinish
bool setAttributesFinish(gio.async_result.AsyncResult result)

Complete operation to set the attributes of this item.

setAttributesSync
bool setAttributesSync(secret.schema.Schema schema, string[string] attributes, gio.cancellable.Cancellable cancellable)

Set the attributes of this item.

setLabel
void setLabel(string label, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Set the label of this item.

setLabelFinish
bool setLabelFinish(gio.async_result.AsyncResult result)

Complete asynchronous operation to set the label of this collection.

setLabelSync
bool setLabelSync(string label, gio.cancellable.Cancellable cancellable)

Set the label of this item.

setSecret
void setSecret(secret.value.Value value, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Set the secret value of this item.

setSecretFinish
bool setSecretFinish(gio.async_result.AsyncResult result)

Complete asynchronous operation to set the secret value of this item.

setSecretSync
bool setSecretSync(secret.value.Value value, gio.cancellable.Cancellable cancellable)

Set the secret value of this item.

Static functions

create
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, gio.types.AsyncReadyCallback callback)

Create a new item in the secret service.

createFinish
secret.item.Item createFinish(gio.async_result.AsyncResult result)

Finish operation to create a new item in the secret service.

createSync
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)

Create a new item in the secret service.

loadSecrets
void loadSecrets(secret.item.Item[] items, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Load the secret values for a secret item stored in the service.

loadSecretsFinish
bool loadSecretsFinish(gio.async_result.AsyncResult result)

Complete asynchronous operation to load the secret values for secret items stored in the service.

loadSecretsSync
bool loadSecretsSync(secret.item.Item[] items, gio.cancellable.Cancellable cancellable)

Load the secret values for a secret item stored in the service.

Mixed In Members

From mixin RetrievableT!()

getAttributes
string[string] getAttributes()

Get the attributes of this object.

getCreated
ulong getCreated()

Get the created date and time of the object.

getLabel
string getLabel()

Get the label of this item.

getModified
ulong getModified()

Get the modified date and time of the object.

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

Retrieve the secret value of this object.

retrieveSecretFinish
secret.value.Value retrieveSecretFinish(gio.async_result.AsyncResult result)

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

retrieveSecretSync
secret.value.Value retrieveSecretSync(gio.cancellable.Cancellable cancellable)

Retrieve the secret value of this object synchronously.

Inherited Members

From DBusProxy

newFinish
gio.dbus_proxy.DBusProxy newFinish(gio.async_result.AsyncResult res)

Finishes creating a #GDBusProxy.

newForBusFinish
gio.dbus_proxy.DBusProxy newForBusFinish(gio.async_result.AsyncResult res)

Finishes creating a #GDBusProxy.

newForBusSync
gio.dbus_proxy.DBusProxy newForBusSync(gio.types.BusType busType, gio.types.DBusProxyFlags flags, gio.dbus_interface_info.DBusInterfaceInfo info, string name, string objectPath, string interfaceName, gio.cancellable.Cancellable cancellable)

Like gio.dbus_proxy.DBusProxy.newSync but takes a #GBusType instead of a #GDBusConnection.

newSync
gio.dbus_proxy.DBusProxy newSync(gio.dbus_connection.DBusConnection connection, gio.types.DBusProxyFlags flags, gio.dbus_interface_info.DBusInterfaceInfo info, string name, string objectPath, string interfaceName, gio.cancellable.Cancellable cancellable)

Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and synchronously loads D-Bus properties unless the gio.types.DBusProxyFlags.DoNotLoadProperties flag is used.

new_
void new_(gio.dbus_connection.DBusConnection connection, gio.types.DBusProxyFlags flags, gio.dbus_interface_info.DBusInterfaceInfo info, string name, string objectPath, string interfaceName, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and asynchronously loads D-Bus properties unless the gio.types.DBusProxyFlags.DoNotLoadProperties flag is used. Connect to the #GDBusProxy::g-properties-changed signal to get notified about property changes.

newForBus
void newForBus(gio.types.BusType busType, gio.types.DBusProxyFlags flags, gio.dbus_interface_info.DBusInterfaceInfo info, string name, string objectPath, string interfaceName, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Like gio.dbus_proxy.DBusProxy.new_ but takes a #GBusType instead of a #GDBusConnection.

call
void call(string methodName, glib.variant.VariantG parameters, gio.types.DBusCallFlags flags, int timeoutMsec, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously invokes the method_name method on proxy.

callFinish
glib.variant.VariantG callFinish(gio.async_result.AsyncResult res)

Finishes an operation started with gio.dbus_proxy.DBusProxy.call.

callSync
glib.variant.VariantG callSync(string methodName, glib.variant.VariantG parameters, gio.types.DBusCallFlags flags, int timeoutMsec, gio.cancellable.Cancellable cancellable)

Synchronously invokes the method_name method on proxy.

callWithUnixFdList
void callWithUnixFdList(string methodName, glib.variant.VariantG parameters, gio.types.DBusCallFlags flags, int timeoutMsec, gio.unix_fdlist.UnixFDList fdList, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Like gio.dbus_proxy.DBusProxy.call but also takes a #GUnixFDList object.

callWithUnixFdListFinish
glib.variant.VariantG callWithUnixFdListFinish(gio.unix_fdlist.UnixFDList outFdList, gio.async_result.AsyncResult res)

Finishes an operation started with gio.dbus_proxy.DBusProxy.callWithUnixFdList.

callWithUnixFdListSync
glib.variant.VariantG callWithUnixFdListSync(string methodName, glib.variant.VariantG parameters, gio.types.DBusCallFlags flags, int timeoutMsec, gio.unix_fdlist.UnixFDList fdList, gio.unix_fdlist.UnixFDList outFdList, gio.cancellable.Cancellable cancellable)

Like gio.dbus_proxy.DBusProxy.callSync but also takes and returns #GUnixFDList objects.

getCachedProperty
glib.variant.VariantG getCachedProperty(string propertyName)

Looks up the value for a property from the cache. This call does no blocking IO.

getCachedPropertyNames
string[] getCachedPropertyNames()

Gets the names of all cached properties on proxy.

getConnection
gio.dbus_connection.DBusConnection getConnection()

Gets the connection proxy is for.

getDefaultTimeout
int getDefaultTimeout()

Gets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the gio.dbus_proxy.DBusProxy.call and gio.dbus_proxy.DBusProxy.callSync functions.

getFlags
gio.types.DBusProxyFlags getFlags()

Gets the flags that proxy was constructed with.

getInterfaceInfo
gio.dbus_interface_info.DBusInterfaceInfo getInterfaceInfo()

Returns the #GDBusInterfaceInfo, if any, specifying the interface that proxy conforms to. See the #GDBusProxy:g-interface-info property for more details.

getInterfaceName
string getInterfaceName()

Gets the D-Bus interface name proxy is for.

getName
string getName()

Gets the name that proxy was constructed for.

getNameOwner
string getNameOwner()

The unique name that owns the name that proxy is for or null if no-one currently owns that name. You may connect to the #GObject::notify signal to track changes to the #GDBusProxy:g-name-owner property.

getObjectPath
string getObjectPath()

Gets the object path proxy is for.

setCachedProperty
void setCachedProperty(string propertyName, glib.variant.VariantG value)

If value is not null, sets the cached value for the property with name property_name to the value in value.

setDefaultTimeout
void setDefaultTimeout(int timeoutMsec)

Sets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the gio.dbus_proxy.DBusProxy.call and gio.dbus_proxy.DBusProxy.callSync functions.

setInterfaceInfo
void setInterfaceInfo(gio.dbus_interface_info.DBusInterfaceInfo info)

Ensure that interactions with proxy conform to the given interface. See the #GDBusProxy:g-interface-info property for more details.

connectGPropertiesChanged
ulong connectGPropertiesChanged(T callback, Flag!"After" after)

Connect to GPropertiesChanged signal.

connectGSignal
ulong connectGSignal(string detail, T callback, Flag!"After" after)

Connect to GSignal signal.

From Retrievable

getAttributes
string[string] getAttributes()

Get the attributes of this object.

getCreated
ulong getCreated()

Get the created date and time of the object.

getLabel
string getLabel()

Get the label of this item.

getModified
ulong getModified()

Get the modified date and time of the object.

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

Retrieve the secret value of this object.

retrieveSecretFinish
secret.value.Value retrieveSecretFinish(gio.async_result.AsyncResult result)

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

retrieveSecretSync
secret.value.Value retrieveSecretSync(gio.cancellable.Cancellable cancellable)

Retrieve the secret value of this object synchronously.