An alias to the default collection. This can be passed to secret_password_store()
secret_collection_for_alias().
An alias to the session collection, which will be cleared when the user ends
the session. This can be passed to secret_password_store(),
secret_collection_for_alias() or similar functions.
A proxy object representing a collection of secrets in the Secret Service.
Finish asynchronous operation to get a new collection proxy for a
collection in the secret service.
the new collection, which should be unreferenced
with g_object_unref()
the asynchronous result passed to the callback
Get a new collection proxy for a collection in the secret service.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
the new collection, which should be unreferenced
with g_object_unref()
a secret service object
the D-Bus path of the collection
options for the collection initialization
optional cancellation object
Create a new collection in the secret service.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. secret_service_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 NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
a secret service object
label for the new collection
alias to assign to the collection
currently unused
optional cancellation object
called when the operation completes
data to pass to the callback
Finish operation to create a new collection in the secret service.
the new collection, which should be unreferenced
with g_object_unref()
the asynchronous result passed to the callback
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. secret_service_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 NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
the new collection, which should be unreferenced
with g_object_unref()
a secret service object
label for the new collection
alias to assign to the collection
currently unused
optional cancellation object
Lookup which collection is assigned to this alias. Aliases help determine
well known collections, such as 'default'.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method will return immediately and complete asynchronously.
a secret service object
the alias to lookup
options for the collection initialization
optional cancellation object
called when the operation completes
data to pass to the callback
Finish an asynchronous operation to lookup which collection is assigned
to an alias.
the collection, or %NULL if none assigned to the alias
asynchronous result passed to callback
Lookup which collection is assigned to this alias. Aliases help determine
well known collections, such as 'default'.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block and should not be used in user interface threads.
the collection, or %NULL if none assigned to the alias
a secret service object
the alias to lookup
options for the collection initialization
optional cancellation object
Get a new collection proxy for a collection in the secret service.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method will return immediately and complete asynchronously.
a secret service object
the D-Bus path of the collection
options for the collection initialization
optional cancellation object
called when the operation completes
data to be passed to the callback
Delete this collection.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that show up.
a collection
optional cancellation object
called when the operation completes
data to pass to the callback
Complete operation to delete this collection.
whether the collection was successfully deleted or not
a collection
asynchronous result passed to the callback
Delete this collection.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
whether the collection was successfully deleted or not
a collection
optional cancellation object
Get the created date and time of the collection. The return value is
the number of seconds since the unix epoch, January 1st 1970.
the created date and time
a collection
Get the flags representing what features of the #SecretCollection proxy
have been initialized.
Use secret_collection_load_items() to initialize further features
and change the flags.
the flags for features initialized
the secret collection proxy
Get the list of items in this collection.
a list of items,
when done, the list should be freed with g_list_free, and each item should
be released with g_object_unref()
a collection
Get the label of this collection.
the label, which should be freed with g_free()
a collection
Get whether the collection is locked or not.
Use secret_service_lock() or secret_service_unlock() to lock or unlock the
collection.
whether the collection is locked or not
a collection
Get the modified date and time of the collection. The return value is
the number of seconds since the unix epoch, January 1st 1970.
the modified date and time
a collection
Get the Secret Service object that this collection was created with.
the Secret Service object
a collection
Ensure that the #SecretCollection proxy has loaded all the items present
in the Secret Service. This affects the result of
secret_collection_get_items().
For collections returned from secret_service_get_collections() the items
will have already been loaded.
This method will return immediately and complete asynchronously.
the secret collection
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete an asynchronous operation to ensure that the #SecretCollection proxy
has loaded all the items present in the Secret Service.
whether the load was successful or not
the secret collection
the asynchronous result passed to the callback
Ensure that the #SecretCollection proxy has loaded all the items present
in the Secret Service. This affects the result of
secret_collection_get_items().
For collections returned from secret_service_get_collections() the items
will have already been loaded.
This method may block indefinitely and should not be used in user interface
threads.
whether the load was successful or not
the secret collection
optional cancellation object
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.
the collection
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 secret_item_get_secret().
This function returns immediately and completes asynchronously.
a secret collection
the schema for the attributes
search for items matching these attributes
search option flags
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to search for items in a collection.
a list of items that matched the search
the secret collection
asynchronous result passed to callback
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 secret_collection_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 #SecretItem objects to be returned
instead, then use the secret_collection_search() function.
the secret collection
the schema for the attributes
search for items matching these attributes
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to search for items in a collection.
DBus object paths of the items will be returned. If you would to have
#SecretItem objects to be returned instead, then use the
secret_collection_search() and secret_collection_search_finish() functions.
an array of DBus object
paths for matching items.
the secret collection
asynchronous result passed to callback
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
#SecretItem objects to be returned instead, then use the
secret_collection_search_sync() function.
an array of DBus object
paths for matching items.
the secret collection
the schema for the attributes
search for items matching these attributes
optional cancellation object
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 secret_item_get_secret().
This function may block indefinitely. Use the asynchronous version
in user interface threads.
a list of items that matched the search
a secret collection
the schema for the attributes
search for items matching these attributes
search option flags
optional cancellation object
Set the label of this collection.
This function returns immediately and completes asynchronously.
a collection
a new label
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to set the label of this collection.
whether the change was successful or not
a collection
asynchronous result passed to callback
Set the label of this collection.
This function may block indefinitely. Use the asynchronous version
in user interface threads.
whether the change was successful or not
a collection
a new label
optional cancellation object
The date and time (in seconds since the UNIX epoch) that this
collection was created.
A set of flags describing which parts of the secret collection have
been initialized.
A list of #SecretItem objects representing the items that are in
this collection. This list will be empty if the collection is locked.
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
secret_collection_set_label() function.
Whether the collection is locked or not.
To lock or unlock a collection use the secret_service_lock() or
secret_service_unlock() functions.
The date and time (in seconds since the UNIX epoch) that this
collection was last modified.
The #SecretService object that this collection is associated with and
uses to interact with the actual D-Bus Secret Service.
The class for #SecretCollection.
the parent class
Flags for secret_collection_create().
no flags
Flags which determine which parts of the #SecretCollection proxy are initialized.
no flags
items have or should be loaded
A proxy object representing a secret item in the Secret Service.
Finish asynchronous operation to get a new item proxy for a secret
item in the secret service.
the new item, which should be unreferenced
with g_object_unref()
the asynchronous result passed to the callback
Get a new item proxy for a secret item in the secret service.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
the new item, which should be unreferenced
with g_object_unref()
a secret service object
the D-Bus path of the item
initialization flags for the new item
optional cancellation object
Create a new item in the secret service.
If the @flags contains %SECRET_ITEM_CREATE_REPLACE, then the secret
service will search for an item matching the @attributes, and update that item
instead of creating a new one.
This method may block indefinitely and should not be used in user interface
threads. The secret service may prompt the user. secret_service_prompt()
will be used to handle any prompts that are required.
a secret collection to create this item in
the schema for the attributes
attributes for the new item
label for the new item
secret value for the new item
flags for the creation of the new item
optional cancellation object
called when the operation completes
data to pass to the callback
Finish operation to create a new item in the secret service.
the new item, which should be unreferenced
with g_object_unref()
the asynchronous result passed to the callback
Create a new item in the secret service.
If the @flags contains %SECRET_ITEM_CREATE_REPLACE, then the secret
service will search for an item matching the @attributes, and update that item
instead of creating a new one.
This method may block indefinitely and should not be used in user interface
threads. The secret service may prompt the user. secret_service_prompt()
will be used to handle any prompts that are required.
the new item, which should be unreferenced
with g_object_unref()
a secret collection to create this item in
the schema for the attributes
attributes for the new item
label for the new item
secret value for the new item
flags for the creation of the new item
optional cancellation object
Load the secret values for a secret item stored in the service.
The @items must all have the same SecretItem::service property.
This function returns immediately and completes asynchronously.
the items to retrieve secrets for
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to load the secret values for
secret items stored in the service.
Items that are locked will not have their secrets loaded.
whether the operation succeeded or not
asynchronous result passed to callback
Load the secret values for a secret item stored in the service.
The @items must all have the same SecretItem::service property.
This method may block indefinitely and should not be used in user interface
threads.
Items that are locked will not have their secrets loaded.
whether the operation succeeded or not
the items to retrieve secrets for
optional cancellation object
Get a new item proxy for a secret item in the secret service.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method will return immediately and complete asynchronously.
a secret service object
the D-Bus path of the collection
initialization flags for the new item
optional cancellation object
called when the operation completes
data to be passed to the callback
Delete this item.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that show up.
an item
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to delete the secret item.
whether the item was successfully deleted or not
an item
asynchronous result passed to the callback
Delete this secret item.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
whether the item was successfully deleted or not
an item
optional cancellation object
Set the attributes of this item.
The @attributes are a mapping of string keys to string values.
Attributes are used to search for items. Attributes are not stored
or transferred securely by the secret service.
Do not modify the attributes returned by this method. Use
secret_item_set_attributes() instead.
a new reference
to the attributes, which should not be modified, and
released with g_hash_table_unref()
an item
Get the created date and time of the item. The return value is
the number of seconds since the unix epoch, January 1st 1970.
the created date and time
an item
Get the flags representing what features of the #SecretItem proxy
have been initialized.
Use secret_item_load_secret() to initialize further features
and change the flags.
the flags for features initialized
the secret item proxy
Get the label of this item.
the label, which should be freed with g_free()
an item
Get whether the item is locked or not.
Depending on the secret service an item may not be able to be locked
independently from the collection that it is in.
whether the item is locked or not
an item
Get the modified date and time of the item. The return value is
the number of seconds since the unix epoch, January 1st 1970.
the modified date and time
an item
Gets the name of the schema that this item was stored with. This is also
available at the <literal>xdg:schema</literal> attribute.
the schema name
an item
Get the secret value of this item. If this item is locked or the secret
has not yet been loaded then this will return %NULL.
To load the secret call the secret_item_load_secret() method.
the secret value which should be
released with secret_value_unref(), or %NULL
an item
Get the Secret Service object that this item was created with.
the Secret Service object
an item
Load the secret value of this item.
Each item has a single secret which might be a password or some
other secret binary value.
This function will fail if the secret item is locked.
This function returns immediately and completes asynchronously.
an item proxy
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to load the secret value of this item.
The newly loaded secret value can be accessed by calling
secret_item_get_secret().
whether the secret item successfully loaded or not
an item proxy
asynchronous result passed to callback
Load the secret value of this item.
Each item has a single secret which might be a password or some
other secret binary value.
This function may block indefinitely. Use the asynchronous version
in user interface threads.
whether the secret item successfully loaded or not
an item
optional cancellation object
Refresh the properties on this item. 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.
the collection
Set the attributes of this item.
The @attributes are a mapping of string keys to string values.
Attributes are used to search for items. Attributes are not stored
or transferred securely by the secret service.
This function returns immediately and completes asynchronously.
an item
the schema for the attributes
a new set of attributes
optional cancellation object
called when the asynchronous operation completes
data to pass to the callback
Complete operation to set the attributes of this item.
whether the change was successful or not
an item
asynchronous result passed to the callback
Set the attributes of this item.
The @attributes are a mapping of string keys to string values.
Attributes are used to search for items. Attributes are not stored
or transferred securely by the secret service.
This function may block indefinitely. Use the asynchronous version
in user interface threads.
whether the change was successful or not
an item
the schema for the attributes
a new set of attributes
optional cancellation object
Set the label of this item.
This function returns immediately and completes asynchronously.
an item
a new label
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to set the label of this collection.
whether the change was successful or not
an item
asynchronous result passed to callback
Set the label of this item.
This function may block indefinitely. Use the asynchronous version
in user interface threads.
whether the change was successful or not
an item
a new label
optional cancellation object
Set the secret value of this item.
Each item has a single secret which might be a password or some
other secret binary value.
This function returns immediately and completes asynchronously.
an item
a new secret value
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to set the secret value of this item.
whether the change was successful or not
an item
asynchronous result passed to callback
Set the secret value of this item.
Each item has a single secret which might be a password or some
other secret binary value.
This function may block indefinitely. Use the asynchronous version
in user interface threads.
whether the change was successful or not
an item
a new secret value
optional cancellation object
The attributes set on this item. Attributes are used to locate an
item. They are not guaranteed to be stored or transferred securely.
The date and time (in seconds since the UNIX epoch) that this
item was created.
A set of flags describing which parts of the secret item have
been initialized.
The human readable label for the item.
Setting this property will result in the label of the item being
set asynchronously. To properly track the changing of the label use the
secret_item_set_label() function.
Whether the item is locked or not. An item may not be independently
lockable separate from other items in its collection.
To lock or unlock a item use the secret_service_lock() or
secret_service_unlock() functions.
The date and time (in seconds since the UNIX epoch) that this
item was last modified.
The #SecretService object that this item is associated with and
uses to interact with the actual D-Bus Secret Service.
The class for #SecretItem.
the parent class
Flags for secret_item_create().
no flags
replace an item with the same attributes.
Flags which determine which parts of the #SecretItem proxy are initialized.
no flags
a secret has been (or should be) loaded for #SecretItem
A proxy object representing a prompt that the Secret Service will display
to the user.
Runs a prompt and performs the prompting. Returns %TRUE if the prompt
was completed and not dismissed.
If @window_id is non-null then it is used as an XWindow id on Linux. The API
expects this id to be converted to a string using the <literal>%d</literal>
printf format. The Secret Service can make its prompt transient for the window
with this id. In some Secret Service implementations this is not possible, so
the behavior depending on this should degrade gracefully.
This method will return immediately and complete asynchronously.
a prompt
string form of XWindow id for parent window to be transient for
the variant type of the prompt result
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete asynchronous operation to run a prompt and perform the prompting.
Returns a variant result if the prompt was completed and not dismissed. The
type of result depends on the action the prompt is completing, and is
defined in the Secret Service DBus API specification.
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
a prompt
the asynchronous result passed to the callback
Runs a prompt and performs the prompting. Returns a variant result if the
prompt was completed and not dismissed. The type of result depends on the
action the prompt is completing, and is defined in the Secret Service DBus
API specification.
If @window_id is non-null then it is used as an XWindow id on Linux. The API
expects this id to be converted to a string using the <literal>%d</literal>
printf format. The Secret Service can make its prompt transient for the window
with this id. In some Secret Service implementations this is not possible,
so the behavior depending on this should degrade gracefully.
This method may block indefinitely and should not be used in user interface
threads.
%NULL if the prompt was dismissed or an error occurred
a prompt
string form of XWindow id for parent window to be transient for
optional cancellation object
the variant type of the prompt result
Runs a prompt and performs the prompting. Returns a variant result if the
prompt was completed and not dismissed. The type of result depends on the
action the prompt is completing, and is defined in the Secret Service DBus
API specification.
If @window_id is non-null then it is used as an XWindow id on Linux. The API
expects this id to be converted to a string using the <literal>%d</literal>
printf format. The Secret Service can make its prompt transient for the window
with this id. In some Secret Service implementations this is not possible, so
the behavior depending on this should degrade gracefully.
This runs the dialog in a recursive mainloop. When run from a user interface
thread, this means the user interface will remain responsive. Care should be
taken that appropriate user interface actions are disabled while running the
prompt.
%NULL if the prompt was dismissed or an error occurred
a prompt
string form of XWindow id for parent window to be transient for
optional cancellation object
the variant type of the prompt result
The class for #SecretPrompt.
the parent class
Represents a set of attributes that are stored with an item. These schemas
are used for interoperability between various services storing the same types
of items.
Each schema has a name like "org.gnome.keyring.NetworkPassword", and defines
a set of attributes, and types (string, integer, boolean) for those attributes.
Attributes are stored as strings in the Secret Service, and the attribute
types simply define standard ways to store integer and boolean values as strings.
Attributes are represented in libsecret via a #GHashTable with string keys and
values. Even for values that defined as an integer or boolean in the schema,
the attribute values in the #GHashTable are strings. Boolean values are stored
as the strings 'true' and 'false'. Integer values are stored in decimal, with
a preceding negative sign for negative integers.
Schemas are handled entirely on the client side by this library. The name of the
schema is automatically stored as an attribute on the item.
Normally when looking up passwords only those with matching schema names are
returned. If the schema @flags contain the %SECRET_SCHEMA_DONT_MATCH_NAME flag,
then lookups will not check that the schema name matches that on the item, only
the schema's attributes are matched. This is useful when you are looking up items
that are not stored by the libsecret library. Other libraries such as libgnome-keyring
don't store the schema name.
the dotted name of the schema
flags for the schema
the attribute names and types of those attributes
Using this function is not normally necessary from C code.
A schema represents a set of attributes that are stored with an item. These
schemas are used for interoperability between various services storing the
same types of items.
Each schema has an @name like "org.gnome.keyring.NetworkPassword", and
defines a set of attributes names, and types (string, integer, boolean) for
those attributes.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) integers from the
#SecretSchemaAttributeType enumeration, representing the attribute type for
each attribute name. The list of attribtues should be terminated with a %NULL.
Normally when looking up passwords only those with matching schema names are
returned. If the schema @flags contain the %SECRET_SCHEMA_DONT_MATCH_NAME flag,
then lookups will not check that the schema name matches that on the item, only
the schema's attributes are matched. This is useful when you are looking up items
that are not stored by the libsecret library. Other libraries such as libgnome-keyring
don't store the schema name.
the new schema, which should be unreferenced with
secret_schema_unref() when done
the dotted name of the schema
the flags for the schema
the attribute names and types, terminated with %NULL
Using this function is not normally necessary from C code. This is useful
for constructing #SecretSchema structures in bindings.
A schema represents a set of attributes that are stored with an item. These
schemas are used for interoperability between various services storing the
same types of items.
Each schema has an @name like "org.gnome.keyring.NetworkPassword", and
defines a set of attributes names, and types (string, integer, boolean) for
those attributes.
Each key in the @attributes table should be a attribute name strings, and
the values in the table should be integers from the #SecretSchemaAttributeType
enumeration, representing the attribute type for each attribute name.
Normally when looking up passwords only those with matching schema names are
returned. If the schema @flags contain the %SECRET_SCHEMA_DONT_MATCH_NAME flag,
then lookups will not check that the schema name matches that on the item, only
the schema's attributes are matched. This is useful when you are looking up items
that are not stored by the libsecret library. Other libraries such as libgnome-keyring
don't store the schema name.
the new schema, which should be unreferenced with
secret_schema_unref() when done
the dotted name of the schema
the flags for the schema
the attribute names and types of those attributes
Adds a reference to the #SecretSchema.
It is not normally necessary to call this function from C code, and is
mainly present for the sake of bindings. If the @schema was statically
allocated, then this function will copy the schema.
the referenced schema, which should be later
unreferenced with secret_schema_unref()
the schema to reference
Releases a reference to the #SecretSchema. If the last reference is
released then the schema will be freed.
It is not normally necessary to call this function from C code, and is
mainly present for the sake of bindings. It is an error to call this for
a @schema that was statically allocated.
the schema to reference
An attribute in a #SecretSchema.
name of the attribute
the type of the attribute
The type of an attribute in a #SecretSchema. Attributes are stored as strings
in the Secret Service, and the attribute types simply define standard ways
to store integer and boolean values as strings.
a utf-8 string attribute
an integer attribute, stored as a decimal
a boolean attribute, stored as 'true' or 'false'
Flags for a #SecretSchema definition.
no flags for the schema
don't match the schema name when looking up or
removing passwords
Different types of schemas for storing secrets, intended for use with
secret_get_schema().
Personal passwords; see %SECRET_SCHEMA_NOTE
Network passwords from older
libgnome-keyring storage; see %SECRET_SCHEMA_COMPAT_NETWORK
Various flags to be used with secret_service_search() and secret_service_search_sync().
no flags
all the items matching the search will be returned, instead of just the first one
unlock locked items while searching
while searching load secrets for items that are not locked
A proxy object representing the Secret Service.
Disconnect the default #SecretService proxy returned by secret_service_get()
and secret_service_get_sync().
It is not necessary to call this function, but you may choose to do so at
program exit. It is useful for testing that memory is not leaked.
This function is safe to call at any time. But if other objects in this
library are still referenced, then this will not result in all memory
being freed.
Get a #SecretService proxy for the Secret Service. If such a proxy object
already exists, then the same proxy is returned.
If @flags contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before completing.
This method will return immediately and complete asynchronously.
flags for which service functionality to ensure is initialized
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete an asynchronous operation to get a #SecretService proxy for the
Secret Service.
a new reference to a #SecretService proxy, which
should be released with g_object_unref().
the asynchronous result passed to the callback
Get a #SecretService proxy for the Secret Service. If such a proxy object
already exists, then the same proxy is returned.
If @flags contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before returning.
This method may block indefinitely and should not be used in user interface
threads.
a new reference to a #SecretService proxy, which
should be released with g_object_unref().
flags for which service functionality to ensure is initialized
optional cancellation object
Create a new #SecretService proxy for the Secret Service.
This function is rarely used, see secret_service_get() instead.
The @service_gtype argument should be set to %SECRET_TYPE_SERVICE or a the type
of a derived class.
If @flags contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before returning.
If @service_bus_name is %NULL then the default is used.
This method will return immediately and complete asynchronously.
the GType of the new secret service
the D-Bus service name of the secret service
flags for which service functionality to ensure is initialized
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete an asynchronous operation to create a new #SecretService proxy for
the Secret Service.
a new reference to a #SecretService proxy, which
should be released with g_object_unref().
the asynchronous result passed to the callback
Create a new #SecretService proxy for the Secret Service.
This function is rarely used, see secret_service_get_sync() instead.
The @service_gtype argument should be set to %SECRET_TYPE_SERVICE or a the
type of a derived class.
If @flags contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before returning.
If @service_bus_name is %NULL then the default is used.
This method may block indefinitely and should not be used in user interface
threads.
a new reference to a #SecretService proxy, which
should be released with g_object_unref().
the GType of the new secret service
the D-Bus service name of the secret service
flags for which service functionality to ensure is initialized
optional cancellation object
Get the GObject type for collections instantiated by this service.
This will always be either #SecretCollection or derived from it.
the gobject type for collections
the secret service
Get the GObject type for items instantiated by this service.
This will always be either #SecretItem or derived from it.
the gobject type for items
the service
Complete asynchronous operation to perform prompting for a #SecretPrompt.
Returns a variant result if the prompt was completed and not dismissed. The
type of result depends on the action the prompt is completing, and is defined
in the Secret Service DBus API specification.
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
the secret service
the asynchronous result passed to the callback
Perform prompting for a #SecretPrompt.
Runs a prompt and performs the prompting. Returns a variant result if the
prompt was completed and not dismissed. The type of result depends on the
action the prompt is completing, and is defined in the Secret Service DBus
API specification.
This function is called by other parts of this library to handle prompts
for the various actions that can require prompting.
Override the #SecretServiceClass <literal>prompt_sync</literal> virtual method
to change the behavior of the prompting. The default behavior is to simply
run secret_prompt_perform_sync() on the prompt with a %NULL <literal>window_id</literal>.
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
the secret service
the prompt
optional cancellation object
the variant type of the prompt result
Remove unlocked items which match the attributes from the secret service.
The @attributes should be a set of key and value string pairs.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method will return immediately and complete asynchronously.
the secret service
the schema for the attributes
the attribute keys and values
optional cancellation object
called when the operation completes
data to be passed to the callback
Finish asynchronous operation to remove items from the secret
service.
whether items were removed or not
the secret service
the asynchronous result passed to the callback
Remove unlocked items which match the attributes from the secret service.
The @attributes should be a set of key and value string pairs.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
whether items were removed or not
the secret service
the schema for the attributes
the attribute keys and values
optional cancellation object
Create a new collection in the secret service, and return its path.
Using this method requires that you setup a correct hash table of D-Bus
properties for the new collection. You may prefer to use
secret_collection_create() which does handles this for you.
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 a collection with the @alias
already exists, then instead of creating a new collection, the existing
collection will be returned. If no collection with this alias exists, then a
new collection will be created and this alias will be assigned to it.
@properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
<literal>org.freedesktop.Secret.Collection.Label</literal>. The values
in the hash table should be #GVariant values of the properties.
If you wish to have a
This method will return immediately and complete asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that are required.
a secret service object
hash table of properties for
the new collection
an alias to check for before creating the new
collection, or to assign to the new collection
not currently used
optional cancellation object
called when the operation completes
data to be passed to the callback
Finish asynchronous operation to create a new collection in the secret
service.
a new string containing the D-Bus object path
of the collection
a secret service object
the asynchronous result passed to the callback
Create a new collection in the secret service and return its path.
Using this method requires that you setup a correct hash table of D-Bus
properties for the new collection. You may prefer to use
secret_collection_create() which does handles this for you.
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 a collection with the @alias
already exists, then instead of creating a new collection, the existing
collection will be returned. If no collection with this alias exists, then
a new collection will be created and this alias will be assigned to it.
@properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
<literal>org.freedesktop.Secret.Collection.Label</literal>. The values
in the hash table should be #GVariant values of the properties.
This method may block indefinitely and should not be used in user interface
threads. The secret service may prompt the user. secret_service_prompt()
will be used to handle any prompts that are required.
a new string containing the D-Bus object path
of the collection
a secret service object
hash table of D-Bus properties
for the new collection
an alias to check for before creating the new
collection, or to assign to the new collection
not currently used
optional cancellation object
Create a new item in a secret service collection and return its D-Bus
object path.
It is often easier to use secret_password_store() or secret_item_create()
rather than using this function. Using this method requires that you setup
a correct hash table of D-Bus @properties for the new collection.
If the @flags contains %SECRET_ITEM_CREATE_REPLACE, then the secret
service will search for an item matching the @attributes, and update that item
instead of creating a new one.
@properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
<literal>org.freedesktop.Secret.Item.Label</literal>. The values
in the hash table should be #GVariant values of the properties.
This method will return immediately and complete asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that are required.
a secret service object
the D-Bus object path of the collection in which to create item
hash table of D-Bus properties
for the new collection
the secret value to store in the item
flags for the creation of the new item
optional cancellation object
called when the operation completes
data to be passed to the callback
Finish asynchronous operation to create a new item in the secret
service.
a new string containing the D-Bus object path
of the item
a secret service object
the asynchronous result passed to the callback
Create a new item in a secret service collection and return its D-Bus
object path.
It is often easier to use secret_password_store_sync() or secret_item_create_sync()
rather than using this function. Using this method requires that you setup
a correct hash table of D-Bus @properties for the new collection.
If the @flags contains %SECRET_ITEM_CREATE_REPLACE, then the secret
service will search for an item matching the @attributes, and update that item
instead of creating a new one.
@properties is a set of properties for the new collection. The keys in the
hash table should be interface.property strings like
<literal>org.freedesktop.Secret.Item.Label</literal>. The values
in the hash table should be #GVariant values of the properties.
This method may block indefinitely and should not be used in user interface
threads. The secret service may prompt the user. secret_service_prompt()
will be used to handle any prompts that are required.
a new string containing the D-Bus object path
of the item
a secret service object
the D-Bus path of the collection in which to create item
hash table of D-Bus properties
for the new collection
the secret value to store in the item
flags for the creation of the new item
optional cancellation object
Decode a #SecretValue into GVariant received with the Secret Service
DBus API.
The GVariant should have a <literal>(oayays)</literal> signature.
A session must have already been established by the #SecretService, and
the encoded secret must be valid for that session.
the decoded secret value
the service
the encoded secret
Delete a secret item from the secret service.
The item is represented by its D-Bus object path. If you already have a
#SecretItem proxy objects, use use secret_item_delete() instead.
This method will return immediately and complete asynchronously.
the secret service
the D-Bus path of item to delete
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete an asynchronous operation to delete a secret item from the secret
service.
whether the deletion was successful or not
the secret service
the asynchronous result passed to the callback
Delete a secret item from the secret service.
The item is represented by its D-Bus object path. If you already have a
#SecretItem proxy objects, use use secret_item_delete_sync() instead.
This method may block indefinitely and should not be used in user interface
threads.
whether the deletion was successful or not
the secret service
the D-Bus path of item to delete
optional cancellation object
Encodes a #SecretValue into GVariant for use with the Secret Service
DBus API.
The resulting GVariant will have a <literal>(oayays)</literal> signature.
A session must have already been established by the #SecretService.
the encoded secret
the service
the secret value
Ensure that the #SecretService proxy has established a session with the
Secret Service. This session is used to transfer secrets.
It is not normally necessary to call this method, as the session is
established as necessary. You can also pass the %SECRET_SERVICE_OPEN_SESSION
to secret_service_get() in order to ensure that a session has been established
by the time you get the #SecretService proxy.
This method will return immediately and complete asynchronously.
the secret service
optional cancellation object
called when the operation completes
data to be passed to the callback
Finish an asynchronous operation to ensure that the #SecretService proxy
has established a session with the Secret Service.
whether a session is established or not
the secret service
the asynchronous result passed to the callback
Ensure that the #SecretService proxy has established a session with the
Secret Service. This session is used to transfer secrets.
It is not normally necessary to call this method, as the session is
established as necessary. You can also pass the %SECRET_SERVICE_OPEN_SESSION
to secret_service_get_sync() in order to ensure that a session has been
established by the time you get the #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
whether a session is established or not
the secret service
optional cancellation object
Get the GObject type for collections instantiated by this service.
This will always be either #SecretCollection or derived from it.
the gobject type for collections
the secret service
Get a list of #SecretCollection objects representing all the collections
in the secret service.
If the %SECRET_SERVICE_LOAD_COLLECTIONS flag was not specified when
initializing #SecretService proxy object, then this method will return
%NULL. Use secret_service_load_collections() to load the collections.
a
list of the collections in the secret service
the secret service proxy
Get the flags representing what features of the #SecretService proxy
have been initialized.
Use secret_service_ensure_session() or secret_service_load_collections()
to initialize further features and change the flags.
the flags for features initialized
the secret service proxy
Get the GObject type for items instantiated by this service.
This will always be either #SecretItem or derived from it.
the gobject type for items
the service
Get the secret value for a secret item stored in the service.
The item is represented by its D-Bus object path. If you already have a
#SecretItem proxy object, use use secret_item_get_secret() to more simply
get its secret value.
This function returns immediately and completes asynchronously.
the secret service
the D-Bus path to item to retrieve secret for
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to get the secret value for an
secret item stored in the service.
Will return %NULL if the item is locked.
the newly allocated secret value
for the item, which should be released with secret_value_unref()
the secret service
asynchronous result passed to callback
Get the secret value for a secret item stored in the service.
The item is represented by its D-Bus object path. If you already have a
#SecretItem proxy object, use use secret_item_load_secret_sync() to more simply
get its secret value.
This method may block indefinitely and should not be used in user interface
threads.
Will return %NULL if the item is locked.
the newly allocated secret value
for the item, which should be released with secret_value_unref()
the secret service
the D-Bus path to item to retrieve secret for
optional cancellation object
Get the secret values for a secret item stored in the service.
The items are represented by their D-Bus object paths. If you already have
#SecretItem proxy objects, use use secret_item_load_secrets() to more simply
get their secret values.
This function returns immediately and completes asynchronously.
the secret service
the D-Bus paths to items to retrieve secrets for
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to get the secret values for an
secret items stored in the service.
Items that are locked will not be included the results.
a newly
allocated hash table of item_path keys to #SecretValue
values.
the secret service
asynchronous result passed to callback
Get the secret values for a secret item stored in the service.
The items are represented by their D-Bus object paths. If you already have
#SecretItem proxy objects, use use secret_item_load_secrets_sync() to more
simply get their secret values.
This method may block indefinitely and should not be used in user interface
threads.
Items that are locked will not be included the results.
a newly
allocated hash table of item_path keys to #SecretValue
values.
the secret service
the D-Bus paths to items to retrieve secrets for
optional cancellation object
Get the set of algorithms being used to transfer secrets between this
secret service proxy and the Secret Service itself.
This will be %NULL if no session has been established. Use
secret_service_ensure_session() to establish a session.
a string representing the algorithms for transferring
secrets
the secret service proxy
Get the D-Bus object path of the session object being used to transfer
secrets between this secret service proxy and the Secret Service itself.
This will be %NULL if no session has been established. Use
secret_service_ensure_session() to establish a session.
a string representing the D-Bus object path of the
session
the secret service proxy
Ensure that the #SecretService proxy has loaded all the collections present
in the Secret Service. This affects the result of
secret_service_get_collections().
You can also pass the %SECRET_SERVICE_LOAD_COLLECTIONS to
secret_service_get_sync() in order to ensure that the collections have been
loaded by the time you get the #SecretService proxy.
This method will return immediately and complete asynchronously.
the secret service
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete an asynchronous operation to ensure that the #SecretService proxy
has loaded all the collections present in the Secret Service.
whether the load was successful or not
the secret service
the asynchronous result passed to the callback
Ensure that the #SecretService proxy has loaded all the collections present
in the Secret Service. This affects the result of
secret_service_get_collections().
You can also pass the %SECRET_SERVICE_LOAD_COLLECTIONS to
secret_service_get_sync() in order to ensure that the collections have been
loaded by the time you get the #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
whether the load was successful or not
the secret service
optional cancellation object
Lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may
lock an entire collection instead.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that show up.
the secret service
the items or collections to lock
optional cancellation object
called when the operation completes
data to pass to the callback
Lock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you
already have #SecretItem and #SecretCollection proxy objects, use use
secret_service_lock() instead.
The secret service may not be able to lock items individually, and may
lock an entire collection instead.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that show up.
the secret service
the D-Bus paths for items or collections to lock
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to lock items or collections in the secret
service.
The secret service may not be able to lock items individually, and may
lock an entire collection instead.
the number of items or collections that were locked
the secret service
asynchronous result passed to the callback
location to place array of D-Bus paths of items or collections
that were locked
Lock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you
already have #SecretItem and #SecretCollection proxy objects, use use
secret_service_lock_sync() instead.
The secret service may not be able to lock items individually, and may
lock an entire collection instead.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
the number of items or collections that were locked
the secret service
the D-Bus object paths of the items or collections to lock
optional cancellation object
location to place array of D-Bus paths of items or collections
that were locked
Complete asynchronous operation to lock items or collections in the secret
service.
The secret service may not be able to lock items individually, and may
lock an entire collection instead.
the number of items or collections that were locked
the secret service
asynchronous result passed to the callback
location to place list of items or collections that were locked
Lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may
lock an entire collection instead.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
the number of items or collections that were locked
the secret service
the items or collections to lock
optional cancellation object
location to place list of items or collections that were locked
Lookup a secret value in the secret service.
The @attributes should be a set of key and value string pairs.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method will return immediately and complete asynchronously.
the secret service
the schema for the attributes
the attribute keys and values
optional cancellation object
called when the operation completes
data to be passed to the callback
Finish asynchronous operation to lookup a secret value in the secret service.
If no secret is found then %NULL is returned.
a newly allocated #SecretValue, which should be
released with secret_value_unref(), or %NULL if no secret found
the secret service
the asynchronous result passed to the callback
Lookup a secret value in the secret service.
The @attributes should be a set of key and value string pairs.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
a newly allocated #SecretValue, which should be
released with secret_value_unref(), or %NULL if no secret found
the secret service
the schema for the attributes
the attribute keys and values
optional cancellation object
Perform prompting for a #SecretPrompt.
This function is called by other parts of this library to handle prompts
for the various actions that can require prompting.
Override the #SecretServiceClass <literal>prompt_async</literal> virtual method
to change the behavior of the prompting. The default behavior is to simply
run secret_prompt_perform() on the prompt.
the secret service
the prompt
the variant type of the prompt result
optional cancellation object
called when the operation completes
data to be passed to the callback
Perform prompting for a #SecretPrompt.
This function is called by other parts of this library to handle prompts
for the various actions that can require prompting.
Override the #SecretServiceClass <literal>prompt_async</literal> virtual method
to change the behavior of the propmting. The default behavior is to simply
run secret_prompt_perform() on the prompt.
the secret service
the D-Bus object path of the prompt
the variant type of the prompt result
optional cancellation object
called when the operation completes
data to be passed to the callback
Complete asynchronous operation to perform prompting for a #SecretPrompt.
Returns a variant result if the prompt was completed and not dismissed. The
type of result depends on the action the prompt is completing, and is defined
in the Secret Service DBus API specification.
%NULL if the prompt was dismissed or an
error occurred, a variant result if the prompt was successful
the secret service
the asynchronous result passed to the callback
Perform prompting for a #SecretPrompt.
Override the #SecretServiceClass <literal>prompt_async</literal> virtual method
to change the behavior of the propmting. The default behavior is to simply
run secret_prompt_perform() on the prompt.
Returns a variant result if the prompt was completed and not dismissed. The
type of result depends on the action the prompt is completing, and is defined
in the Secret Service DBus API specification.
This method may block and should not be used in user interface threads.
%NULL if the prompt was dismissed or an
error occurred, a variant result if the prompt was successful
the secret service
the D-Bus object path of the prompt
optional cancellation object
the variant type of the prompt result
Complete asynchronous operation to perform prompting for a #SecretPrompt.
Returns a variant result if the prompt was completed and not dismissed. The
type of result depends on the action the prompt is completing, and is defined
in the Secret Service DBus API specification.
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
the secret service
the asynchronous result passed to the callback
Perform prompting for a #SecretPrompt.
Runs a prompt and performs the prompting. Returns a variant result if the
prompt was completed and not dismissed. The type of result depends on the
action the prompt is completing, and is defined in the Secret Service DBus
API specification.
This function is called by other parts of this library to handle prompts
for the various actions that can require prompting.
Override the #SecretServiceClass <literal>prompt_sync</literal> virtual method
to change the behavior of the prompting. The default behavior is to simply
run secret_prompt_perform_sync() on the prompt with a %NULL <literal>window_id</literal>.
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
the secret service
the prompt
optional cancellation object
the variant type of the prompt result
Lookup which collection is assigned to this alias. Aliases help determine
well known collections, such as 'default'. This method looks up the
dbus object path of the well known collection.
This method will return immediately and complete asynchronously.
a secret service object
the alias to lookup
optional cancellation object
called when the operation completes
data to pass to the callback
Finish an asynchronous operation to lookup which collection is assigned
to an alias. This method returns the DBus object path of the collection
the collection dbus object path,
or %NULL if none assigned to the alias
a secret service object
asynchronous result passed to callback
Lookup which collection is assigned to this alias. Aliases help determine
well known collections, such as 'default'. This method returns the dbus
object path of the collection.
This method may block and should not be used in user interface threads.
the collection dbus object path,
or %NULL if none assigned to the alias
a secret service object
the alias to lookup
optional cancellation object
Search for items matching the @attributes. All collections are searched.
The @attributes should be a table of string keys and string values.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
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 secret_item_get_secret().
This function returns immediately and completes asynchronously.
the secret service
the schema for the attributes
search for items matching these attributes
search option flags
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to search for items.
a list of items that matched the search
the secret service
asynchronous result passed to callback
Search for items matching the @attributes, and return their D-Bus object paths.
All collections are 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 secret_service_search_for_dbus_paths_finish()
to get the results of this function. Only the D-Bus object paths of the
items will be returned. If you would like #SecretItem objects to be returned
instead, then use the secret_service_search() function.
the secret service
the schema for the attributes
search for items matching these attributes
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to search for items, and return their
D-Bus object paths.
Matching items that are locked or unlocked, have their D-Bus paths placed
in the @locked or @unlocked arrays respectively.
D-Bus object paths of the items will be returned in the @unlocked or
@locked arrays. If you would to have #SecretItem objects to be returned
instead, then us the secret_service_search() and
secret_service_search_finish() functions.
whether the search was successful or not
the secret service
asynchronous result passed to callback
location to place an array of D-Bus object paths for matching
items which were locked.
location to place an array of D-Bus object paths for matching
items which were locked.
Search for items matching the @attributes, and return their D-Bus object
paths. All collections are searched. 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.
Matching items that are locked or unlocked, have their D-Bus paths placed
in the @locked or @unlocked arrays respectively.
D-Bus object paths of the items will be returned in the @unlocked or
@locked arrays. If you would to have #SecretItem objects to be returned
instead, then use the secret_service_search_sync() function.
whether the search was successful or not
the secret service
the schema for the attributes
search for items matching these attributes
optional cancellation object
location to place an array of D-Bus object paths for matching
items which were locked.
location to place an array of D-Bus object paths for matching
items which were locked.
Search for items matching the @attributes. All collections are searched.
The @attributes should be a table of string keys and string values.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
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' secret
values will be loaded for any unlocked items. Loaded item secret values
are available via secret_item_get_secret(). If the load of a secret values
fail, then the
This function may block indefinitely. Use the asynchronous version
in user interface threads.
a list of items that matched the search
the secret service
the schema for the attributes
search for items matching these attributes
search option flags
optional cancellation object
Assign a collection to this alias. Aliases help determine
well known collections, such as 'default'.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method will return immediately and complete asynchronously.
a secret service object
the alias to assign the collection to
the collection to assign to the alias
optional cancellation object
called when the operation completes
data to pass to the callback
Finish an asynchronous operation to assign a collection to an alias.
%TRUE if successful
a secret service object
asynchronous result passed to callback
Assign a collection to this alias. Aliases help determine
well known collections, such as 'default'.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block and should not be used in user interface threads.
%TRUE if successful
a secret service object
the alias to assign the collection to
the collection to assign to the alias
optional cancellation object
Assign a collection to this alias. Aliases help determine
well known collections, such as 'default'. This method takes the dbus object
path of the collection to assign to the alias.
This method will return immediately and complete asynchronously.
a secret service object
the alias to assign the collection to
the dbus object path of the collection to assign to the alias
optional cancellation object
called when the operation completes
data to pass to the callback
Finish an asynchronous operation to assign a collection to an alias.
%TRUE if successful
a secret service object
asynchronous result passed to callback
Assign a collection to this alias. Aliases help determine
well known collections, such as 'default'. This method takes the dbus object
path of the collection to assign to the alias.
This method may block and should not be used in user interface threads.
%TRUE if successful
a secret service object
the alias to assign the collection to
the dbus object path of the collection to assign to the alias
optional cancellation object
Store a secret value in the secret service.
The @attributes should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then
the item will be updated with these new values.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
If @collection is not specified, then the default collection will be
used. Use #SECRET_COLLECTION_SESSION to store the password in the session
collection, which doesn't get stored across login sessions.
This method will return immediately and complete asynchronously.
the secret service
the schema to use to check attributes
the attribute keys and values
a collection alias, or D-Bus object path of the collection where to store the secret
label for the secret
the secret value
optional cancellation object
called when the operation completes
data to be passed to the callback
Finish asynchronous operation to store a secret value in the secret service.
whether the storage was successful or not
the secret service
the asynchronous result passed to the callback
Store a secret value in the secret service.
The @attributes should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then
the item will be updated with these new values.
If @collection is %NULL, then the default collection will be
used. Use #SECRET_COLLECTION_SESSION to store the password in the session
collection, which doesn't get stored across login sessions.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user interface
threads.
whether the storage was successful or not
the secret service
the schema for the attributes
the attribute keys and values
a collection alias, or D-Bus object path of the collection where to store the secret
label for the secret
the secret value
optional cancellation object
Unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may
unlock an entire collection instead.
If @service is NULL, then secret_service_get() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
the secret service
the items or collections to unlock
optional cancellation object
called when the operation completes
data to pass to the callback
Unlock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you
already have #SecretItem and #SecretCollection proxy objects, use use
secret_service_unlock() instead.
The secret service may not be able to unlock items individually, and may
unlock an entire collection instead.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. secret_service_prompt() will be used to handle
any prompts that show up.
the secret service
the D-Bus paths for items or collections to unlock
optional cancellation object
called when the operation completes
data to pass to the callback
Complete asynchronous operation to unlock items or collections in the secret
service.
The secret service may not be able to unlock items individually, and may
unlock an entire collection instead.
the number of items or collections that were unlocked
the secret service
asynchronous result passed to the callback
location to place array of D-Bus paths of items or collections
that were unlocked
Unlock items or collections in the secret service.
The items or collections are represented by their D-Bus object paths. If you
already have #SecretItem and #SecretCollection proxy objects, use use
secret_service_unlock_sync() instead.
The secret service may not be able to unlock items individually, and may
unlock an entire collection instead.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
the number of items or collections that were unlocked
the secret service
the D-Bus object paths of the items or collections to unlock
optional cancellation object
location to place array of D-Bus paths of items or collections
that were unlocked
Complete asynchronous operation to unlock items or collections in the secret
service.
The secret service may not be able to unlock items individually, and may
unlock an entire collection instead.
the number of items or collections that were unlocked
the secret service
asynchronous result passed to the callback
location to place list of items or collections that were unlocked
Unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may
unlock an entire collection instead.
If @service is NULL, then secret_service_get_sync() will be called to get
the default #SecretService proxy.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
secret_service_prompt() will be used to handle any prompts that show up.
the number of items or collections that were unlocked
the secret service
the items or collections to unlock
optional cancellation object
location to place list of items or collections that were unlocked
A list of #SecretCollection objects representing the collections in
the Secret Service. This list may be %NULL if the collections have
not been loaded.
To load the collections, specify the %SECRET_SERVICE_LOAD_COLLECTIONS
initialization flag when calling the secret_service_get() or
secret_service_open() functions. Or call the secret_service_load_collections()
method.
A set of flags describing which parts of the secret service have
been initialized.
The class for #SecretService.
the parent class
the #GType of the #SecretCollection objects instantiated
by the #SecretService proxy
the #GType of the #SecretItem objects instantiated by the
#SecretService proxy
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
the secret service
the prompt
optional cancellation object
the variant type of the prompt result
%NULL if the prompt was dismissed or an error occurred,
a variant result if the prompt was successful
the secret service
the asynchronous result passed to the callback
the gobject type for collections
the secret service
the gobject type for items
the service
Flags which determine which parts of the #SecretService proxy are initialized
during a secret_service_get() or secret_service_open() operation.
no flags for initializing the #SecretService
establish a session for transfer of secrets
while initializing the #SecretService
load collections while initializing the
#SecretService
A secret value, like a password or other binary secret.
Create a #SecretValue for the secret data passed in. The secret data is
copied into non-pageable 'secure' memory.
If the length is less than zero, then @secret is assumed to be
null-terminated.
the new #SecretValue
the secret data
the length of the data
the content type of the data
Create a #SecretValue for the secret data passed in. The secret data is
not copied, and will later be freed with the @destroy function.
If the length is less than zero, then @secret is assumed to be
null-terminated.
the new #SecretValue
the secret data
the length of the data
the content type of the data
function to call to free the secret data
Get the secret data in the #SecretValue. The value is not necessarily
null-terminated unless it was created with secret_value_new() or a
null-terminated string was passed to secret_value_new_full().
the secret data
the value
the length of the secret
Get the content type of the secret value, such as
<literal>text/plain</literal>.
the content type
the value
Get the secret data in the #SecretValue if it contains a textual
value. The content type must be <literal>text/plain</literal>.
the content type
the value
Add another reference to the #SecretValue. For each reference
secret_value_unref() should be called to unreference the value.
the value
value to reference
Unreference a #SecretValue. When the last reference is gone, then
the value will be freed.
value to unreference
Build up a hash table of attribute values.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attribtues should be terminated with a %NULL.
a new table of
attributes, to be released with g_hash_table_unref()
the schema for the attributes
the attribute keys and values, terminated with %NULL
Build up a hash table of attribute values.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attribtues should be terminated with a %NULL.
a new table of
attributes, to be released with g_hash_table_unref()
the schema for the attributes
the attribute keys and values, terminated with %NULL
Get a secret storage schema of the given @type.
C code may access the schemas (such as %SECRET_SCHEMA_NOTE) directly, but
language bindings cannot, and must use this accessor.
schema type
type of schema to get
Clear unlocked matching passwords from the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attribtues should be terminated with a %NULL.
All unlocked items that match the attributes will be deleted.
This method will return immediately and complete asynchronously.
the schema for the attributes
optional cancellation object
called when the operation completes
data to be passed to the callback
the attribute keys and values, terminated with %NULL
Finish an asynchronous operation to remove passwords from the secret
service.
whether any passwords were removed
the asynchronous result passed to the callback
Remove unlocked matching passwords from the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attribtues should be terminated with a %NULL.
All unlocked items that match the attributes will be deleted.
This method may block indefinitely and should not be used in user interface
threads.
whether the any passwords were removed
the schema for the attributes
optional cancellation object
location to place an error on failure
the attribute keys and values, terminated with %NULL
Remove unlocked matching passwords from the secret service.
The @attributes should be a set of key and value string pairs.
All unlocked items that match the attributes will be deleted.
This method will return immediately and complete asynchronously.
the schema for the attributes
the attribute keys and values
optional cancellation object
called when the operation completes
data to be passed to the callback
Remove unlocked matching passwords from the secret service.
The @attributes should be a set of key and value string pairs.
All unlocked items that match the attributes will be deleted.
This method may block indefinitely and should not be used in user interface
threads.
whether any passwords were removed
the schema for the attributes
the attribute keys and values
optional cancellation object
Clear the memory used by a password, and then free it.
This function must be used to free nonpageable memory returned by
secret_password_lookup_nonpageable_finish(),
secret_password_lookup_nonpageable_sync() or
secret_password_lookupv_nonpageable_sync().
password to free
Lookup a password in the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attribtues should be terminated with a %NULL.
If no secret is found then %NULL is returned.
This method will return immediately and complete asynchronously.
the schema for the attributes
optional cancellation object
called when the operation completes
data to be passed to the callback
the attribute keys and values, terminated with %NULL
Finish an asynchronous operation to lookup a password in the secret service.
a new password string which should be freed with
secret_password_free() or may be freed with g_free() when done
the asynchronous result passed to the callback
Finish an asynchronous operation to lookup a password in the secret service.
a new password string stored in nonpageable memory
which must be freed with secret_password_free() when done
the asynchronous result passed to the callback
Lookup a password in the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attribtues should be terminated with a %NULL.
If no secret is found then %NULL is returned.
This method may block indefinitely and should not be used in user interface
threads.
a new password string stored in nonpageable memory
which must be freed with secret_password_free() when done
the schema for the attributes
optional cancellation object
location to place an error on failure
the attribute keys and values, terminated with %NULL
Lookup a password in the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the password
@schema. The list of attributes should be terminated with a %NULL.
If no secret is found then %NULL is returned.
This method may block indefinitely and should not be used in user interface
threads.
a new password string which should be freed with
secret_password_free() or may be freed with g_free() when done
the schema for the attributes
optional cancellation object
location to place an error on failure
the attribute keys and values, terminated with %NULL
Lookup a password in the secret service.
The @attributes should be a set of key and value string pairs.
If no secret is found then %NULL is returned.
This method will return immediately and complete asynchronously.
the schema for attributes
the attribute keys and values
optional cancellation object
called when the operation completes
data to be passed to the callback
Lookup a password in the secret service.
The @attributes should be a set of key and value string pairs.
If no secret is found then %NULL is returned.
This method may block indefinitely and should not be used in user interface
threads.
a new password string stored in non pageable memory
which should be freed with secret_password_free() when done
the schema for attributes
the attribute keys and values
optional cancellation object
Lookup a password in the secret service.
The @attributes should be a set of key and value string pairs.
If no secret is found then %NULL is returned.
This method may block indefinitely and should not be used in user interface
threads.
a new password string which should be freed with
secret_password_free() or may be freed with g_free() when done
the schema for attributes
the attribute keys and values
optional cancellation object
Store a password in the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the @schema.
The list of attribtues should be terminated with a %NULL.
If the attributes match a secret item already stored in the collection, then
the item will be updated with these new values.
If @collection is %NULL, then the default collection will be
used. Use #SECRET_COLLECTION_SESSION to store the password in the session
collection, which doesn't get stored across login sessions.
This method will return immediately and complete asynchronously.
the schema for attributes
a collection alias, or D-Bus object path of the collection where to store the secret
label for the secret
the null-terminated password to store
optional cancellation object
called when the operation completes
data to be passed to the callback
the attribute keys and values, terminated with %NULL
Finish asynchronous operation to store a password in the secret service.
whether the storage was successful or not
the asynchronous result passed to the callback
Store a password in the secret service.
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) attribute value, either a character
string, an int number, or a gboolean value, as defined in the @schema.
The list of attribtues should be terminated with a %NULL.
If the attributes match a secret item already stored in the collection, then
the item will be updated with these new values.
If @collection is %NULL, then the default collection will be
used. Use #SECRET_COLLECTION_SESSION to store the password in the session
collection, which doesn't get stored across login sessions.
This method may block indefinitely and should not be used in user interface
threads.
whether the storage was successful or not
the schema for attributes
a collection alias, or D-Bus object path of the collection where to store the secret
label for the secret
the null-terminated password to store
optional cancellation object
location to place an error on failure
the attribute keys and values, terminated with %NULL
Store a password in the secret service.
The @attributes should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then
the item will be updated with these new values.
If @collection is %NULL, then the default collection will be
used. Use #SECRET_COLLECTION_SESSION to store the password in the session
collection, which doesn't get stored across login sessions.
This method will return immediately and complete asynchronously.
the schema for attributes
the attribute keys and values
a collection alias, or D-Bus object path of the collection where to store the secret
label for the secret
the null-terminated password to store
optional cancellation object
called when the operation completes
data to be passed to the callback
Store a password in the secret service.
The @attributes should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then
the item will be updated with these new values.
If @collection is %NULL, then the default collection will be
used. Use #SECRET_COLLECTION_SESSION to store the password in the session
collection, which doesn't get stored across login sessions.
This method may block indefinitely and should not be used in user interface
threads.
whether the storage was successful or not
the schema for attributes
the attribute keys and values
a collection alias, or D-Bus object path of the collection where to store the secret
label for the secret
the null-terminated password to store
optional cancellation object
Clear the memory used by a password.
password to clear