XmmsClient
Macros | Typedefs | Enumerations | Functions
result.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#include <xmmsclient/xmmsclient.h>
#include <xmmsclientpriv/xmmsclient.h>
#include <xmmsclientpriv/xmmsclient_ipc.h>
#include <xmmsc/xmmsc_idnumbers.h>
#include <xmmsc/xmmsc_errorcodes.h>
#include <xmmsc/xmmsc_stdint.h>
#include <xmmsc/xmmsc_stdbool.h>
#include <xmmscpriv/xmmsv_c2c.h>

Macros

#define GEN_RESULT_NOTIFIER_SET_FUNC(type)
 
#define GEN_RESULT_NOTIFIER_SET_FULL_FUNC(type)
 
#define GEN_RESULT_CALLBACK_NEW_FUNC(name, cbtype)
 

Typedefs

typedef struct
xmmsc_result_callback_St 
xmmsc_result_callback_t
 

Enumerations

enum  xmmsc_result_callback_type_t { XMMSC_RESULT_CALLBACK_DEFAULT, XMMSC_RESULT_CALLBACK_RAW, XMMSC_RESULT_CALLBACK_C2C }
 

Functions

xmmsc_result_txmmsc_result_ref (xmmsc_result_t *res)
 References the xmmsc_result_t. More...
 
xmmsc_result_type_t xmmsc_result_get_class (xmmsc_result_t *res)
 Get the class of the result (default, signal, broadcast). More...
 
void xmmsc_result_disconnect (xmmsc_result_t *res)
 Disconnect all notifiers for a signal or a broadcast result. More...
 
uint32_t xmmsc_result_cookie_get (xmmsc_result_t *res)
 return the cookie of a resultset. More...
 
void xmmsc_result_c2c_set (xmmsc_result_t *res)
 Set a result to be a client-to-client result. More...
 
void xmmsc_result_visc_set (xmmsc_result_t *res, xmmsc_visualization_t *visc)
 
xmmsc_visualization_t * xmmsc_result_visc_get (xmmsc_result_t *res)
 
xmmsc_connection_txmmsc_result_get_connection (xmmsc_result_t *res)
 
void xmmsc_result_unref (xmmsc_result_t *res)
 Decreases the references for the xmmsc_result_t When the number of references reaches 0 it will be freed. More...
 
void xmmsc_result_wait (xmmsc_result_t *res)
 Set up a default callback for the result retrieval. More...
 
xmmsv_txmmsc_result_get_value (xmmsc_result_t *res)
 Get the value from a result. More...
 
void xmmsc_result_seterror (xmmsc_result_t *res, const char *errstr)
 
void xmmsc_result_restartable (xmmsc_result_t *res, uint32_t signalid)
 
void xmmsc_result_run (xmmsc_result_t *res, xmms_ipc_msg_t *msg)
 
xmmsc_result_txmmsc_result_new (xmmsc_connection_t *c, xmmsc_result_type_t type, uint32_t cookie)
 Allocates new xmmsc_result_t and references it. More...
 
void xmmsc_result_clear_weakrefs (xmmsc_result_t *result)
 

Macro Definition Documentation

#define GEN_RESULT_CALLBACK_NEW_FUNC (   name,
  cbtype 
)
Value:
xmmsc_result_callback_new_##name (xmmsc_result_notifier_t f, void *udata, \
{ \
\
cb = x_new0 (xmmsc_result_callback_t, 1); \
if (!cb) { \
x_oom(); \
return NULL; \
} \
\
cb->type = cbtype; \
cb->user_data = udata; \
cb->free_func = free_f; \
cb->func = f; \
\
return cb; \
}

Typedef Documentation

typedef struct xmmsc_result_callback_St xmmsc_result_callback_t

Enumeration Type Documentation

Enumerator
XMMSC_RESULT_CALLBACK_DEFAULT 
XMMSC_RESULT_CALLBACK_RAW 
XMMSC_RESULT_CALLBACK_C2C 

Function Documentation

void xmmsc_result_clear_weakrefs ( xmmsc_result_t result)
xmmsc_result_t* xmmsc_result_new ( xmmsc_connection_t c,
xmmsc_result_type_t  type,
uint32_t  cookie 
)

Allocates new xmmsc_result_t and references it.

Should not be used from a client.

Referenced by xmmsc_c2c_reply(), xmmsc_c2c_send(), xmmsc_send_msg(), and xmmsc_send_msg_no_arg().

void xmmsc_result_restartable ( xmmsc_result_t res,
uint32_t  signalid 
)

Referenced by xmmsc_send_signal_msg().

void xmmsc_result_run ( xmmsc_result_t res,
xmms_ipc_msg_t msg 
)
void xmmsc_result_seterror ( xmmsc_result_t res,
const char *  errstr 
)