Secret.Collection.create_sync
Description: Reference for Secret.Collection.create_sync

### Function

# Secret Collectioncreate_sync

#### Declaration [src]

    SecretCollection*
    secret_collection_create_sync (
      SecretService* service,
      const gchar* label,
      const gchar* alias,
      SecretCollectionCreateFlags flags,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Create a new collection in the secret service.

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.

An `alias` is a well-known tag for a collection, such as `default` (ie: the default collection to store items in). This allows other applications to easily identify and share a collection. If you specify an `alias`, and a collection with that alias already exists, then a new collection will not be created. The previous one will be returned instead.

If `service` is `NULL`, then `secret_service_get_sync()` will be called to get the default `SecretService` proxy.

#### Parameters

`service` | `SecretService`
| A secret service object.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`label` | `const gchar*`
| Label for the new collection.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`alias` | `const gchar*`
| Alias to assign to the collection.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`flags` | `SecretCollectionCreateFlags`
| Currently unused.
`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`.

#### Return value

Returns: | `SecretCollection`
| The new collection, which should be unreferenced with `g_object_unref()`
| The caller of the function takes ownership of the data, and is responsible for freeing it.