### Constructor

# Gio DBusObjectManagerClient new_sync

since: 2.30

#### Declaration

    GDBusObjectManager*
    g_dbus_object_manager_client_new_sync (
      GDBusConnection* connection,
      GDBusObjectManagerClientFlags flags,
      const gchar* name,
      const gchar* object_path,
      GDBusProxyTypeFunc get_proxy_type_func,
      gpointer get_proxy_type_user_data,
      GDestroyNotify get_proxy_type_destroy_notify,
      GCancellable* cancellable,
      GError** error
    )

#### Description

Creates a new `GDBusObjectManagerClient` object.

This is a synchronous failable constructor - the calling thread is blocked until a reply is received. See `g_dbus_object_manager_client_new()` for the asynchronous version.

Available since: 2.30

#### Parameters

`connection`

  Type: `GDBusConnection`

  A `GDBusConnection`.

  The data is owned by the caller of the function.

`flags`

  Type: `GDBusObjectManagerClientFlags`

  Zero or more flags from the `GDBusObjectManagerClientFlags` enumeration.

`name`

  Type: `const gchar*`

  The owner of the control object (unique or well-known name), or `NULL` when not using a message bus connection.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`object_path`

  Type: `const gchar*`

  The object path of the control object.

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

`get_proxy_type_func`

  Type: `GDBusProxyTypeFunc`

  A `GDBusProxyTypeFunc` function or `NULL` to always construct `GDBusProxy` proxies.

  The argument can be `NULL`.

`get_proxy_type_user_data`

  Type: `gpointer`

  User data to pass to `get_proxy_type_func`.

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

`get_proxy_type_destroy_notify`

  Type: `GDestroyNotify`

  Free function for `get_proxy_type_user_data` or `NULL`.

  The argument can be `NULL`.

`cancellable`

  Type: `GCancellable`

  A `GCancellable` or `NULL`.

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

`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 constructor 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: `GDBusObjectManagerClient`

A `GDBusObjectManagerClient` object or `NULL` if `error` is set. Free with g_object_unref().

The caller of the function takes ownership of the data, and is responsible for freeing it.