annotate audacious/controlsocket.h @ 1938:1d9c1026d9f8 trunk

[svn] - DoubleSize support. This has bugs, the most notable one being that DoubleSize only works right if you restart the player. The second bug is rather obvious too. No osmosis skinengine. No TinyPlayer. Classic-esque skinengine only. This is because the doublesize algorithm hates you and wants you to go die in a fire.
author nenolod
date Sun, 05 Nov 2006 04:43:16 -0800
parents 705d4c089fce
children f18a5b617c34
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * Based on XMMS:
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * Copyright (C) 1998-2003 XMMS development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 #ifndef CONTROLSOCKET_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #define CONTROLSOCKET_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 #define XMMS_PROTOCOL_VERSION 1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28
217
ac3fb5691ddc [svn] Rename controlsocket to audacious, from xmms, so that xmms stuff wont crash us.
nenolod
parents: 0
diff changeset
29 #define CTRLSOCKET_NAME "audacious"
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 #define CTRLSOCKET_IO_TIMEOUT_USEC 100000
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 enum {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 CMD_GET_VERSION, CMD_PLAYLIST_ADD, CMD_PLAY, CMD_PAUSE, CMD_STOP,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 CMD_IS_PLAYING, CMD_IS_PAUSED, CMD_GET_PLAYLIST_POS,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 CMD_SET_PLAYLIST_POS, CMD_GET_PLAYLIST_LENGTH, CMD_PLAYLIST_CLEAR,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_GET_VOLUME,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 CMD_SET_VOLUME, CMD_GET_SKIN, CMD_SET_SKIN, CMD_GET_PLAYLIST_FILE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 CMD_GET_PLAYLIST_TITLE, CMD_GET_PLAYLIST_TIME, CMD_GET_INFO,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 CMD_EQ_WIN_TOGGLE, CMD_SHOW_PREFS_BOX, CMD_TOGGLE_AOT,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 CMD_SHOW_ABOUT_BOX, CMD_EJECT, CMD_PLAYLIST_PREV, CMD_PLAYLIST_NEXT,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 CMD_PING, CMD_GET_BALANCE, CMD_TOGGLE_REPEAT, CMD_TOGGLE_SHUFFLE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 CMD_MAIN_WIN_TOGGLE, CMD_PLAYLIST_ADD_URL_STRING,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 CMD_IS_EQ_WIN, CMD_IS_PL_WIN, CMD_IS_MAIN_WIN, CMD_PLAYLIST_DELETE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 CMD_IS_REPEAT, CMD_IS_SHUFFLE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 CMD_GET_EQ, CMD_GET_EQ_PREAMP, CMD_GET_EQ_BAND,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 CMD_SET_EQ, CMD_SET_EQ_PREAMP, CMD_SET_EQ_BAND,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 CMD_QUIT, CMD_PLAYLIST_INS_URL_STRING, CMD_PLAYLIST_INS, CMD_PLAY_PAUSE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 CMD_PLAYQUEUE_ADD, CMD_GET_PLAYQUEUE_LENGTH, CMD_PLAYQUEUE_REMOVE,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 CMD_TOGGLE_ADVANCE, CMD_IS_ADVANCE,
984
bcd1ebd0a7c1 [svn] - jumptofile and queue support fun
nhjm449
parents: 217
diff changeset
51 CMD_ACTIVATE, CMD_SHOW_JTF_BOX,
bcd1ebd0a7c1 [svn] - jumptofile and queue support fun
nhjm449
parents: 217
diff changeset
52 CMD_PLAYQUEUE_CLEAR, CMD_PLAYQUEUE_IS_QUEUED,
bcd1ebd0a7c1 [svn] - jumptofile and queue support fun
nhjm449
parents: 217
diff changeset
53 CMD_PLAYQUEUE_GET_POS, CMD_PLAYQUEUE_GET_QPOS
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 guint16 version;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 guint16 command;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 guint32 data_length;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 } ClientPktHeader;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 guint16 version;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 guint32 data_length;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 } ServerPktHeader;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69 ClientPktHeader hdr;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 gpointer data;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 gint fd;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 } PacketNode;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 gboolean ctrlsocket_setup(void);
1443
2f714bee0645 [svn] - prepare for tcp listener code
nenolod
parents: 984
diff changeset
76 gboolean ctrlsocket_setup_unix(void);
2f714bee0645 [svn] - prepare for tcp listener code
nenolod
parents: 984
diff changeset
77 gboolean ctrlsocket_setup_tcp(void);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 void ctrlsocket_start(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 void ctrlsocket_check(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 void ctrlsocket_cleanup(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 gint ctrlsocket_get_session_id(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 #endif