summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--src/ahl-policy.c35
-rw-r--r--src/ahl-policy.h36
3 files changed, 35 insertions, 40 deletions
diff --git a/README.md b/README.md
index 3a940b3..046c2e7 100644
--- a/README.md
+++ b/README.md
@@ -8,10 +8,6 @@
```
# Initial clone with submodules
git clone https://github.com/Audiokinetic-Automotive/afb-audiohighlevel.git
-<<<<<<< HEAD
-cd afb-audiohighlevel
-=======
->>>>>>> 8a584f01b46d251fdc5de8b071eff755d99f0090
```
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;
diff --git a/src/ahl-policy.h b/src/ahl-policy.h
index d1cf87e..66615e6 100644
--- a/src/ahl-policy.h
+++ b/src/ahl-policy.h
@@ -20,42 +20,6 @@
#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;
-
int Policy_Endpoint_Init(json_object *pPolicyEndpointJ);
int Policy_OpenStream(json_object *pPolicyStreamJ);
int Policy_CloseStream(json_object *pPolicyStreamJ);