Sound Manager
0.3
|
Sound Manager API. More...
#include <afb/afb-binding.h>
#include "dbus/audio_manager_interface.h"
Go to the source code of this file.
Data Structures | |
struct | event |
Macros | |
#define | _GNU_SOURCE |
#define | AFB_BINDING_VERSION 2 |
Functions | |
void | connect (struct afb_req request) |
void | disconnect (struct afb_req request) |
void | setVolume (struct afb_req request) |
void | volumeStep (struct afb_req request) |
void | setSinkMuteState (struct afb_req request) |
void | getListMainConnections (struct afb_req request) |
void | getListMainSources (struct afb_req request) |
void | getListMainSinks (struct afb_req request) |
void | ackConnect (struct afb_req request) |
void | ackDisconnect (struct afb_req request) |
void | ackSetSourceState (struct afb_req request) |
void | registerSource (struct afb_req request) |
void | deregisterSource (struct afb_req request) |
void | subscribe (struct afb_req request) |
void | unsubscribe (struct afb_req request) |
void | streamOpen (struct afb_req req) |
void | streamClose (struct afb_req req) |
void | setStreamState (struct afb_req req) |
int | preinit () |
int | sm_init () |
void | onevent (const char *event, struct json_object *object) |
Variables | |
const struct afb_verb_v2 | binding_verbs [] |
const struct afb_binding_v2 | afbBindingV2 |
Sound Manager API.
Definition in file soundmanager.h.
void ackConnect | ( | struct afb_req | request | ) |
Call "ackConnect" function of Audio Manager. Return acknowledge of connect against asyncConnect
void ackDisconnect | ( | struct afb_req | request | ) |
Call "ackDisconnect" function of Audio Manager. Return acknowledge of disconnect against asyncDisconnect
void ackSetSourceState | ( | struct afb_req | request | ) |
Call "ackSetSourceState" function of Audio Manager. Return acknowledge of setSourceState against asyncSetSourceState.
This function is very important for applications to realise the sequence of Audio Management. An Application which matches with sourceID in the parameter of asyncSetSourceState has to return ack to use this function
void connect | ( | struct afb_req | request | ) |
Call "connect" function of Audio Manager. Getting resource right to output audio stream. Please input following keys with value into json string object in argument. In case of using libsoundmanager, json_object *jobj = json_object_new_object(); json_object_object_add(jobj, "sourceID", json_object_new_int(100)); json_object_object_add(jobj, "sinkID", json_object_new_int(100)); call("connect", jobj);
The order of arguments is not important.
Request key
This will be changed in near future because these arguments should be aliased like sinkID:100 -> sinkID:"speaker"
This will be modified after integrating
sourceID and sinkID should be more than 0
void deregisterSource | ( | struct afb_req | request | ) |
Call "deregisterSource" function of Audio Manager. Deregister source(application) to Audio Manager Policy Management
void disconnect | ( | struct afb_req | request | ) |
Call "disconnect" function of Audio Manager. Release resource right to output audio stream.
Request key
sourceID should be more than 0
void getListMainConnections | ( | struct afb_req | request | ) |
Call "getListMainConnections" function of Audio Manager. Get mainc connection list
Request key None
void getListMainSinks | ( | struct afb_req | request | ) |
Call "getListMainSinks" function of Audio Manager. Get main sink list
Request key None
void getListMainSources | ( | struct afb_req | request | ) |
Call "getListMainSources" function of Audio Manager. Get main source list
Request key None
void registerSource | ( | struct afb_req | request | ) |
Call "registerSource" function of Audio Manager. Register source(application) to Audio Manager Policy Management Application must call this function on its initialization
void setSinkMuteState | ( | struct afb_req | request | ) |
Call "volumeStep" function of Audio Manager. Change volume step of sink
Request key
void setStreamState | ( | struct afb_req | req | ) |
Application High Level API for AGL This function set stream state. This function set the availability and calls connect function of Audio Manager and returns the result of policy check.
TODO : write note
void setVolume | ( | struct afb_req | request | ) |
Call "setVolume" function of Audio Manager. Set sink volume.
Request key
void streamClose | ( | struct afb_req | req | ) |
Application High Level API for AGL This function closes "stream". This function calls disconnect with registered connectionID translated with requested connection_id. If the connection is not created in Sound Manager, Sound Manager just returns with error message.
TODO : write note
void streamOpen | ( | struct afb_req | req | ) |
Application High Level API for AGL This function opens "stream". "stream" means the routing from source to sink. This function calls registerSource and register the endpoint. If the endpoint is not registered in AudioManager, Sound Manager uses default value. audio_role will be translated to "sourceID", and "endpoint_id" will be translated to "sinkID".
TODO : write note
void subscribe | ( | struct afb_req | request | ) |
Subscribe event
void unsubscribe | ( | struct afb_req | request | ) |
Unsubscribe event
void volumeStep | ( | struct afb_req | request | ) |
Call "volumeStep" function of Audio Manager. Change volume step of sink
Request key
const struct afb_binding_v2 afbBindingV2 |
Definition at line 431 of file soundmanager.h.