summaryrefslogtreecommitdiffstats
path: root/ahl-binding/ahl-binding.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ahl-binding/ahl-binding.hpp')
-rw-r--r--ahl-binding/ahl-binding.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/ahl-binding/ahl-binding.hpp b/ahl-binding/ahl-binding.hpp
index 24f4acb..e5a1d05 100644
--- a/ahl-binding/ahl-binding.hpp
+++ b/ahl-binding/ahl-binding.hpp
@@ -17,13 +17,13 @@
* limitations under the License.
*/
+#include <cassert>
#include <exception>
#include <functional>
-#include <sstream>
-#include <vector>
#include <list>
#include <map>
-#include <cassert>
+#include <sstream>
+#include <stack>
#include "config_entry.hpp"
#include "role.hpp"
@@ -31,6 +31,8 @@
#define HL_API_NAME "ahl-4a"
#define HL_API_INFO "Audio high level API for AGL applications"
#define HAL_MGR_API "4a-hal-manager"
+#define VOLUME_CHANGED "volume_changed"
+#define MASTER_CONTROL "agl-master-playback-volume"
#include "afb-binding-common.h"
@@ -42,6 +44,7 @@ private:
afb_api_t handle_;
afb_event_t volume_changed_;
std::vector<role_t> roles_;
+ std::stack<std::string> active_role_;
explicit ahl_binding_t();
@@ -62,6 +65,8 @@ public:
int init();
void event(std::string name, json_object* arg);
void get_roles(afb_req_t req) const;
+ void active(afb_req_t req);
+ void master(afb_req_t req) const;
void subscribe(afb_req_t req) const;
void unsubscribe(afb_req_t req) const;
int emit_volume_changed(const std::string& role, int volume) const;
@@ -72,5 +77,3 @@ public:
void audiorole(afb_req_t req);
int parse_roles_config(json_object* o);
};
-
-