aboutsummaryrefslogtreecommitdiffstats
path: root/src/sm-helper.h
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-06 10:59:44 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-06 08:48:52 +0000
commita5da9bcbc5b3eb9a23cb97c8d3ef711c713e6c83 (patch)
tree215f7feb8accabb148a8a69e23397d5b3b0289ab /src/sm-helper.h
parent0c458cecd936c4263f46fe582afb91df7f5ed61c (diff)
* stream_close key : stream_id Calls disconnect function * set_stream_state key : stream_id key : mute value: 0 = unmute, 1 = mute Calls connect when mute is set to 0, then "stream_state_event" is published if success. This event is same as asyncSetSourceState like here. "event":"soundmanager\/stream_state_event", "data":{ "handle":value1, "sourceID":value2, "sourceState":"on|off|paused", "event_name":"ahl_stream_state_event", "stream_id":value1, "state_event":value } asyncSetSourceState is also published. And when mute is set to 1, then calls disconnect. "stream_id" is the returned value when application calls "stream_open". Change-Id: Ib8a032ed2c407605b6015441eccbb7660d9932d8 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/sm-helper.h')
-rw-r--r--src/sm-helper.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/sm-helper.h b/src/sm-helper.h
index a6d09f1..ec35ad2 100644
--- a/src/sm-helper.h
+++ b/src/sm-helper.h
@@ -27,20 +27,21 @@
#define SEND_RESULT_NO_RESP(...) send_result_no_resp(__VA_ARGS__, __FUNCTION__)
static const char* cmd_evlist[] = {
- "volumeChanged",
- "newMainConnection",
- "removedMainConnection",
- "sinkMuteStateChanged",
- "mainConnectionStateChanged"
+ SM_EVENT_VOLUME_CHANGED,
+ SM_EVENT_NEW_MAIN_CONNECTION,
+ SM_EVENT_REMOVED_MAIN_CONNECTION,
+ SM_EVENT_SINK_MUTE_STATE_CHANGED,
+ SM_EVENT_MAIN_CONNECTION_STATE_CHANGED
};
static const char* route_evlist[] = {
/* Routing event*/
- "setRoutingReady",
- "setRoutingRundown",
- "asyncConnect",
- "asyncSetSourceState",
- "asyncDisconnect"
+ SM_EVENT_SET_ROUTING_READY,
+ SM_EVENT_SET_ROUTING_RUNDOWN,
+ SM_EVENT_ASYNC_CONNECT,
+ SM_EVENT_ASYNC_SET_SOURCE_STATE,
+ SM_EVENT_ASYNC_DISCONNECT,
+ SM_EVENT_STREAM_STATE_EVENT
};
REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id);