XmmsClient
Functions
c2c.c File Reference
#include "xmmsclient/xmmsclient.h"
#include "xmmsclientpriv/xmmsclient.h"
#include "xmmsclientpriv/xmmsclient_ipc.h"
#include "xmmsc/xmmsc_idnumbers.h"

Functions

xmmsc_result_txmmsc_c2c_send (xmmsc_connection_t *c, int dest, xmms_c2c_reply_policy_t reply_policy, xmmsv_t *payload)
 Send a client-to-client message. More...
 
xmmsc_result_txmmsc_c2c_reply (xmmsc_connection_t *c, int msgid, xmms_c2c_reply_policy_t reply_policy, xmmsv_t *payload)
 Reply to a client-to-client message. More...
 
int32_t xmmsc_c2c_get_own_id (xmmsc_connection_t *c)
 Request your own client id. More...
 
xmmsc_result_txmmsc_c2c_get_connected_clients (xmmsc_connection_t *c)
 Request a list of connected client ids. More...
 
xmmsc_result_txmmsc_c2c_ready (xmmsc_connection_t *c)
 Notify the client's api is ready for query. More...
 
xmmsc_result_txmmsc_c2c_get_ready_clients (xmmsc_connection_t *c)
 Request a list of clients ready for c2c communication. More...
 
xmmsc_result_txmmsc_broadcast_c2c_message (xmmsc_connection_t *c)
 Request the client-to-client message broadcast. More...
 
xmmsc_result_txmmsc_broadcast_c2c_ready (xmmsc_connection_t *c)
 Request the client service ready broadcast. More...
 
xmmsc_result_txmmsc_broadcast_c2c_client_connected (xmmsc_connection_t *c)
 Request the client connected broadcast. More...
 
xmmsc_result_txmmsc_broadcast_c2c_client_disconnected (xmmsc_connection_t *c)
 Request the client disconnected broadcast. More...
 

Function Documentation

xmmsc_result_t* xmmsc_broadcast_c2c_client_connected ( xmmsc_connection_t c)

Request the client connected broadcast.

This broadcast gets triggered when a new client connects, and contains the new client's id.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_broadcast_c2c_client_disconnected ( xmmsc_connection_t c)

Request the client disconnected broadcast.

This broadcast gets triggered when a client disconnects, and contains the disconnected client's id.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_broadcast_c2c_message ( xmmsc_connection_t c)

Request the client-to-client message broadcast.

This broadcast gets triggered when messages from other clients are received.

Parameters
cThe connection to the server.

Referenced by xmmsc_sc_init().

xmmsc_result_t* xmmsc_broadcast_c2c_ready ( xmmsc_connection_t c)

Request the client service ready broadcast.

This broadcast gets triggered when a client notify the server its api is ready.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_c2c_get_connected_clients ( xmmsc_connection_t c)

Request a list of connected client ids.

Parameters
cThe connection to the server.
int32_t xmmsc_c2c_get_own_id ( xmmsc_connection_t c)

Request your own client id.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_c2c_get_ready_clients ( xmmsc_connection_t c)

Request a list of clients ready for c2c communication.

Parameters
cThe connection to the server.
xmmsc_result_t* xmmsc_c2c_ready ( xmmsc_connection_t c)

Notify the client's api is ready for query.

xmmsc_result_t* xmmsc_c2c_reply ( xmmsc_connection_t c,
int  msgid,
xmms_c2c_reply_policy_t  reply_policy,
xmmsv_t payload 
)

Reply to a client-to-client message.

Parameters
cThe connection to the server.
msgidThe id of the message you are replying to.
reply_policyWhether to expect no reply, a single reply or multiple replies for this message.
payloadThe contents of the reply.

Referenced by xmmsc_sc_broadcast_emit().

xmmsc_result_t* xmmsc_c2c_send ( xmmsc_connection_t c,
int  dest,
xmms_c2c_reply_policy_t  reply_policy,
xmmsv_t payload 
)

Send a client-to-client message.

Parameters
cThe connection to the server.
reply_policyWhether to expect no reply, a single reply or multiple replies for this message.
payloadThe contents of the message.

Referenced by xmmsc_sc_broadcast_subscribe(), and xmmsc_sc_call().