Item
Object Hierarchy:
Secret.Item
Secret.Item
Secret.Item
GLib.DBusProxy
GLib.DBusProxy
GLib.DBusProxy->Secret.Item
GLib.Object
GLib.Object
GLib.Object->GLib.DBusProxy
GLib.AsyncInitable
GLib.AsyncInitable
GLib.AsyncInitable->Secret.Item
GLib.AsyncInitable->GLib.DBusProxy
GLib.DBusInterface
GLib.DBusInterface
GLib.DBusInterface->Secret.Item
GLib.DBusInterface->GLib.DBusProxy
GLib.Initable
GLib.Initable
GLib.Initable->Secret.Item
GLib.Initable->GLib.DBusProxy
Secret.Retrievable
Secret.Retrievable
Secret.Retrievable->Secret.Item
Description:
[
CCode ( type_id =
"secret_item_get_type ()" ) ]
public class Item :
DBusProxy ,
AsyncInitable ,
DBusInterface ,
Initable ,
Retrievable
A secret item
Item represents a secret item stored in the Secret Service.
Each item has a value, represented by a [structValue
], which can be retrieved by [methodItem.get_secret
] or set by
[methodItem.set_secret
]. The item is only available when the item is not locked.
Items can be locked or unlocked using the [methodService.lock
] or [methodService.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 [methodService.search
] to search for items based on their attributes, and
[methodItem.set_attributes
] to change the attributes associated with an item.
Items can be created with [funcItem.create
] or [methodService.store
].
Content:
Properties:
public ItemFlags flags { get ; construct ; }
A set of flags describing which parts of the secret item have been
initialized.
public bool locked { get ; }
Whether the item is locked or not.
public Service service { get ; construct ; }
The [classService
] object that this item is associated with and
uses to interact with the actual D-Bus Secret Service.
Static methods:
public static async Item create (Collection collection, Schema ? schema, HashTable <string ,string > attributes, string label, Value value, ItemCreateFlags flags, Cancellable ? cancellable) throws Error
Create a new item in the secret service.
public static Item create_sync (Collection collection, Schema ? schema, HashTable <string ,string > attributes, string label, Value value, ItemCreateFlags flags, Cancellable ? cancellable = null ) throws Error
Create a new item in the secret service.
public static async bool load_secrets (List <Item > items, Cancellable ? cancellable) throws Error
Load the secret values for a secret item stored in the service.
public static bool load_secrets_sync (List <Item > items, Cancellable ? cancellable = null ) throws Error
Load the secret values for a secret item stored in the service.
Creation methods:
Methods:
public async bool @delete (Cancellable ? cancellable) throws Error
Delete this item.
public bool delete_sync (Cancellable ? cancellable = null ) throws Error
Delete this secret item.
public HashTable <string ,string > get_attributes ()
Set the attributes of this item.
public uint64 get_created ()
Get the created date and time of the item.
public ItemFlags get_flags ()
Get the flags representing what features of the Item
proxy have been initialized.
public string get_label ()
Get the label of this item.
public bool get_locked ()
Get whether the item is locked or not.
public uint64 get_modified ()
Get the modified date and time of the item.
public string ? get_schema_name ()
Gets the name of the schema that this item was stored with.
public Value ? get_secret ()
Get the secret value of this item.
public unowned Service get_service ()
Get the Secret Service object that this item was created with.
public async bool load_secret (Cancellable ? cancellable) throws Error
Load the secret value of this item.
public bool load_secret_sync (Cancellable ? cancellable = null ) throws Error
Load the secret value of this item.
public void refresh ()
Refresh the properties on this item.
public async bool set_attributes (Schema ? schema, HashTable <string ,string > attributes, Cancellable ? cancellable) throws Error
Set the attributes of this item.
public bool set_attributes_sync (Schema ? schema, HashTable <string ,string > attributes, Cancellable ? cancellable = null ) throws Error
Set the attributes of this item.
public async bool set_label (string label, Cancellable ? cancellable) throws Error
Set the label of this item.
public bool set_label_sync (string label, Cancellable ? cancellable = null ) throws Error
Set the label of this item.
public async bool set_secret (Value value, Cancellable ? cancellable) throws Error
Set the secret value of this item.
public bool set_secret_sync (Value value, Cancellable ? cancellable = null ) throws Error
Set the secret value of this item.
Inherited Members:
All known members inherited from class GLib.DBusProxy
All known members inherited from class GLib.Object
All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.DBusInterface
All known members inherited from interface GLib.Initable
All known members inherited from interface Secret.Retrievable