aboutsummaryrefslogtreecommitdiffstats
path: root/src/client_idle.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-01-29 10:24:20 +0100
committerMax Kellermann <max@duempel.org>2011-01-29 10:43:54 +0100
commit0e69ad32c16eb6449a8952f894c6f239f2e2c52f (patch)
tree2a4ffe797f1673904c86132fdb8f24cac609f02f /src/client_idle.c
parent9b4e14df719bc8d09f178c1749d7af10fe2dd96c (diff)
downloadmpd-0e69ad32c16eb6449a8952f894c6f239f2e2c52f.tar.gz
mpd-0e69ad32c16eb6449a8952f894c6f239f2e2c52f.tar.xz
mpd-0e69ad32c16eb6449a8952f894c6f239f2e2c52f.zip
client_idle: export client_idle_add()
Diffstat (limited to 'src/client_idle.c')
-rw-r--r--src/client_idle.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/client_idle.c b/src/client_idle.c
index 87f12193c..930911d6e 100644
--- a/src/client_idle.c
+++ b/src/client_idle.c
@@ -51,12 +51,9 @@ client_idle_notify(struct client *client)
g_timer_start(client->last_activity);
}
-static void
-client_idle_callback(gpointer data, gpointer user_data)
+void
+client_idle_add(struct client *client, unsigned flags)
{
- struct client *client = data;
- unsigned flags = GPOINTER_TO_UINT(user_data);
-
if (client_is_expired(client))
return;
@@ -68,6 +65,15 @@ client_idle_callback(gpointer data, gpointer user_data)
}
}
+static void
+client_idle_callback(gpointer data, gpointer user_data)
+{
+ struct client *client = data;
+ unsigned flags = GPOINTER_TO_UINT(user_data);
+
+ client_idle_add(client, flags);
+}
+
void client_manager_idle_add(unsigned flags)
{
assert(flags != 0);