X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2Fsoundmanager.git;a=blobdiff_plain;f=doc%2Fapi-ref%2Fhtml%2Fclass_lib_soundmanager.html;fp=doc%2Fapi-ref%2Fhtml%2Fclass_lib_soundmanager.html;h=013af0d9756d1655ac81a00ce2569a8f5b633b69;hp=0000000000000000000000000000000000000000;hb=f743c3428f41b8d127e538ea8a6505a0c882cdb2;hpb=afc9a6768f5c3cbfdd36b73a0d65378c40d2af85 diff --git a/doc/api-ref/html/class_lib_soundmanager.html b/doc/api-ref/html/class_lib_soundmanager.html new file mode 100644 index 0000000..013af0d --- /dev/null +++ b/doc/api-ref/html/class_lib_soundmanager.html @@ -0,0 +1,532 @@ + + +
+ + + + +
+ Sound Manager
+
+ |
+
#include <libsoundmanager.hpp>
+Public Member Functions | |
LibSoundmanager (const int port, const std::string &token) | |
~LibSoundmanager () | |
void | register_callback (void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents)) |
int | run_eventloop () |
int | call (const std::string &verb, struct json_object *arg) |
int | call_sync (const std::string &verb, struct json_object *arg, struct json_object *ret) |
int | subscribe (const std::string &event_name) |
int | unsubscribe (const std::string &event_name) |
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) |
Definition at line 62 of file libsoundmanager.hpp.
+LibSoundmanager::LibSoundmanager | +( | +const int | +port, | +
+ | + | const std::string & | +token | +
+ | ) | ++ |
LibSoundmanager::~LibSoundmanager | +( | +) | ++ |
Definition at line 93 of file libsoundmanager.cpp.
+ +int LibSoundmanager::call | +( | +const std::string & | +verb, | +
+ | + | struct json_object * | +arg | +
+ | ) | ++ |
This function calls the API of Audio Manager via WebSocket
+To call Audio Manager's APIs, the application should set its function name, arguments to JSON format.
+ +Definition at line 217 of file libsoundmanager.cpp.
+ +int LibSoundmanager::call_sync | +( | +const std::string & | +verb, | +
+ | + | struct json_object * | +arg, | +
+ | + | struct json_object * | +ret | +
+ | ) | ++ |
Definition at line 236 of file libsoundmanager.cpp.
+ +void LibSoundmanager::on_call | +( | +void * | +closure, | +
+ | + | const char * | +api, | +
+ | + | const char * | +verb, | +
+ | + | struct afb_wsj1_msg * | +msg | +
+ | ) | ++ |
Definition at line 347 of file libsoundmanager.cpp.
+ +void LibSoundmanager::on_event | +( | +void * | +closure, | +
+ | + | const char * | +event, | +
+ | + | struct afb_wsj1_msg * | +msg | +
+ | ) | ++ |
Definition at line 358 of file libsoundmanager.cpp.
+ +void LibSoundmanager::on_hangup | +( | +void * | +closure, | +
+ | + | struct afb_wsj1 * | +wsj | +
+ | ) | ++ |
Definition at line 342 of file libsoundmanager.cpp.
+ +void LibSoundmanager::on_reply | +( | +void * | +closure, | +
+ | + | struct afb_wsj1_msg * | +msg | +
+ | ) | ++ |
Definition at line 369 of file libsoundmanager.cpp.
+ +void LibSoundmanager::register_callback | +( | +void(*)(const std::string &event, struct json_object *event_contents) | +event_cb, | +
+ | + | void(*)(struct json_object *reply_contents) | +reply_cb | +
+ | ) | ++ |
This function register callback function for reply/event message from sound manager
+Event callback is invoked by sound manager for event you subscribed. If you would like to get event, please call subscribe function before/after this function
+ +Definition at line 119 of file libsoundmanager.cpp.
+ +int LibSoundmanager::run_eventloop | +( | +) | ++ |
This function start receiving the reply/event message from sound manager
+Nothing
Definition at line 182 of file libsoundmanager.cpp.
+ +int LibSoundmanager::subscribe | +( | +const std::string & | +event_name | ) | ++ |
Register callback function for each event
+This function enables to get an event to your callback function. Regarding the list of event name, please refer to CommandSender API and RountingSender API.
+ +Definition at line 255 of file libsoundmanager.cpp.
+ +int LibSoundmanager::unsubscribe | +( | +const std::string & | +event_name | ) | ++ |
Unregister callback function for each event
+This function disables to get an event to your callback function.
+ +Definition at line 284 of file libsoundmanager.cpp.
+ +