Qrtr.Bus.new
Description: Reference for Qrtr.Bus.new

### Function

# Qrtr Busnew

since: 1.0

#### Declaration [src]

    void
    qrtr_bus_new (
      guint lookup_timeout_ms,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Asynchronously creates a `QrtrBus` object.

This method will fail if the access to the QRTR bus is not possible, or if the initial lookup doesn’t finish on time.

When `lookup_timeout_ms` is 0, this method does not guarantee that the initial bus lookup has already finished, the user should wait for the required `QrtrBus::node-added` and `QrtrNode::service-added` signals before assuming the nodes are accessible.

When the operation is finished, `callback` will be invoked. You can then call `qrtr_bus_new_finish()` to get the result of the operation.

Available since: 1.0

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

#### Parameters

`lookup_timeout_ms`

  Type: `guint`

  The timeout, in milliseconds, to wait for the initial bus lookup to complete. A zero timeout disables the lookup.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, `NULL` to ignore.

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

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback` to call when the initialization is finished.

`user_data`

  Type: `gpointer`

  The data to pass to callback function.

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