Secret.Service.lock_dbus_paths_sync

### Method

# Secret Servicelock_dbus_paths_sync

#### Declaration [src]

    gint
    secret_service_lock_dbus_paths_sync (
      SecretService* self,
      const gchar** paths,
      GCancellable* cancellable,
      gchar*** locked,
      GError** error
    )

#### Description [src]

Lock items or collections in the secret service.

The items or collections are represented by their D-Bus object paths. If you already have `SecretItem` and `SecretCollection` proxy objects, use use `secret_service_lock_sync()` instead.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

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 show up.

Stability: Unstable

This method is not directly available to language bindings.

#### Parameters

`paths`

  Type: An array of `gchar*`

  The D-Bus object paths of the items or collections to lock.

  The array must be `NULL`-terminated.
  The data is owned by the caller of the method.
  Each element is a NUL terminated UTF-8 string.

`cancellable`

  Type: `GCancellable`

  Optional cancellation object.

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

`locked`

  Type: An array of `gchar**`

  location to place array of D-Bus paths of items or collections that were locked.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.
  The argument can be `NULL`.
  The array must be `NULL`-terminated.
  The caller of the method takes ownership of the data, and is responsible for freeing it.
  Each element is a NUL terminated UTF-8 string.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gint`

The number of items or collections that were locked.