Class: Secret::Collection
- Inherits:
-
Gio::DBusProxy
- Object
- Gio::DBusProxy
- Secret::Collection
- Defined in:
- (unknown)
Overview
The class for Secret::Collection.
Class Method Summary collapse
-
.create(service, label, alias, flags, cancellable, callback, user_data) ⇒ nil
Create a new collection in the secret service.
-
.create_finish(result) ⇒ Secret::Collection
Finish operation to create a new collection in the secret service.
-
.create_sync(service, label, alias, flags, cancellable) ⇒ Secret::Collection
Create a new collection in the secret service.
-
.for_alias(service, alias, flags, cancellable, callback, user_data) ⇒ nil
Lookup which collection is assigned to this alias.
-
.for_alias_finish(result) ⇒ Secret::Collection
Finish an asynchronous operation to lookup which collection is assigned to an alias.
-
.for_alias_sync(service, alias, flags, cancellable) ⇒ Secret::Collection
Lookup which collection is assigned to this alias.
-
.new_for_dbus_path(service, collection_path, flags, cancellable, callback, user_data) ⇒ nil
Get a new collection proxy for a collection in the secret service.
Instance Method Summary collapse
-
#created ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was created.
-
#created=(created) ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was created.
-
#delete(cancellable, callback, user_data) ⇒ nil
Delete this collection.
-
#delete_finish(result) ⇒ Boolean
Complete operation to delete this collection.
-
#delete_sync(cancellable) ⇒ Boolean
Delete this collection.
-
#flags ⇒ Secret::CollectionFlags
A set of flags describing which parts of the secret collection have been initialized.
-
#flags=(flags) ⇒ Secret::CollectionFlags
A set of flags describing which parts of the secret collection have been initialized.
-
#initialize(service, collection_path, flags, cancellable) ⇒ Secret::Collection
constructor
Get a new collection proxy for a collection in the secret service.
-
#items ⇒ Secret::
A list of [classItem] objects representing the items that are in this collection.
-
#items=(items) ⇒ Secret::
A list of [classItem] objects representing the items that are in this collection.
-
#label ⇒ String
The human readable label for the collection.
-
#label=(label) ⇒ String
The human readable label for the collection.
-
#label_finish=(result) ⇒ Boolean
Complete asynchronous operation to set the label of this collection.
-
#load_items(cancellable, callback, user_data) ⇒ nil
Ensure that the Secret::Collection proxy has loaded all the items present in the Secret Service.
-
#load_items_finish(result) ⇒ Boolean
Complete an asynchronous operation to ensure that the Secret::Collection proxy has loaded all the items present in the Secret Service.
-
#load_items_sync(cancellable) ⇒ Boolean
Ensure that the Secret::Collection proxy has loaded all the items present in the Secret Service.
-
#locked ⇒ Boolean
Get whether the collection is locked or not.
-
#locked=(locked) ⇒ Boolean
Whether the collection is locked or not.
-
#locked? ⇒ Boolean
Whether the collection is locked or not.
-
#modified ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was last modified.
-
#modified=(modified) ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was last modified.
-
#refresh ⇒ nil
Refresh the properties on this collection.
-
#search(schema, attributes, flags, cancellable, callback, user_data) ⇒ nil
Search for items matching the attributes in the collection.
-
#search_finish(result) ⇒ GLib::List<Secret::Item>
Complete asynchronous operation to search for items in a collection.
-
#search_for_dbus_paths(schema, attributes, cancellable, callback, user_data) ⇒ nil
Search for items in collection matching the attributes, and return their DBus object paths.
-
#search_for_dbus_paths_finish(result) ⇒ Array<String>
Complete asynchronous operation to search for items in a collection.
-
#search_for_dbus_paths_sync(schema, attributes, cancellable) ⇒ Array<String>
Search for items matching the attributes in collection, and return their DBus object paths.
-
#search_sync(schema, attributes, flags, cancellable) ⇒ GLib::List<Secret::Item>
Search for items matching the attributes in the collection.
-
#service ⇒ Secret::Service
The [classService] object that this collection is associated with and uses to interact with the actual D-Bus Secret Service.
-
#service=(service) ⇒ Secret::Service
The [classService] object that this collection is associated with and uses to interact with the actual D-Bus Secret Service.
-
#set_label(label, cancellable, callback, user_data) ⇒ nil
Set the label of this collection.
-
#set_label_sync(label, cancellable) ⇒ Boolean
Set the label of this collection.
Constructor Details
#initialize(service, collection_path, flags, cancellable) ⇒ Secret::Collection
Get a new collection proxy for a collection in the secret service.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block indefinitely and should not be used in user interface threads.
Class Method Details
.create(service, label, alias, flags, cancellable, callback, user_data) ⇒ nil
Create a new collection in the secret service.
This method returns immediately and completes asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that are required.
An alias is a well-known tag for a collection, such as 'default' (ie: the default collection to store items in). This allows other applications to easily identify and share a collection. If you specify an alias, and a collection with that alias already exists, then a new collection will not be created. The previous one will be returned instead.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
.create_finish(result) ⇒ Secret::Collection
Finish operation to create a new collection in the secret service.
.create_sync(service, label, alias, flags, cancellable) ⇒ Secret::Collection
Create a new collection in the secret service.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that are required.
An alias is a well-known tag for a collection, such as default (ie: the
default collection to store items in). This allows other applications to
easily identify and share a collection. If you specify an alias, and a
collection with that alias already exists, then a new collection will not
be created. The previous one will be returned instead.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
.for_alias(service, alias, flags, cancellable, callback, user_data) ⇒ nil
Lookup which collection is assigned to this alias. Aliases help determine well known collections, such as 'default'.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method will return immediately and complete asynchronously.
.for_alias_finish(result) ⇒ Secret::Collection
Finish an asynchronous operation to lookup which collection is assigned to an alias.
.for_alias_sync(service, alias, flags, cancellable) ⇒ Secret::Collection
Lookup which collection is assigned to this alias. Aliases help determine
well known collections, such as default.
If service is nil, then [funcService.get_sync] will be called to get the default [classService] proxy.
This method may block and should not be used in user interface threads.
.new_for_dbus_path(service, collection_path, flags, cancellable, callback, user_data) ⇒ nil
Get a new collection proxy for a collection in the secret service.
If service is nil, then [funcService.get] will be called to get the default [classService] proxy.
This method will return immediately and complete asynchronously.
Instance Method Details
#created ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was created.
#created=(created) ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was created.
#delete(cancellable, callback, user_data) ⇒ nil
Delete this collection.
This method returns immediately and completes asynchronously. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#delete_finish(result) ⇒ Boolean
Complete operation to delete this collection.
#delete_sync(cancellable) ⇒ Boolean
Delete this collection.
This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. [methodService.prompt] will be used to handle any prompts that show up.
#flags ⇒ Secret::CollectionFlags
A set of flags describing which parts of the secret collection have been initialized.
#flags=(flags) ⇒ Secret::CollectionFlags
A set of flags describing which parts of the secret collection have been initialized.
#items ⇒ Secret::
A list of [classItem] objects representing the items that are in this collection. This list will be empty if the collection is locked.
#items=(items) ⇒ Secret::
A list of [classItem] objects representing the items that are in this collection. This list will be empty if the collection is locked.
#label ⇒ String
The human readable label for the collection.
Setting this property will result in the label of the collection being set asynchronously. To properly track the changing of the label use the [methodCollection.set_label] function.
#label=(label) ⇒ String
The human readable label for the collection.
Setting this property will result in the label of the collection being set asynchronously. To properly track the changing of the label use the [methodCollection.set_label] function.
#label_finish=(result) ⇒ Boolean
Complete asynchronous operation to set the label of this collection.
#load_items(cancellable, callback, user_data) ⇒ nil
Ensure that the Secret::Collection proxy has loaded all the items present in the Secret Service.
This affects the result of [methodCollection.get_items].
For collections returned from [methodService.get_collections] the items will have already been loaded.
This method will return immediately and complete asynchronously.
#load_items_finish(result) ⇒ Boolean
Complete an asynchronous operation to ensure that the Secret::Collection proxy has loaded all the items present in the Secret Service.
#load_items_sync(cancellable) ⇒ Boolean
Ensure that the Secret::Collection proxy has loaded all the items present in the Secret Service. This affects the result of [methodCollection.get_items].
For collections returned from [methodService.get_collections] the items will have already been loaded.
This method may block indefinitely and should not be used in user interface threads.
#locked ⇒ Boolean
Get whether the collection is locked or not.
Use [methodService.lock] or [methodService.unlock] to lock or unlock the collection.
#locked=(locked) ⇒ Boolean
Whether the collection is locked or not.
To lock or unlock a collection use the [methodService.lock] or [methodService.unlock] functions.
#locked? ⇒ Boolean
Whether the collection is locked or not.
To lock or unlock a collection use the [methodService.lock] or [methodService.unlock] functions.
#modified ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was last modified.
#modified=(modified) ⇒ Integer
The date and time (in seconds since the UNIX epoch) that this collection was last modified.
#refresh ⇒ nil
Refresh the properties on this collection. This fires off a request to refresh, and the properties will be updated later.
Calling this method is not normally necessary, as the secret service will notify the client when properties change.
#search(schema, attributes, flags, cancellable, callback, user_data) ⇒ nil
Search for items matching the attributes in the collection. The attributes should be a table of string keys and string values.
If %SECRET_SEARCH_ALL is set in flags, then all the items matching the search will be returned. Otherwise only the first item will be returned. This is almost always the unlocked item that was most recently stored.
If %SECRET_SEARCH_UNLOCK is set in flags, then items will be unlocked if necessary. In either case, locked and unlocked items will match the search and be returned. If the unlock fails, the search does not fail.
If %SECRET_SEARCH_LOAD_SECRETS is set in flags, then the items will have their secret values loaded and available via [methodItem.get_secret].
This function returns immediately and completes asynchronously.
#search_finish(result) ⇒ GLib::List<Secret::Item>
Complete asynchronous operation to search for items in a collection.
#search_for_dbus_paths(schema, attributes, cancellable, callback, user_data) ⇒ nil
Search for items in collection matching the attributes, and return their DBus object paths.
Only the specified collection is searched. The attributes should be a table of string keys and string values.
This function returns immediately and completes asynchronously.
When your callback is called use [methodCollection.search_for_dbus_paths_finish] to get the results of this function. Only the DBus object paths of the items will be returned. If you would like [classItem] objects to be returned instead, then use the [methodCollection.search] function.
#search_for_dbus_paths_finish(result) ⇒ Array<String>
Complete asynchronous operation to search for items in a collection.
DBus object paths of the items will be returned. If you would to have [classItem] objects to be returned instead, then use the [methodCollection.search] and [methodCollection.search_finish] functions.
#search_for_dbus_paths_sync(schema, attributes, cancellable) ⇒ Array<String>
Search for items matching the attributes in collection, and return their DBus object paths.
The attributes should be a table of string keys and string values.
This function may block indefinitely. Use the asynchronous version in user interface threads.
DBus object paths of the items will be returned. If you would to have [classItem] objects to be returned instead, then use the [methodCollection.search_sync] function.
#search_sync(schema, attributes, flags, cancellable) ⇒ GLib::List<Secret::Item>
Search for items matching the attributes in the collection. The attributes should be a table of string keys and string values.
If %SECRET_SEARCH_ALL is set in flags, then all the items matching the search will be returned. Otherwise only the first item will be returned. This is almost always the unlocked item that was most recently stored.
If %SECRET_SEARCH_UNLOCK is set in flags, then items will be unlocked if necessary. In either case, locked and unlocked items will match the search and be returned. If the unlock fails, the search does not fail.
If %SECRET_SEARCH_LOAD_SECRETS is set in flags, then the items will have their secret values loaded and available via [methodItem.get_secret].
This function may block indefinitely. Use the asynchronous version in user interface threads.
#service ⇒ Secret::Service
The [classService] object that this collection is associated with and uses to interact with the actual D-Bus Secret Service.
#service=(service) ⇒ Secret::Service
The [classService] object that this collection is associated with and uses to interact with the actual D-Bus Secret Service.
#set_label(label, cancellable, callback, user_data) ⇒ nil
Set the label of this collection.
This function returns immediately and completes asynchronously.
#set_label_sync(label, cancellable) ⇒ Boolean
Set the label of this collection.
This function may block indefinitely. Use the asynchronous version in user interface threads.