### Function

# Secret Service open_sync

#### Declaration [src]

    SecretService*
    secret_service_open_sync (
      GType service_gtype,
      const gchar* service_bus_name,
      SecretServiceFlags flags,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Create a new `SecretService` proxy for the Secret Service.

This function is rarely used, see `secret_service_get_sync()` instead.

The `service_gtype` argument should be set to `SECRET_TYPE_SERVICE` or a the type of a derived class.

If `flags` contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.

If `service_bus_name` is `NULL` then the default is used.

This method may block indefinitely and should not be used in user interface threads.

#### Parameters

`service_gtype` | `GType`
| The GType of the new secret service.
`service_bus_name` | `const gchar*`
| The D-Bus service name of the secret service.
| 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` | `SecretServiceFlags`
| Flags for which service functionality to ensure is initialized.
`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: | `SecretService`
| A new reference to a `SecretService` proxy, which should be released with `g_object_unref()`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.