diff options
author | Max Kellermann <max@duempel.org> | 2013-01-04 00:50:13 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-04 00:50:13 +0100 |
commit | fb337418a5b8d85306c96ad51d445fd58fb38491 (patch) | |
tree | b2ffd1c9f18bb643238741b72538d1ee5a5a4f8e /src/ClientInternal.hxx | |
parent | 9d312ab208f797a69c8366f4a961d6cb3228cecb (diff) | |
download | mpd-fb337418a5b8d85306c96ad51d445fd58fb38491.tar.gz mpd-fb337418a5b8d85306c96ad51d445fd58fb38491.tar.xz mpd-fb337418a5b8d85306c96ad51d445fd58fb38491.zip |
Client: move code to class CommandListBuilder
Diffstat (limited to 'src/ClientInternal.hxx')
-rw-r--r-- | src/ClientInternal.hxx | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/ClientInternal.hxx b/src/ClientInternal.hxx index 9cbd4a50a..f8944b657 100644 --- a/src/ClientInternal.hxx +++ b/src/ClientInternal.hxx @@ -22,6 +22,7 @@ #include "Client.hxx" #include "ClientMessage.hxx" +#include "CommandListBuilder.hxx" #include "command.h" #include <set> @@ -63,9 +64,8 @@ public: */ 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 */ + CommandListBuilder cmd_list; + GQueue *deferred_send; /* for output if client is slow */ size_t deferred_bytes; /* mem deferred_send consumes */ unsigned int num; /* client number */ @@ -135,21 +135,6 @@ client_list_remove(Client *client); void client_close(Client *client); -static inline void -new_cmd_list_ptr(Client *client, const char *s) -{ - client->cmd_list = g_slist_prepend(client->cmd_list, g_strdup(s)); -} - -static inline void -free_cmd_list(GSList *list) -{ - for (GSList *tmp = list; tmp != NULL; tmp = g_slist_next(tmp)) - g_free(tmp->data); - - g_slist_free(list); -} - void client_set_expired(Client *client); |