XMMS2
|
00001 /* XMMS2 - X Music Multiplexer System 00002 * Copyright (C) 2003-2011 XMMS2 Team 00003 * 00004 * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 */ 00016 00017 #ifndef __XMMS_IPC_MSG_H__ 00018 #define __XMMS_IPC_MSG_H__ 00019 00020 #include "xmmsc/xmmsc_compiler.h" 00021 #include "xmmsc/xmmsc_stdint.h" 00022 #include "xmmsc/xmmsc_stdbool.h" 00023 #include "xmmsc/xmmsc_util.h" 00024 #include "xmmsc/xmmsc_ipc_transport.h" 00025 #include "xmmsc/xmmsv_coll.h" 00026 #include "xmmsc/xmmsv.h" 00027 00028 #define XMMS_IPC_MSG_DEFAULT_SIZE 128 /*32768*/ 00029 #define XMMS_IPC_MSG_HEAD_LEN 16 /* all but data */ 00030 00031 typedef struct xmms_ipc_msg_St xmms_ipc_msg_t; 00032 00033 uint32_t xmms_ipc_msg_get_object (const xmms_ipc_msg_t *msg); 00034 uint32_t xmms_ipc_msg_get_cmd (const xmms_ipc_msg_t *msg); 00035 uint32_t xmms_ipc_msg_get_cookie (const xmms_ipc_msg_t *msg); 00036 void xmms_ipc_msg_set_cookie (xmms_ipc_msg_t *msg, uint32_t cookie); 00037 00038 xmms_ipc_msg_t *xmms_ipc_msg_new (uint32_t object, uint32_t cmd); 00039 xmms_ipc_msg_t * xmms_ipc_msg_alloc (void); 00040 void xmms_ipc_msg_destroy (xmms_ipc_msg_t *msg); 00041 00042 bool xmms_ipc_msg_write_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected); 00043 bool xmms_ipc_msg_read_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected); 00044 00045 uint32_t xmms_ipc_msg_put_value (xmms_ipc_msg_t *msg, xmmsv_t* v); 00046 00047 bool xmms_ipc_msg_get_value (xmms_ipc_msg_t *msg, xmmsv_t **val); 00048 00049 #endif