create_item_dbus_path_sync


Description:

public string create_item_dbus_path_sync (string collection_path, HashTable<string,Variant> properties, Value value, ItemCreateFlags flags, Cancellable? cancellable = null) throws Error

Create a new item in a secret service collection and return its D-Bus object path.

It is often easier to use [funcpassword_store_sync] or [funcItem.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 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 [structGLib.Variant] 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. [method Service.prompt] will be used to handle any prompts that are required.

Parameters:

this

a secret service object

collection_path

the D-Bus path of the collection in which to create item

properties

hash table of D-Bus properties for the new collection

value

the secret value to store in the item

flags

flags for the creation of the new item

cancellable

optional cancellation object

Returns:

a new string containing the D-Bus object path of the item