### Method

# CM Room send_text_async

#### Declaration [src]

    const char*
    cm_room_send_text_async (
      CmRoom* self,
      const char* text,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Send `text` as a text message to the room `self`. If the room is encrypted, the text shall be encrypted and sent.

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

#### Parameters

`text`

  Type: `const char*`

  The text message to send.

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

`cancellable`

  Type: `GCancellable`

  A `Gcancellable`.

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

`callback`

  Type: `GAsyncReadyCallback`

  A `GasyncReadyCallback`.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  The user data for `callback`.

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

#### Return value

Type: `const char*`

The event id string used for the event. This can be used to track the event when received via the /sync callback or so.

The returned data is owned by the instance.
The value is a NUL terminated UTF-8 string.