Mercurial > audlegacy
annotate audacious/controlsocket.h @ 2105:f18a5b617c34 trunk
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
allowed to do this, so we are.
author | nenolod |
---|---|
date | Tue, 12 Dec 2006 08:38:32 -0800 |
parents | 705d4c089fce |
children | 63af5b9c5026 |
rev | line source |
---|---|
0 | 1 /* BMP - Cross-platform multimedia player |
2 * Copyright (C) 2003-2004 BMP development team. | |
3 * | |
4 * Based on XMMS: | |
5 * Copyright (C) 1998-2003 XMMS development team. | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
2105
f18a5b617c34
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents:
1459
diff
changeset
|
9 * the Free Software Foundation; under version 2 of the License. |
0 | 10 * |
11 * This program 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 | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
1459 | 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 19 */ |
20 | |
21 #ifndef CONTROLSOCKET_H | |
22 #define CONTROLSOCKET_H | |
23 | |
24 #include <glib.h> | |
25 | |
26 #define XMMS_PROTOCOL_VERSION 1 | |
27 | |
217
ac3fb5691ddc
[svn] Rename controlsocket to audacious, from xmms, so that xmms stuff wont crash us.
nenolod
parents:
0
diff
changeset
|
28 #define CTRLSOCKET_NAME "audacious" |
0 | 29 #define CTRLSOCKET_IO_TIMEOUT_USEC 100000 |
30 | |
31 enum { | |
32 CMD_GET_VERSION, CMD_PLAYLIST_ADD, CMD_PLAY, CMD_PAUSE, CMD_STOP, | |
33 CMD_IS_PLAYING, CMD_IS_PAUSED, CMD_GET_PLAYLIST_POS, | |
34 CMD_SET_PLAYLIST_POS, CMD_GET_PLAYLIST_LENGTH, CMD_PLAYLIST_CLEAR, | |
35 CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_GET_VOLUME, | |
36 CMD_SET_VOLUME, CMD_GET_SKIN, CMD_SET_SKIN, CMD_GET_PLAYLIST_FILE, | |
37 CMD_GET_PLAYLIST_TITLE, CMD_GET_PLAYLIST_TIME, CMD_GET_INFO, | |
38 CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE, | |
39 CMD_EQ_WIN_TOGGLE, CMD_SHOW_PREFS_BOX, CMD_TOGGLE_AOT, | |
40 CMD_SHOW_ABOUT_BOX, CMD_EJECT, CMD_PLAYLIST_PREV, CMD_PLAYLIST_NEXT, | |
41 CMD_PING, CMD_GET_BALANCE, CMD_TOGGLE_REPEAT, CMD_TOGGLE_SHUFFLE, | |
42 CMD_MAIN_WIN_TOGGLE, CMD_PLAYLIST_ADD_URL_STRING, | |
43 CMD_IS_EQ_WIN, CMD_IS_PL_WIN, CMD_IS_MAIN_WIN, CMD_PLAYLIST_DELETE, | |
44 CMD_IS_REPEAT, CMD_IS_SHUFFLE, | |
45 CMD_GET_EQ, CMD_GET_EQ_PREAMP, CMD_GET_EQ_BAND, | |
46 CMD_SET_EQ, CMD_SET_EQ_PREAMP, CMD_SET_EQ_BAND, | |
47 CMD_QUIT, CMD_PLAYLIST_INS_URL_STRING, CMD_PLAYLIST_INS, CMD_PLAY_PAUSE, | |
48 CMD_PLAYQUEUE_ADD, CMD_GET_PLAYQUEUE_LENGTH, CMD_PLAYQUEUE_REMOVE, | |
49 CMD_TOGGLE_ADVANCE, CMD_IS_ADVANCE, | |
984 | 50 CMD_ACTIVATE, CMD_SHOW_JTF_BOX, |
51 CMD_PLAYQUEUE_CLEAR, CMD_PLAYQUEUE_IS_QUEUED, | |
52 CMD_PLAYQUEUE_GET_POS, CMD_PLAYQUEUE_GET_QPOS | |
0 | 53 }; |
54 | |
55 | |
56 typedef struct { | |
57 guint16 version; | |
58 guint16 command; | |
59 guint32 data_length; | |
60 } ClientPktHeader; | |
61 | |
62 typedef struct { | |
63 guint16 version; | |
64 guint32 data_length; | |
65 } ServerPktHeader; | |
66 | |
67 typedef struct { | |
68 ClientPktHeader hdr; | |
69 gpointer data; | |
70 gint fd; | |
71 } PacketNode; | |
72 | |
73 | |
74 gboolean ctrlsocket_setup(void); | |
1443 | 75 gboolean ctrlsocket_setup_unix(void); |
76 gboolean ctrlsocket_setup_tcp(void); | |
0 | 77 void ctrlsocket_start(void); |
78 void ctrlsocket_check(void); | |
79 void ctrlsocket_cleanup(void); | |
80 gint ctrlsocket_get_session_id(void); | |
81 | |
82 #endif |