Tsparql.SparqlConnection.bus_new
Description: Reference for Tsparql.SparqlConnection.bus_new

### Constructor

# Tsparql SparqlConnectionbus_new

#### Declaration [src]

    TrackerSparqlConnection*
    tracker_sparql_connection_bus_new (
      const gchar* service_name,
      const gchar* object_path,
      GDBusConnection* dbus_connection,
      GError** error
    )

#### Description [src]

`service_name` (nullable): The name of the D-Bus service to connect to, or `NULL` if not using a message bus. Connects to a database owned by another process on the local machine via DBus.

When using a message bus (session/system), the `service_name` argument will be used to describe the remote endpoint, either by unique or well-known D-Bus names. If not using a message bus (e.g. peer-to-peer D-Bus connections) the `service_name` may be `NULL`.

The D-Bus object path of the remote endpoint will be given through `object_path`, `NULL` may be used to use the default `/org/freedesktop/Tracker3/Endpoint` path.

The D-Bus connection used to set up the connection may be given through the `dbus_connection` argument. Using `NULL` will resort to the default session bus.

#### Parameters

`service_name`

  Type: `const gchar*`

  No description available.

  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 path to the object, or `NULL` to use the default.

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

`dbus_connection`

  Type: `GDBusConnection`

  The `GDBusConnection` to use, or `NULL` to use the session bus.

  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: `TrackerSparqlConnection`

A new `TrackerSparqlConnection`.

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