Method

PurpleMediaManagerreceive_application_data

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.

Parameters

media PurpleMedia
 

The media instance to which the session belongs.

 The data is owned by the caller of the function.
session_id 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 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 gpointer
 

The buffer to receive data into.

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

The max_size of buffer.

blocking gboolean
 

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

Return value

Returns: gint
 

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