aboutsummaryrefslogtreecommitdiffstats
path: root/src/client_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client_internal.h')
-rw-r--r--src/client_internal.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/client_internal.h b/src/client_internal.h
index 2b1b92433..ba97e4b8f 100644
--- a/src/client_internal.h
+++ b/src/client_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -21,17 +21,25 @@
#define MPD_CLIENT_INTERNAL_H
#include "client.h"
+#include "client_message.h"
#include "command.h"
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "client"
+enum {
+ CLIENT_MAX_SUBSCRIPTIONS = 16,
+ CLIENT_MAX_MESSAGES = 64,
+};
+
struct deferred_buffer {
size_t size;
char data[sizeof(long)];
};
struct client {
+ struct player_control *player_control;
+
GIOChannel *channel;
guint source_id;
@@ -67,6 +75,28 @@ struct client {
/** idle flags that the client wants to receive */
unsigned idle_subscriptions;
+
+ /**
+ * A list of channel names this client is subscribed to.
+ */
+ GSList *subscriptions;
+
+ /**
+ * The number of subscriptions in #subscriptions. Used to
+ * limit the number of subscriptions.
+ */
+ unsigned num_subscriptions;
+
+ /**
+ * A list of messages this client has received in reverse
+ * order (latest first).
+ */
+ GSList *messages;
+
+ /**
+ * The number of messages in #messages.
+ */
+ unsigned num_messages;
};
extern unsigned int client_max_connections;