Collection
Object Hierarchy:
Description:
[
CCode ( type_id =
"secret_collection_get_type ()" ) ]
public class Collection :
DBusProxy,
AsyncInitable,
DBusInterface,
Initable
A proxy object representing a collection of secrets in the Secret Service.
Collection represents a collection of secret items stored in the Secret Service.
A collection can be in a locked or unlocked state. Use [method@SecretService.lock] or [method@SecretService.unlock] to lock or unlock the
collection.
Use the [property@SecretCollection:items] property or [method@SecretCollection.get_items] to lookup the items in the collection. There
may not be any items exposed when the collection is locked.
Content:
Properties:
- public uint64 created { get; set; }
The date and time (in seconds since the UNIX epoch) that this
collection was created.
- public CollectionFlags flags { get; construct; }
A set of flags describing which parts of the secret collection have
been initialized.
- public string label { owned get; set; }
The human readable label for the collection.
- public bool locked { get; }
Whether the collection is locked or not.
- public uint64 modified { get; set; }
The date and time (in seconds since the UNIX epoch) that this
collection was last modified.
- public Service service { get; construct; }
The [class@Service] object that this collection is associated with and
uses to interact with the actual D-Bus Secret Service.
Static methods:
- public static async Collection create (Service? service, string label, string? alias, CollectionCreateFlags flags, Cancellable? cancellable) throws Error
Create a new collection in the secret service.
- public static Collection create_sync (Service? service, string label, string? alias, CollectionCreateFlags flags, Cancellable? cancellable = null) throws Error
Create a new collection in the secret service.
- public static async Collection? for_alias (Service? service, string alias, CollectionFlags flags, Cancellable? cancellable) throws Error
Lookup which collection is assigned to this alias.
- public static Collection? for_alias_sync (Service? service, string alias, CollectionFlags flags, Cancellable? cancellable = null) throws Error
Lookup which collection is assigned to this alias.
Creation methods:
Methods:
- public async bool @delete (Cancellable? cancellable) throws Error
Delete this collection.
- public bool delete_sync (Cancellable? cancellable = null) throws Error
Delete this collection.
- public uint64 get_created ()
Get the created date and time of the collection.
- public CollectionFlags get_flags ()
Get the flags representing what features of the
Collection proxy have been initialized.
- public List<Item> get_items ()
Get the list of items in this collection.
- public string get_label ()
Get the label of this collection.
- public bool get_locked ()
Get whether the collection is locked or not.
- public uint64 get_modified ()
Get the modified date and time of the collection.
- public unowned Service get_service ()
Get the Secret Service object that this collection was created with.
- public async bool load_items (Cancellable? cancellable) throws Error
Ensure that the Collection proxy has loaded
all the items present in the Secret Service.
- public bool load_items_sync (Cancellable? cancellable = null) throws Error
Ensure that the Collection proxy has loaded
all the items present in the Secret Service.
- public void refresh ()
Refresh the properties on this collection.
- public async List<Item> search (Schema? schema, HashTable<string,string> attributes, SearchFlags flags, Cancellable? cancellable) throws Error
Search for items matching the attributes in the
collection.
- public async string[] search_for_dbus_paths (Schema? schema, HashTable<string,string> attributes, Cancellable? cancellable) throws Error
Search for items in this matching
the attributes, and return their DBus object paths.
- public string[] search_for_dbus_paths_sync (Schema? schema, HashTable<string,string> attributes, Cancellable? cancellable = null) throws Error
Search for items matching the attributes in
this, and return their DBus object paths.
- public List<Item> search_sync (Schema? schema, HashTable<string,string> attributes, SearchFlags flags, Cancellable? cancellable = null) throws Error
Search for items matching the attributes in the
collection.
- public async bool set_label (string label, Cancellable? cancellable) throws Error
Set the label of this collection.
- public bool set_label_sync (string label, Cancellable? cancellable = null) throws Error
Set the label of this collection.
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