Secret.Service.ensure_session

### Method

# Secret Serviceensure_session

#### Declaration [src]

    void
    secret_service_ensure_session (
      SecretService* self,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Ensure that the `SecretService` proxy has established a session with the Secret Service.

This session is used to transfer secrets.

It is not normally necessary to call this method, as the session is established as necessary. You can also pass the `SECRET_SERVICE_OPEN_SESSION` to `secret_service_get()` in order to ensure that a session has been established by the time you get the `SecretService` proxy.

This method will return immediately and complete asynchronously.

This method completes asynchronously. Use `secret_service_ensure_session_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`cancellable`

  Type: `GCancellable`

  Optional cancellation object.

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

`callback`

  Type: `GAsyncReadyCallback`

  Called when the operation completes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to be passed to the callback.

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