Secret.Item.create
Description: Reference for Secret.Item.create

### Function

# Secret Itemcreate

#### Declaration [src]

    void
    secret_item_create (
      SecretCollection* collection,
      const SecretSchema* schema,
      GHashTable* attributes,
      const gchar* label,
      SecretValue* value,
      SecretItemCreateFlags flags,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

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.

#### Parameters

`collection`

  Type: `SecretCollection`

  A secret collection to create this item in.

  The data is owned by the caller of the function.

`schema`

  Type: `SecretSchema`

  The schema for the attributes.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`attributes`

  Type: `GHashTable`

  Attributes for the new item.

  The data is owned by the caller of the function.

`label`

  Type: `const gchar*`

  Label for the new item.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`value`

  Type: `SecretValue`

  Secret value for the new item.

  The data is owned by the caller of the function.

`flags`

  Type: `SecretItemCreateFlags`

  Flags for the creation of the new item.

`cancellable`

  Type: `GCancellable`

  Optional cancellation object.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`callback`

  Type: `GAsyncReadyCallback`

  Called when the operation completes.

`user_data`

  Type: `gpointer`

  Data to pass to the callback.

  The argument can be `NULL`.
  The data is owned by the caller of the function.