aboutsummaryrefslogtreecommitdiffstats
path: root/src/ClientInternal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-15 10:11:08 +0100
committerMax Kellermann <max@duempel.org>2013-01-15 10:59:28 +0100
commit1e2018ce831654f5bf649c5ae4d2e9b003c5a52e (patch)
tree3b9a26135f1a2598f0dcf77f72ea2beb7cb59162 /src/ClientInternal.hxx
parent3fcf17cb79c1bbec631c1a440eb05953ece87b0d (diff)
downloadmpd-1e2018ce831654f5bf649c5ae4d2e9b003c5a52e.tar.gz
mpd-1e2018ce831654f5bf649c5ae4d2e9b003c5a52e.tar.xz
mpd-1e2018ce831654f5bf649c5ae4d2e9b003c5a52e.zip
Client: move connection functions into the class
Diffstat (limited to '')
-rw-r--r--src/ClientInternal.hxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ClientInternal.hxx b/src/ClientInternal.hxx
index 788d90d7b..7d2edf046 100644
--- a/src/ClientInternal.hxx
+++ b/src/ClientInternal.hxx
@@ -112,6 +112,15 @@ public:
bool IsSubscribed(const char *channel_name) const {
return subscriptions.find(channel_name) != subscriptions.end();
}
+
+
+ gcc_pure
+ bool IsExpired() const {
+ return channel == nullptr;
+ }
+
+ void Close();
+ void SetExpired();
};
extern unsigned int client_max_connections;
@@ -119,12 +128,6 @@ extern int client_timeout;
extern size_t client_max_command_list_size;
extern size_t client_max_output_buffer_size;
-void
-client_close(Client *client);
-
-void
-client_set_expired(Client *client);
-
/**
* Schedule an "expired" check for all clients: permanently delete
* clients which have been set "expired" with client_set_expired().