summaryrefslogtreecommitdiffstats
path: root/src/ahl-policy.c
diff options
context:
space:
mode:
authorTai Vuong <tvuong@audiokinetic.com>2017-10-30 15:39:11 -0400
committerTai Vuong <tvuong@audiokinetic.com>2017-10-30 15:39:11 -0400
commit74658c8befeb312e8e2e9ffaf5bfa6f8d7615612 (patch)
treefef17d2fb8cc3af4ade99c75f6ae0df59bbc8ebf /src/ahl-policy.c
parentc46955de2731563d1991691cd1a7986f05f019e3 (diff)
fix error in ReadMe.md
Diffstat (limited to 'src/ahl-policy.c')
-rw-r--r--src/ahl-policy.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ahl-policy.c b/src/ahl-policy.c
index 54634ff..f4650ad 100644
--- a/src/ahl-policy.c
+++ b/src/ahl-policy.c
@@ -25,6 +25,41 @@
#ifndef AHL_DISCONNECT_POLICY
+#define MAX_ACTIVE_STREAM_POLICY 30
+#define POLICY_FAIL 1
+#define POLICY_SUCCESS 0
+
+#define AHL_POLICY_UNDEFINED_HALNAME "UNDEFINED"
+#define AHL_POLICY_UNDEFINED_DISPLAYNAME "DeviceNotFound"
+
+typedef enum SystemState {
+ SYSTEM_STARTUP = 0, // Startup
+ SYSTEM_SHUTDOWN, // ShutDown
+ SYSTEM_NORMAL, // Normal
+ SYSTEM_LOW_POWER, // Low Power, save mode
+ SYSTEM_MAXVALUE // Enum count, keep at the end
+} SystemStateT;
+
+typedef struct HalInfo {
+ char *pDevID;
+ char *pAPIName;
+ char *pDisplayName;
+} HalInfoT;
+
+typedef struct StreamConfig {
+ int iNbMaxStream;
+ int iVolumeInit;
+ int iVolumeDuckValue;
+} StreamConfigT;
+
+// Global Policy Local context
+typedef struct PolicyLocalCtx {
+ GArray * pSourceEndpoints; // List of Source Endpoint with playing stream or interrupted stream
+ GArray * pSinkEndpoints; // List of Sink Endpoint with playing stream or interrupted stream
+ GPtrArray * pHALList;
+ SystemStateT systemState;
+} PolicyLocalCtxT;
+
// Global Context
PolicyLocalCtxT g_PolicyCtx;