21 #ifndef SOUNDMANAGER_H 22 #define SOUNDMANAGER_H 25 #define AFB_BINDING_VERSION 2 26 #include <afb/afb-binding.h> 27 #include "dbus/audio_manager_interface.h" 31 struct afb_event*
event;
67 void connect (
struct afb_req request);
386 const struct afb_verb_v2 binding_verbs[]= {
388 { .verb =
"stream_open", .callback =
streamOpen, .auth = NULL,
389 .info =
"Open stream." , .session = AFB_SESSION_NONE},
390 { .verb =
"stream_close", .callback =
streamClose, .auth = NULL,
391 .info =
"Close stream" , .session = AFB_SESSION_NONE},
392 { .verb =
"set_stream_state", .callback =
setStreamState, .auth = NULL,
393 .info =
"Set stream state" , .session = AFB_SESSION_NONE},
395 { .verb =
"connect", .callback =
connect, .auth = NULL,
396 .info =
"Connect source id and sink id" , .session = AFB_SESSION_NONE},
397 { .verb =
"disconnect", .callback =
disconnect, .auth = NULL,
398 .info =
"Disconnect source id and sink id" , .session = AFB_SESSION_NONE},
399 { .verb =
"setVolume", .callback =
setVolume, .auth = NULL,
400 .info =
"Set volume value" , .session = AFB_SESSION_NONE},
401 { .verb =
"volumeStep", .callback =
volumeStep, .auth = NULL,
402 .info =
"Set volume step range" , .session = AFB_SESSION_NONE},
404 .info =
"Set Mute state: 1 means mute, 2 means umute. Others are invalid" ,.session = AFB_SESSION_NONE},
406 .info =
"Get MainConnection List" , .session = AFB_SESSION_NONE},
408 .info =
"Get MainSink List" , .session = AFB_SESSION_NONE},
410 .info =
"Get MainSource List" , .session = AFB_SESSION_NONE},
411 { .verb =
"registerSource", .callback =
registerSource, .auth = NULL,
412 .info =
"Register autio role" , .session = AFB_SESSION_NONE},
414 .info =
"Deregister audio role" , .session = AFB_SESSION_NONE},
415 { .verb =
"ackConnect", .callback =
ackConnect, .auth = NULL,
416 .info =
"Acknowledge of asyncConnect" , .session = AFB_SESSION_NONE},
417 { .verb =
"ackDisconnect", .callback =
ackDisconnect, .auth = NULL,
418 .info =
"Acknowledge of asyncConnect" , .session = AFB_SESSION_NONE},
420 .info =
"Acknowledge of asyncSetSourceState" , .session = AFB_SESSION_NONE},
421 { .verb =
"subscribe", .callback =
subscribe, .auth = NULL,
422 .info =
"Subscribe event" , .session = AFB_SESSION_NONE},
423 { .verb =
"unsubscribe", .callback =
unsubscribe, .auth = NULL,
424 .info =
"Unsubscribe event" , .session = AFB_SESSION_NONE},
429 void onevent(
const char *
event,
struct json_object *
object);
431 const struct afb_binding_v2 afbBindingV2 = {
432 .api =
"soundmanager",
433 .specification = NULL,
434 .verbs = binding_verbs,
440 #endif //SOUNDMANAGER_H void ackConnect(struct afb_req request)
void setSinkMuteState(struct afb_req request)
void streamOpen(struct afb_req req)
void subscribe(struct afb_req request)
void unsubscribe(struct afb_req request)
void ackDisconnect(struct afb_req request)
void ackSetSourceState(struct afb_req request)
void getListMainSources(struct afb_req request)
void disconnect(struct afb_req request)
void volumeStep(struct afb_req request)
void setStreamState(struct afb_req req)
void registerSource(struct afb_req request)
void streamClose(struct afb_req req)
void deregisterSource(struct afb_req request)
void getListMainSinks(struct afb_req request)
void connect(struct afb_req request)
void setVolume(struct afb_req request)
void getListMainConnections(struct afb_req request)