aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-28 16:42:40 +0200
committerMax Kellermann <max@duempel.org>2009-07-28 16:42:40 +0200
commitc426bbcf954889883859bdefdb84496416810090 (patch)
tree9e6f75812689824fc6208b5921c2e2ec221de88a /src/client.c
parent6d71094ce5b6d02538b32693b32355d373b46883 (diff)
downloadmpd-c426bbcf954889883859bdefdb84496416810090.tar.gz
mpd-c426bbcf954889883859bdefdb84496416810090.tar.xz
mpd-c426bbcf954889883859bdefdb84496416810090.zip
client: moved struct client to client_internal.h
Prepare splitting client.c into several sources.
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/src/client.c b/src/client.c
index 5e2ef6b4f..68474bb2d 100644
--- a/src/client.c
+++ b/src/client.c
@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "client.h"
+#include "client_internal.h"
#include "fifo_buffer.h"
#include "command.h"
#include "conf.h"
@@ -56,49 +56,6 @@ static int client_timeout;
static size_t client_max_command_list_size;
static size_t client_max_output_buffer_size;
-struct deferred_buffer {
- size_t size;
- char data[sizeof(long)];
-};
-
-struct client {
- GIOChannel *channel;
- guint source_id;
-
- /** the buffer for reading lines from the #channel */
- struct fifo_buffer *input;
-
- unsigned permission;
-
- /** the uid of the client process, or -1 if unknown */
- int uid;
-
- /**
- * How long since the last activity from this client?
- */
- GTimer *last_activity;
-
- GSList *cmd_list; /* for when in list mode */
- int cmd_list_OK; /* print OK after each command execution */
- size_t cmd_list_size; /* mem cmd_list consumes */
- GQueue *deferred_send; /* for output if client is slow */
- size_t deferred_bytes; /* mem deferred_send consumes */
- unsigned int num; /* client number */
-
- char send_buf[4096];
- size_t send_buf_used; /* bytes used this instance */
-
- /** is this client waiting for an "idle" response? */
- bool idle_waiting;
-
- /** idle flags pending on this client, to be sent as soon as
- the client enters "idle" */
- unsigned idle_flags;
-
- /** idle flags that the client wants to receive */
- unsigned idle_subscriptions;
-};
-
static GList *clients;
static unsigned num_clients;
static guint expire_source_id;