aboutsummaryrefslogtreecommitdiffstats
path: root/src/Idle.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Idle.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/Idle.cxx b/src/Idle.cxx
index 840a5d4e5..8fe672200 100644
--- a/src/Idle.cxx
+++ b/src/Idle.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@
#include "config.h"
#include "Idle.hxx"
#include "GlobalEvents.hxx"
+#include "util/ASCII.hxx"
#include <atomic>
@@ -44,6 +45,8 @@ static const char *const idle_names[] = {
"update",
"subscription",
"message",
+ "neighbor",
+ "mount",
nullptr
};
@@ -69,3 +72,15 @@ idle_get_names(void)
{
return idle_names;
}
+
+unsigned
+idle_parse_name(const char *name)
+{
+ assert(name != nullptr);
+
+ for (unsigned i = 0; idle_names[i] != nullptr; ++i)
+ if (StringEqualsCaseASCII(name, idle_names[i]))
+ return 1 << i;
+
+ return 0;
+}