updates codes to sync with the latest 2.4 spin code
[platform/core/uifw/stt.git] / common / stt_defs.h
index 4f6fb23..35e5215 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved 
+*  Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
@@ -15,6 +15,8 @@
 #ifndef __STT_DEFS_H__
 #define __STT_DEFS_H__
 
+#include <tzplatform_config.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -27,7 +29,7 @@ extern "C" {
 #define STT_CLIENT_SERVICE_OBJECT_PATH  "/org/tizen/voice/sttclient"
 #define STT_CLIENT_SERVICE_INTERFACE    "org.tizen.voice.sttclient"
 
-#define STT_SERVER_SERVICE_NAME         "service.connect.sttserver"
+#define STT_SERVER_SERVICE_NAME         "org.tizen.voice.sttserver"
 #define STT_SERVER_SERVICE_OBJECT_PATH  "/org/tizen/voice/sttserver"
 #define STT_SERVER_SERVICE_INTERFACE    "org.tizen.voice.sttserver"
 
@@ -59,35 +61,31 @@ extern "C" {
 #define STTD_METHOD_ERROR              "sttd_method_error"
 #define STTD_METHOD_HELLO              "sttd_method_hello"
 #define STTD_METHOD_SET_STATE          "sttd_method_set_state"
-#define STTD_METHOD_GET_STATE          "sttd_method_get_state"
+#define STTD_METHOD_SET_VOLUME         "sttd_method_set_volume"
+
 
 /******************************************************************************************
 * Defines for configuration
 *******************************************************************************************/
 
-#define STT_AUDIO_VOLUME_PATH          "/tmp/stt_vol"
-
-#define STT_PID_FILE_PATH              "/opt/home/app/.voice/sttd_info"
+#define STT_TIME_INFO_PATH             tzplatform_mkpath(TZ_USER_HOME, "share/.voice/stt-time.xml")
 
-#define STT_TIME_INFO_PATH             "/opt/home/app/.voice/stt-time.xml"
+#define STT_DEFAULT_CONFIG             STT_LIBDIR"/voice/stt/1.0/stt-config.xml"
+#define STT_CONFIG                     tzplatform_mkpath(TZ_USER_HOME, "share/.voice/stt-config.xml")
 
-#define STT_USR_BASE                   "/usr/lib/voice"
-#define STT_OPT_BASE                   "/opt/usr/data/voice"
+#define STT_DEFAULT_ENGINE             STT_LIBDIR"/voice/stt/1.0/engine"
+#define STT_DOWNLOAD_ENGINE            tzplatform_mkpath(TZ_USER_HOME, "share/.voice/stt/1.0/engine")
 
-#define STT_DEFAULT_CONFIG             STT_USR_BASE"/stt/1.0/stt-config.xml"
-#define STT_CONFIG                     "/opt/home/app/.voice/stt-config.xml"
+#define STT_DEFAULT_ENGINE_INFO                STT_LIBDIR"/voice/stt/1.0/engine-info"
+#define STT_DOWNLOAD_ENGINE_INFO       tzplatform_mkpath(TZ_USER_HOME, "share/.voice/stt/1.0/engine-info")
 
-#define STT_DEFAULT_ENGINE             STT_USR_BASE"/stt/1.0/engine"
-#define STT_DOWNLOAD_ENGINE            STT_OPT_BASE"/stt/1.0/engine"
-
-#define STT_DEFAULT_ENGINE_INFO                STT_USR_BASE"/stt/1.0/engine-info"
-#define STT_DOWNLOAD_ENGINE_INFO       STT_OPT_BASE"/stt/1.0/engine-info"
-
-#define STT_DEFAULT_ENGINE_SETTING     STT_USR_BASE"/stt/1.0/engine-setting"
-#define STT_DOWNLOAD_ENGINE_SETTING    STT_OPT_BASE"/stt/1.0/engine-setting"
+#define STT_DEFAULT_ENGINE_SETTING     STT_LIBDIR"/voice/stt/1.0/engine-setting"
+#define STT_DOWNLOAD_ENGINE_SETTING    tzplatform_mkpath(TZ_USER_HOME, "share/.voice/stt/1.0/engine-setting")
 
 #define STT_BASE_LANGUAGE              "en_US"
 
+#define STT_RETRY_COUNT                        5
+
 #define STT_FEATURE_PATH               "tizen.org/feature/speech.recognition"
 #define STT_MIC_FEATURE_PATH           "tizen.org/feature/microphone"