~ubuntu-branches/ubuntu/wily/xmms2/wily

« back to all changes in this revision

Viewing changes to src/include/xmmsc/xmmsc_ipc_msg.h

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2008-07-04 16:23:34 UTC
  • mfrom: (1.1.5 upstream) (6.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080704162334-b3esbkcapt8wbrk4
Tags: 0.5DrLecter-2ubuntu1
* Merge from debian unstable (LP: #241098), remaining changes:
  + debian/control:
    + Update Maintainer field
    + add lpia to xmms2-plugin-alsa supported architectures
    + Added liba52-0.7.4-dev to build depends
  + debian/rules: Added patch, patch-stamp and unpatch
  + changed 01_gcc4.3.patch:
    + src/include/xmmsclient/xmmsclient++/helpers.h: Added #include <climits>
* New upstream relase fixes LP: #212566, #222341

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  XMMS2 - X Music Multiplexer System
2
 
 *  Copyright (C) 2003-2007 XMMS2 Team
 
2
 *  Copyright (C) 2003-2008 XMMS2 Team
3
3
 *
4
4
 *  PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5
5
 *
25
25
#include "xmmsc/xmmsc_coll.h"
26
26
 
27
27
#define XMMS_IPC_MSG_DEFAULT_SIZE 128 /*32768*/
28
 
#define XMMS_IPC_MSG_MAX_SIZE 327680
29
28
#define XMMS_IPC_MSG_HEAD_LEN 16 /* all but data */
30
29
 
31
30
typedef struct xmms_ipc_msg_St xmms_ipc_msg_t;
46
45
bool xmms_ipc_msg_write_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected);
47
46
bool xmms_ipc_msg_read_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected);
48
47
 
49
 
void* xmms_ipc_msg_put_uint32 (xmms_ipc_msg_t *msg, uint32_t v);
50
 
void* xmms_ipc_msg_put_int32 (xmms_ipc_msg_t *msg, int32_t v);
51
 
void* xmms_ipc_msg_put_float (xmms_ipc_msg_t *msg, float v);
52
 
void* xmms_ipc_msg_put_string (xmms_ipc_msg_t *msg, const char *str);
53
 
void* xmms_ipc_msg_put_string_list (xmms_ipc_msg_t *msg, const char* strings[]);
54
 
void* xmms_ipc_msg_put_collection (xmms_ipc_msg_t *msg, xmmsc_coll_t *coll);
55
 
void* xmms_ipc_msg_put_bin (xmms_ipc_msg_t *msg, const unsigned char *data, unsigned int len);
56
 
void* xmms_ipc_msg_append (xmms_ipc_msg_t *dmsg, xmms_ipc_msg_t *smsg);
57
 
 
58
 
typedef enum {
59
 
        XMMS_IPC_MSG_ARG_TYPE_END,
60
 
        XMMS_IPC_MSG_ARG_TYPE_UINT32,
61
 
        XMMS_IPC_MSG_ARG_TYPE_INT32,
62
 
        XMMS_IPC_MSG_ARG_TYPE_FLOAT,
63
 
        XMMS_IPC_MSG_ARG_TYPE_STRING,
64
 
        XMMS_IPC_MSG_ARG_TYPE_DATA
65
 
} xmms_ipc_msg_arg_type_t;
66
 
 
67
 
#define __XMMS_IPC_MSG_DO_IDENTITY_FUNC(type) static inline type *__xmms_ipc_msg_arg_##type (type *arg) {return arg;}
68
 
__XMMS_IPC_MSG_DO_IDENTITY_FUNC(int32_t)
69
 
__XMMS_IPC_MSG_DO_IDENTITY_FUNC(uint32_t)
70
 
__XMMS_IPC_MSG_DO_IDENTITY_FUNC(float)
71
 
__XMMS_IPC_MSG_DO_IDENTITY_FUNC(char)
72
 
#undef __XMMS_IPC_MSG_DO_IDENTITY_FUNC
73
 
 
74
 
#define XMMS_IPC_MSG_UINT32(a) XMMS_IPC_MSG_ARG_TYPE_UINT32, __xmms_ipc_msg_arg_guint32 (a)
75
 
#define XMMS_IPC_MSG_INT32(a) XMMS_IPC_MSG_ARG_TYPE_INT32, __xmms_ipc_msg_arg_gint32 (a)
76
 
#define XMMS_IPC_MSG_INT64(a) XMMS_IPC_MSG_ARG_TYPE_FLOAT, __xmms_ipc_msg_arg_gint64 (a)
77
 
#define XMMS_IPC_MSG_STRING(a,len) XMMS_IPC_MSG_ARG_TYPE_STRING, ((gint)len), __xmms_ipc_msg_arg_char (a)
78
 
 
79
 
#define XMMS_IPC_MSG_END XMMS_IPC_MSG_ARG_TYPE_END
 
48
uint32_t xmms_ipc_msg_put_uint32 (xmms_ipc_msg_t *msg, uint32_t v);
 
49
uint32_t xmms_ipc_msg_put_int32 (xmms_ipc_msg_t *msg, int32_t v);
 
50
uint32_t xmms_ipc_msg_put_float (xmms_ipc_msg_t *msg, float v);
 
51
uint32_t xmms_ipc_msg_put_string (xmms_ipc_msg_t *msg, const char *str);
 
52
uint32_t xmms_ipc_msg_put_string_list (xmms_ipc_msg_t *msg, const char* strings[]);
 
53
uint32_t xmms_ipc_msg_put_collection (xmms_ipc_msg_t *msg, xmmsc_coll_t *coll);
 
54
uint32_t xmms_ipc_msg_put_bin (xmms_ipc_msg_t *msg, const unsigned char *data, unsigned int len);
 
55
 
 
56
void xmms_ipc_msg_store_uint32 (xmms_ipc_msg_t *msg, uint32_t offset, uint32_t v);
80
57
 
81
58
bool xmms_ipc_msg_get_uint32 (xmms_ipc_msg_t *msg, uint32_t *v);
82
59
bool xmms_ipc_msg_get_int32 (xmms_ipc_msg_t *msg, int32_t *v);