summaryrefslogtreecommitdiffstats
path: root/src/libsoundmanager.hpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-27 15:43:38 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-06-27 20:29:06 +0000
commitc88c23da5b126577a24ac1fa4a0ff69ca24501d9 (patch)
tree7c57c0b89f1c72d56a765a50ae2767580ae23c34 /src/libsoundmanager.hpp
parente920aae9f71c0823ab5754b2de8483e157368580 (diff)
Remove useless code Change-Id: I45078cf0369f001d1cb8f28c7158321104498bf4 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/libsoundmanager.hpp')
-rw-r--r--src/libsoundmanager.hpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/libsoundmanager.hpp b/src/libsoundmanager.hpp
index 2632f94..96346e8 100644
--- a/src/libsoundmanager.hpp
+++ b/src/libsoundmanager.hpp
@@ -19,7 +19,6 @@
#include <vector>
#include <map>
#include <string>
-#include <functional>
#include <json-c/json.h>
#include <systemd/sd-event.h>
extern "C"
@@ -36,12 +35,10 @@ public:
Soundmanager(const Soundmanager &) = delete;
Soundmanager &operator=(const Soundmanager &) = delete;
int init(int port, const std::string& token);
-
- using handler_fun = std::function<void(struct json_object*)>;
-
- enum EventType_SM {
- Event_AsyncSetSourceState = 1 /*arg key: {sourceID, handle, sourceState}*/
- };
+ void registerCallback(
+ void (*event_cb)(const std::string& event, struct json_object* event_contents),
+ void (*reply_cb)(struct json_object* reply_contents),
+ void (*hangup_cb)(void) = nullptr);
/* Method */
int registerSource(const std::string& sourceName);
@@ -54,10 +51,6 @@ public:
int call(const char* verb, struct json_object* arg);
int subscribe(const std::string& event_name);
int unsubscribe(const std::string& event_name);
- void registerCallback(
- void (*event_cb)(const std::string& event, struct json_object* event_contents),
- void (*reply_cb)(struct json_object* reply_contents),
- void (*hangup_cb)(void) = nullptr);
private:
int init_event();
@@ -73,8 +66,6 @@ private:
int mport;
std::string mtoken;
std::vector<int> msourceIDs;
- std::map<EventType_SM, handler_fun> handlers;
- EventType_SM const NumItems = (EventType_SM)(Event_AsyncSetSourceState + 1);
public:
/* Don't use/ Internal only */