summaryrefslogtreecommitdiffstats
path: root/src/sm-def.h
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-03-08 11:59:16 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-03-08 08:28:32 +0000
commitd17141136e7b75c174babce5b15e56fde6de063b (patch)
tree57589bef80e6082236bb547977cb631b2c5db9b1 /src/sm-def.h
parent6a3569b81304bb2e64dce923ba52d82c701356fa (diff)
Clean: divide the source files
soundmanager.c becomes bigger, so divide it into some files. soundmanager.h ... declare functions and set entry point of binder sm_def.h ... define keys for json, default value and so on soundmanager.c ... implementation Change-Id: Iadcfe8d475520c27515c8bd4a43ead36726787af Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/sm-def.h')
-rw-r--r--src/sm-def.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/sm-def.h b/src/sm-def.h
new file mode 100644
index 0000000..ce25b5e
--- /dev/null
+++ b/src/sm-def.h
@@ -0,0 +1,73 @@
+#ifndef SOUNDMANAGER_DEFINE_H
+#define SOUNDMANAGER_DEFINE_H
+
+#define AM_NAME "org.genivi.audiomanager"
+#define AM_CMD_PATH "/org/genivi/audiomanager/commandinterface"
+#define AM_ROUTE_PATH "/org/genivi/audiomanager/routinginterface"
+#define SOUND_MANAGER_RETURN_INTERFACE "org.genivi.audiomanager.routing.soundmanager"
+#define SOUND_MANAGER_BUS_NAME "org.genivi.audiomanager.routing.soundmanager"
+#define SOUND_MANAGER_PATH "/org/genivi/audiomanager/routing/soundmanager"
+
+#define COMMAND_EVENT_NUM 10
+#define ROUTING_EVENT_NUM 10
+#define DEFAULT_SINK 1
+#define DEFAULT_SOURCE_CLASS_ID 101
+#define DYNAMIC_DOMAIN_ID 100
+#define DEFAULT_DOMAIN_ID 0
+#define DYNAMIC_SOURCE_ID 0
+#define DEFAULT_VOLUME 100
+#define DEFAULT_AVAILABLES 1
+#define DEFAULT_CONNECTION_FORMAT 2
+#define DEFAULT_INTERRUPT 0
+#define DEFAULT_SOURCE_STATE 2
+#define DS_CONTROLLED 1
+
+#define EVENT_SUBSCRIBE_ERROR_CODE 100
+
+#define KEY_SOURCE_ID "sourceID"
+#define KEY_SINK_ID "sinkID"
+#define KEY_SINK_NAME "sinkName"
+#define KEY_MAIN_CONNECTION_ID "mainConnectionID"
+#define KEY_DELAY "delay"
+#define KEY_CONNECTION_STATE "connectionState"
+#define KEY_CONNECTION_ID "connectionID"
+#define KEY_VOLUME "volume"
+#define KEY_VOLUME_STEP "volumeStep"
+#define KEY_INTERRUPT "interrupt"
+#define KEY_MUTE_STATE "muteState"
+
+#define KEY_DOMAIN_ID "domainID"
+#define KEY_HANDLE "handle"
+#define KEY_APPNAME "appname"
+#define KEY_RAMP "ramp"
+#define KEY_TIME "time"
+#define KEY_SOURCE_STATE "sourceState"
+#define KEY_SOURCE_CLASS_ID "sourceClassID"
+#define KEY_SINK_CLASS_ID "sinkClassID"
+#define KEY_ERROR "error"
+#define KEY_SINK_DATA "sinkData"
+#define KEY_SOURCE_DATA "sourceData"
+#define KEY_INTERRUPT_STATE "interruptState"
+#define KEY_AVAILABILITY "availability"
+#define KEY_AVAILABILITY_REASON "availabilityReason"
+#define KEY_LIST_VOLUMES "listVolumes"
+#define KEY_PAYLOAD "payload"
+#define KEY_CONNECTION_FORMAT "connectionFormat"
+#define KEY_EVENT "event"
+
+#define KEY_RESPONSE "response"
+
+#ifdef ENABLE_AGL_AHL
+#define KEY_AHL_AUDIO_ROLE "audio_role"
+#define KEY_AHL_ENDPOINT_ID "endpoint_id"
+#define KEY_AHL_ENDPOINT_TYPE "endpoint_type"
+
+typedef enum {
+ ENDPOINT_SINK,
+ ENDPOINT_SOURCE,
+} EndPointType;
+#endif
+
+#define MAX_LENGTH_STR 256
+
+#endif // SOUNDMANAGER_DEFINE_H \ No newline at end of file