XMMS2
xmmsc_ipc_msg.h
Go to the documentation of this file.
1 /* XMMS2 - X Music Multiplexer System
2  * Copyright (C) 2003-2009 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_length (const xmms_ipc_msg_t *msg);
34 uint32_t xmms_ipc_msg_get_object (const xmms_ipc_msg_t *msg);
35 uint32_t xmms_ipc_msg_get_cmd (const xmms_ipc_msg_t *msg);
36 uint32_t xmms_ipc_msg_get_cookie (const xmms_ipc_msg_t *msg);
37 void xmms_ipc_msg_set_length (xmms_ipc_msg_t *msg, uint32_t len);
38 void xmms_ipc_msg_set_cookie (xmms_ipc_msg_t *msg, uint32_t cookie);
39 void xmms_ipc_msg_set_cmd (xmms_ipc_msg_t *msg, uint32_t cmd);
40 void xmms_ipc_msg_set_object (xmms_ipc_msg_t *msg, uint32_t object);
41 
42 xmms_ipc_msg_t *xmms_ipc_msg_new (uint32_t object, uint32_t cmd);
45 
46 bool xmms_ipc_msg_write_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected);
47 bool xmms_ipc_msg_read_transport (xmms_ipc_msg_t *msg, xmms_ipc_transport_t *transport, bool *disconnected);
48 
50 
52 
53 #endif
struct xmmsv_St xmmsv_t
Definition: xmmsv.h:51
void xmms_ipc_msg_set_cookie(xmms_ipc_msg_t *msg, uint32_t cookie)
Definition: msg.c:179
xmms_ipc_msg_t * xmms_ipc_msg_alloc(void)
Definition: msg.c:96
bool xmms_ipc_msg_get_value(xmms_ipc_msg_t *msg, xmmsv_t **val)
Definition: msg.c:961
uint32_t xmms_ipc_msg_get_cmd(const xmms_ipc_msg_t *msg)
Definition: msg.c:163
void xmms_ipc_msg_set_cmd(xmms_ipc_msg_t *msg, uint32_t cmd)
Definition: msg.c:171
void xmms_ipc_msg_destroy(xmms_ipc_msg_t *msg)
Definition: msg.c:122
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:109
void xmms_ipc_msg_set_object(xmms_ipc_msg_t *msg, uint32_t object)
Definition: msg.c:155
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:201
uint32_t xmms_ipc_msg_get_length(const xmms_ipc_msg_t *msg)
Definition: msg.c:139
uint32_t xmms_ipc_msg_put_value(xmms_ipc_msg_t *msg, xmmsv_t *v)
Definition: msg.c:470
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:246
uint32_t xmms_ipc_msg_get_object(const xmms_ipc_msg_t *msg)
Definition: msg.c:147
void xmms_ipc_msg_set_length(xmms_ipc_msg_t *msg, uint32_t len)
Definition: msg.c:131
uint32_t xmms_ipc_msg_get_cookie(const xmms_ipc_msg_t *msg)
Definition: msg.c:185