Method
SecretServicecreate_item_dbus_path
Declaration [src]
void
secret_service_create_item_dbus_path (
SecretService* self,
const gchar* collection_path,
GHashTable* properties,
SecretValue* value,
SecretItemCreateFlags flags,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
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() 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
org.freedesktop.Secret.Item.Label. 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.
Stability: Unstable
This method completes asynchronously. Use secret_service_create_item_dbus_path_finish() inside the GAsyncReadyCallback to obtain the result of the operation.
This method is not directly available to language bindings.
Parameters
collection_path-
Type:
const gchar*The D-Bus object path of the collection in which to create item.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. properties-
Type:
GHashTableHash table of D-Bus properties for the new collection.
The data is owned by the caller of the method. value-
Type:
SecretValueThe secret value to store in the item.
The data is owned by the caller of the method. flags-
Type:
SecretItemCreateFlagsFlags for the creation of the new item.
cancellable-
Type:
GCancellableOptional cancellation object.
The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackCalled when the operation completes.
The argument can be NULL. user_data-
Type:
gpointerData to be passed to the callback.
The argument can be NULL.The data is owned by the caller of the method.