Method

PurpleMediaManagerreceive_application_data

since: 2.6

Declaration [src]

gint
purple_media_manager_receive_application_data (
  PurpleMediaManager* manager,
  PurpleMedia* media,
  const gchar* session_id,
  const gchar* participant,
  gpointer buffer,
  guint max_size,
  gboolean blocking
)

Description [src]

Receive a buffer of data from a #PURPLE_MEDIA_APPLICATION session. If blocking is set, unless an error occurred, the function will not return until max_size bytes are read.

Available since: 2.6

Parameters

media

Type: PurpleMedia

The media instance to which the session belongs.

The data is owned by the caller of the function.
session_id

Type: const gchar*

The session to receive data from.

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

Type: const gchar*

The participant to receive data from.

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

Type: gpointer

The buffer to receive data into.

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

Type: guint

The max_size of buffer.

blocking

Type: gboolean

Whether to block until the buffer is entirely filled or return with currently available data.

Return value

Type: gint

Number of bytes received or -1 in case of error.