summaryrefslogtreecommitdiffstats
path: root/ahl-binding/ahl-binding.h
diff options
context:
space:
mode:
Diffstat (limited to 'ahl-binding/ahl-binding.h')
-rw-r--r--ahl-binding/ahl-binding.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/ahl-binding/ahl-binding.h b/ahl-binding/ahl-binding.h
index 9b4c37e..405144d 100644
--- a/ahl-binding/ahl-binding.h
+++ b/ahl-binding/ahl-binding.h
@@ -17,18 +17,15 @@
#ifndef AHL_BINDING_INCLUDE
#define AHL_BINDING_INCLUDE
-#define AFB_BINDING_VERSION 2
-
//#define AHL_DISCONNECT_POLICY // define for debugging HLB in standalone only
#include <json-c/json.h>
#include <glib.h>
-
+#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
#include "ahl-interface.h"
#include "ahl-policy-utils.h"
-
#ifndef PUBLIC
#define PUBLIC
#endif
@@ -39,9 +36,36 @@
#define AHL_ACCESS_CONTROL_GRANTED 1
#define AHL_ACCESS_CONTROL_DENIED 0
-#define AHL_UNDEFINED -1
#define AHL_STR_MAX_LENGTH 256
-
+
+typedef struct EndpointInfo
+{
+ endpointID_t endpointID; // Unique endpoint ID (per type)
+ EndpointTypeT type; // Source or sink device
+ char * gsDeviceName; // Unique device card name
+ char * gsDisplayName; // Application display name
+ char * gsDeviceURI; // Associated URI
+ char * gsDeviceDomain; // Device URI domain (e.g. alsa or pulse)
+ char * pRoleName; // Role assigned to this endpoint
+ DeviceURITypeT deviceURIType; // Device URI type (includes audio domain information)
+ char * gsHALAPIName; // HAL associated with the device (for volume control)
+ AlsaDeviceInfoT alsaInfo; // ALSA specific device information
+ AudioFormatT format; // Preferred audio format supported (later could be array of supported formats)
+ int iVolume; // Storage for current endpoint volume (policy effected).
+ GHashTable * pPropTable; // Storage for array of properties (policy effected)
+} EndpointInfoT;
+
+typedef struct StreamInfo {
+ streamID_t streamID; // Stream unique ID
+ EndpointInfoT * pEndpointInfo; // Associated endpoint information (reference)
+ StreamStateT streamState; // Stream activity state
+ StreamMuteT streamMute; // Stream mute state
+ struct afb_event streamStateEvent; // Stream specific event for stream state changes
+ EndpointSelectionModeT endpointSelMode; // Automatic (priority based) or manual endpoint selection
+ char * pRoleName; // Role string identifier (from role config but could be programatically overriden later)
+ int iPriority; // Role normalized priority (0-100) (from role config but could be programatically overriden later)
+ InterruptBehaviorT eInterruptBehavior; // Role behavior when interrupting lower priority streams (from role config but could be programatically overriden later)
+} StreamInfoT;
typedef struct RoleInfo {
char * pRoleName; // Role string identifier