Item.createSync

Create a new item in the secret service.

If the flags contains secret.types.ItemCreateFlags.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.Service.prompt will be used to handle any prompts that are required.

Parameters

collection secret.collection.Collection

a secret collection to create this item in

schema secret.schema.Schema

the schema for the attributes

attributes string[string]

attributes for the new item

label string

label for the new item

value secret.value.Value

secret value for the new item

flags secret.types.ItemCreateFlags

flags for the creation of the new item

cancellable gio.cancellable.Cancellable

optional cancellation object

Return Value

Type: secret.item.Item

the new item, which should be unreferenced with gobject.object.ObjectG.unref