XMMS2
Data Structures | Macros | Typedefs | Functions
xmms_object.h File Reference
#include <glib.h>
#include "xmms/xmms_error.h"
#include "xmmsc/xmmsc_idnumbers.h"
#include "xmmsc/xmmsv.h"
#include "xmmsc/xmmsv_coll.h"

Go to the source code of this file.

Data Structures

struct  xmms_object_St
 
struct  xmms_object_cmd_arg_t
 

Macros

#define XMMS_OBJECT_MID   0x00455574
 
#define XMMS_OBJECT_CMD_MAX_ARGS   6
 
#define XMMS_OBJECT(p)   ((xmms_object_t *)p)
 
#define XMMS_IS_OBJECT(p)   (XMMS_OBJECT (p)->id == XMMS_OBJECT_MID)
 
#define xmms_object_ref(obj)
 
#define xmms_object_unref(obj)
 
#define xmms_object_new(objtype, destroyfunc)   (objtype *) __int_xmms_object_new (sizeof (objtype), destroyfunc)
 

Typedefs

typedef struct xmms_object_St xmms_object_t
 
typedef void(* xmms_object_destroy_func_t) (xmms_object_t *object)
 
typedef void(* xmms_object_handler_t) (xmms_object_t *object, xmmsv_t *data, gpointer userdata)
 
typedef void(* xmms_object_cmd_func_t) (xmms_object_t *object, xmms_object_cmd_arg_t *arg)
 

Functions

xmmsv_txmms_convert_and_kill_list (GList *list)
 
xmmsv_txmms_convert_and_kill_dict (GTree *dict)
 
xmmsv_txmms_convert_and_kill_string (gchar *str)
 
xmmsv_txmms_convert_and_kill_bin (GString *gs)
 
int xmms_bin_to_gstring (xmmsv_t *value, GString **gs)
 
int dummy_identity (xmmsv_t *value, xmmsv_t **arg)
 
gboolean check_string_list (xmmsv_t *list)
 Checks that the list only contains string values. More...
 
void xmms_object_cleanup (xmms_object_t *object)
 Cleanup all the resources for the object. More...
 
void xmms_object_connect (xmms_object_t *object, guint32 signalid, xmms_object_handler_t handler, gpointer userdata)
 Connect to a signal that is emitted by this object. More...
 
void xmms_object_disconnect (xmms_object_t *object, guint32 signalid, xmms_object_handler_t handler, gpointer userdata)
 Disconnect from a signal. More...
 
void xmms_object_emit (xmms_object_t *object, guint32 signalid, xmmsv_t *data)
 Emit a signal and thus call all the handlers that are connected. More...
 
void xmms_object_emit_f (xmms_object_t *object, guint32 signalid, xmmsv_type_t type,...)
 Emits a signal on the current object. More...
 
void xmms_object_cmd_arg_init (xmms_object_cmd_arg_t *arg)
 Initialize a command argument. More...
 
void xmms_object_cmd_add (xmms_object_t *object, guint cmdid, const xmms_object_cmd_func_t desc)
 Add a command that could be called from the client API to a object. More...
 
void xmms_object_cmd_call (xmms_object_t *object, guint cmdid, xmms_object_cmd_arg_t *arg)
 Call a command with argument. More...
 
void __int_xmms_object_unref (xmms_object_t *object)
 
xmms_object_t__int_xmms_object_new (gint size, xmms_object_destroy_func_t destfunc)
 

Macro Definition Documentation

#define XMMS_IS_OBJECT (   p)    (XMMS_OBJECT (p)->id == XMMS_OBJECT_MID)
#define XMMS_OBJECT (   p)    ((xmms_object_t *)p)
#define XMMS_OBJECT_CMD_MAX_ARGS   6

Definition at line 68 of file xmms_object.h.

#define XMMS_OBJECT_MID   0x00455574

Definition at line 29 of file xmms_object.h.

Referenced by __int_xmms_object_new().

#define xmms_object_new (   objtype,
  destroyfunc 
)    (objtype *) __int_xmms_object_new (sizeof (objtype), destroyfunc)
#define xmms_object_ref (   obj)
Value:
do { \
if (obj && XMMS_IS_OBJECT (obj)) { \
g_atomic_int_inc (&(XMMS_OBJECT (obj)->ref)); \
} \
} while (0)
#define XMMS_OBJECT(p)
Definition: xmms_object.h:77
#define XMMS_IS_OBJECT(p)
Definition: xmms_object.h:78

Definition at line 103 of file xmms_object.h.

Referenced by __int_xmms_object_new(), _xmms_medialib_begin(), xmms_visualization_new(), xmms_xform_new(), xmms_xform_outdata_type_copy(), and xmms_xform_outdata_type_set().

#define xmms_object_unref (   obj)
Value:
do { \
if (obj && XMMS_IS_OBJECT (obj)) { \
} \
} while (0)
#define XMMS_OBJECT(p)
Definition: xmms_object.h:77
void __int_xmms_object_unref(xmms_object_t *object)
Definition: object.c:488
#define XMMS_IS_OBJECT(p)
Definition: xmms_object.h:78

Definition at line 109 of file xmms_object.h.

Referenced by xmms_config_shutdown(), xmms_medialib_end(), xmms_output_plugin_switch(), xmms_plugin_shutdown(), xmms_sample_converter_init(), xmms_stream_type_parse(), xmms_xform_browse(), xmms_xform_chain_setup_url(), and xmms_xform_new().

Typedef Documentation

typedef void(* xmms_object_cmd_func_t) (xmms_object_t *object, xmms_object_cmd_arg_t *arg)

Definition at line 75 of file xmms_object.h.

typedef void(* xmms_object_destroy_func_t) (xmms_object_t *object)

Definition at line 36 of file xmms_object.h.

typedef void(* xmms_object_handler_t) (xmms_object_t *object, xmmsv_t *data, gpointer userdata)

Definition at line 66 of file xmms_object.h.

typedef struct xmms_object_St xmms_object_t

Definition at line 34 of file xmms_object.h.

Function Documentation

xmms_object_t* __int_xmms_object_new ( gint  size,
xmms_object_destroy_func_t  destfunc 
)

Definition at line 500 of file object.c.

void __int_xmms_object_unref ( xmms_object_t object)

Definition at line 488 of file object.c.