XMMS2
xmmsc_ipc_msg.h
Go to the documentation of this file.
1 /* XMMS2 - X Music Multiplexer System
2  * Copyright (C) 2003-2011 XMMS2 Team
3  *
4  * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  */
16 
17 #ifndef __XMMS_IPC_MSG_H__
18 #define __XMMS_IPC_MSG_H__
19 
20 #include "xmmsc/xmmsc_compiler.h"
21 #include "xmmsc/xmmsc_stdint.h"
22 #include "xmmsc/xmmsc_stdbool.h"
23 #include "xmmsc/xmmsc_util.h"
25 #include "xmmsc/xmmsv_coll.h"
26 #include "xmmsc/xmmsv.h"
27 
28 #define XMMS_IPC_MSG_DEFAULT_SIZE 128 /*32768*/
29 #define XMMS_IPC_MSG_HEAD_LEN 16 /* all but data */
30 
31 typedef struct xmms_ipc_msg_St xmms_ipc_msg_t;
32 
33 uint32_t xmms_ipc_msg_get_object (const xmms_ipc_msg_t *msg);
34 uint32_t xmms_ipc_msg_get_cmd (const xmms_ipc_msg_t *msg);
35 uint32_t xmms_ipc_msg_get_cookie (const xmms_ipc_msg_t *msg);
36 void xmms_ipc_msg_set_cookie (xmms_ipc_msg_t *msg, uint32_t cookie);
37 
38 xmms_ipc_msg_t *xmms_ipc_msg_new (uint32_t object, uint32_t cmd);
41 
42 bool xmms_ipc_msg_write_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected);
43 bool xmms_ipc_msg_read_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected);
44 
46 
48 
49 #endif
void xmms_ipc_msg_set_cookie(xmms_ipc_msg_t *msg, uint32_t cookie)
Definition: msg.c:137
xmms_ipc_msg_t * xmms_ipc_msg_alloc(void)
Definition: msg.c:41
bool xmms_ipc_msg_get_value(xmms_ipc_msg_t *msg, xmmsv_t **val)
Definition: msg.c:291
struct xmmsv_St xmmsv_t
Definition: xmmsv_general.h:48
uint32_t xmms_ipc_msg_get_cmd(const xmms_ipc_msg_t *msg)
Definition: msg.c:114
void xmms_ipc_msg_destroy(xmms_ipc_msg_t *msg)
Definition: msg.c:54
struct xmms_ipc_msg_St xmms_ipc_msg_t
Definition: xmmsc_ipc_msg.h:31
xmms_ipc_msg_t * xmms_ipc_msg_new(uint32_t object, uint32_t cmd)
Definition: msg.c:158
bool xmms_ipc_msg_write_transport(xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected)
Try to write message to transport.
Definition: msg.c:180
uint32_t xmms_ipc_msg_put_value(xmms_ipc_msg_t *msg, xmmsv_t *v)
Definition: msg.c:281
bool xmms_ipc_msg_read_transport(xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected)
Try to read message from transport into msg.
Definition: msg.c:226
uint32_t xmms_ipc_msg_get_object(const xmms_ipc_msg_t *msg)
Definition: msg.c:91
uint32_t xmms_ipc_msg_get_cookie(const xmms_ipc_msg_t *msg)
Definition: msg.c:145