XMMS2
|
#include <stddef.h>
#include "xmmsc/xmmsv.h"
#include "xmmsc/xmmsc_util.h"
#include "xmmscpriv/xmmsv_c2c.h"
Macros | |
#define | GEN_C2C_FIELD_GET_FUNC(field, getter, ctype, failval) |
Functions | |
int | xmmsv_c2c_message_get_id (xmmsv_t *msg) |
Extract the id from a c2c message. More... | |
int | xmmsv_c2c_message_get_sender (xmmsv_t *msg) |
Extract the sender id from a c2c message. More... | |
int | xmmsv_c2c_message_get_destination (xmmsv_t *msg) |
Extract the destination id from a c2c message. More... | |
xmmsv_t * | xmmsv_c2c_message_get_payload (xmmsv_t *msg) |
Extract the payload from a c2c message. More... | |
xmmsv_t * | xmmsv_c2c_message_format (int sender, int dest, int id, xmmsv_t *payload) |
Format a client-to-client message. More... | |
#define GEN_C2C_FIELD_GET_FUNC | ( | field, | |
getter, | |||
ctype, | |||
failval | |||
) |
Format a client-to-client message.
Messages are dictionaries of the form:
"sender" : id of the sender client
"destination" : id of the destination client
"id" : 0 if the message doesn't expect reply, else a message id
"payload" : the contents of the message
sender | the id of the sender client |
dest | the id of the destination client |
id | the id of the message |
payload | the contents of the message |
int xmmsv_c2c_message_get_destination | ( | xmmsv_t * | msg | ) |
Extract the destination id from a c2c message.
msg | The client-to-client-message. |
int xmmsv_c2c_message_get_id | ( | xmmsv_t * | msg | ) |
Extract the id from a c2c message.
msg | The client-to-client message. |
Extract the payload from a c2c message.
msg | The client-to-client message. |
int xmmsv_c2c_message_get_sender | ( | xmmsv_t * | msg | ) |
Extract the sender id from a c2c message.
msg | The client-to-client message. |