From f8b09c194fe20192c4ac45697e9d0f00e8a96c2c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 29 Jan 2011 09:26:22 +0100 Subject: protocol: support client-to-client communication --- src/client_internal.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/client_internal.h') 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; -- cgit v1.2.3