aboutsummaryrefslogtreecommitdiffstats
path: root/src/client_internal.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-01-29 09:26:22 +0100
committerMax Kellermann <max@duempel.org>2011-01-29 10:43:54 +0100
commitf8b09c194fe20192c4ac45697e9d0f00e8a96c2c (patch)
treed45c30ce117a7e01431078305ffe2e96d016dc5c /src/client_internal.h
parent0e69ad32c16eb6449a8952f894c6f239f2e2c52f (diff)
downloadmpd-f8b09c194fe20192c4ac45697e9d0f00e8a96c2c.tar.gz
mpd-f8b09c194fe20192c4ac45697e9d0f00e8a96c2c.tar.xz
mpd-f8b09c194fe20192c4ac45697e9d0f00e8a96c2c.zip
protocol: support client-to-client communication
Diffstat (limited to 'src/client_internal.h')
-rw-r--r--src/client_internal.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/client_internal.h b/src/client_internal.h
index d675ed7c6..ba97e4b8f 100644
--- a/src/client_internal.h
+++ b/src/client_internal.h
@@ -21,11 +21,17 @@
#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)];
@@ -69,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;