Method
SecretServicecreate_item_dbus_path_sync
Declaration [src]
gchar*
secret_service_create_item_dbus_path_sync (
SecretService* self,
const gchar* collection_path,
GHashTable* properties,
SecretValue* value,
SecretItemCreateFlags flags,
GCancellable* cancellable,
GError** error
)
Description [src]
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
org.freedesktop.Secret.Item.Label
. 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.
Stability: | Unstable |
Parameters
collection_path |
const gchar* |
The D-Bus path of the collection in which to create item. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
properties |
GHashTable |
Hash table of D-Bus properties for the new collection. |
|
The data is owned by the caller of the function. | |
value |
SecretValue |
The secret value to store in the item. |
|
The data is owned by the caller of the function. | |
flags |
SecretItemCreateFlags |
Flags for the creation of the new item. |
|
cancellable |
GCancellable |
Optional cancellation object. |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
error |
GError ** |
The return location for a GError* , or NULL . |