diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-27 15:47:56 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-29 11:27:37 +0900 |
commit | fafad52781050c8660bd41886627e50045c54740 (patch) | |
tree | 1e8a73bc9dfbd8173eccf0ebf39416324ebef76a /src/libsoundmanager.hpp | |
parent | c88c23da5b126577a24ac1fa4a0ff69ca24501d9 (diff) |
Add new APIsneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin_12.90.0marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.1marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.0koi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.0jellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish_9.99.1jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.2jellyfish/9.99.1icefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.1halibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut_7.99.3halibut_7.99.2halibut_7.99.1halibut_7.90.0halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.0halibut/7.99.3halibut/7.99.2halibut/7.99.1halibut/7.90.0guppy_6.99.4guppy_6.99.3guppy_6.99.2guppy_6.99.1guppy_6.90.0guppy/6.99.4guppy/6.99.3guppy/6.99.2guppy/6.99.1guppy/6.90.0flounder_5.99.6flounder_5.99.5flounder_5.99.4flounder_5.99.3flounder_5.99.2flounder/5.99.6flounder/5.99.5flounder/5.99.4flounder/5.99.3flounder/5.99.29.99.49.99.39.99.29.99.18.99.58.99.48.99.38.99.28.99.18.0.68.0.58.0.48.0.38.0.28.0.18.0.07.99.37.99.27.99.17.90.06.99.46.99.36.99.26.99.16.90.05.99.65.99.55.99.45.99.35.99.213.93.012.93.012.92.012.91.012.90.112.90.011.92.011.91.010.93.010.92.010.91.0halibut
High level API
* stream_open
* stream_close
* set_stream_state
Get functions
* getListMainSinks
* getListMainSources
* getListMainConnections
New event
* stream_state_event
Related Change:
https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps/agl-service-soundmanager-2017.git;a=commit;h=a5da9bcbc5b3eb9a23cb97c8d3ef711c713e6c83
v2: Consolidate the coding style into camelCase.
Change-Id: I65b6159ffce57d71588c6edd7bed9d5b0a17d19a
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/libsoundmanager.hpp')
-rw-r--r-- | src/libsoundmanager.hpp | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/src/libsoundmanager.hpp b/src/libsoundmanager.hpp index 96346e8..7a20f57 100644 --- a/src/libsoundmanager.hpp +++ b/src/libsoundmanager.hpp @@ -39,13 +39,22 @@ public: 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); + struct sd_event* getEventLoop(); /* Method */ - int registerSource(const std::string& sourceName); - int connect(int sourceID, int sinkID); - int connect(int sourceID, const std::string& sinkName); - int disconnect(int connectionID); - int ackSetSourceState(int handle, int error); + int registerSource(const std::string& audio_role); + int connect(int source_id, int sink_id); + int connect(int source_id, const std::string& sink_name); + int disconnect(int connection_id); + int ackSetSourceState(int handle, int error = 0); + int getListMainSources(); + int getListMainSinks(); + int getListMainConnections(); + + int streamOpen(const std::string& audio_role, int endpoint_id); + int streamOpen(const std::string& audio_role, const std::string& endpoint_id = "default"); + int streamClose(int stream_id); + int setStreamState(int stream_id, int mute_state = 0); // 0 is unmute, 1 is mute int call(const std::string& verb, struct json_object* arg); int call(const char* verb, struct json_object* arg); @@ -53,8 +62,8 @@ public: int unsubscribe(const std::string& event_name); private: - int init_event(); - int initialize_websocket(); + int initEvent(); + int initializeWebsocket(); void (*onEvent)(const std::string& event, struct json_object* event_contents); void (*onReply)(struct json_object* reply); @@ -68,11 +77,11 @@ private: std::vector<int> msourceIDs; public: - /* Don't use/ Internal only */ - void on_hangup(void *closure, struct afb_wsj1 *wsj); - void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg); - void on_event(void *closure, const char *event, struct afb_wsj1_msg *msg); - void on_reply(void *closure, struct afb_wsj1_msg *msg); + /* Don't use. Internal only */ + void _onHangup(void *closure, struct afb_wsj1 *wsj); + void _onCall(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg); + void _onEvent(void *closure, const char *event, struct afb_wsj1_msg *msg); + void _onReply(void *closure, struct afb_wsj1_msg *msg); }; #endif /* LIBSOUNDMANAGER_H */ |