X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=server%2Fsttd_main.h;h=25a10ceec332997036ef0502ca6df1437538d9bd;hb=refs%2Fchanges%2F52%2F79752%2F10;hp=324519767518ffb4420fcde4a08f04df869731e9;hpb=2121c7c76a17c3f5d53aad30da71853c1135bbb7;p=platform%2Fcore%2Fuifw%2Fstt.git diff --git a/server/sttd_main.h b/server/sttd_main.h old mode 100755 new mode 100644 index 3245197..25a10ce --- a/server/sttd_main.h +++ b/server/sttd_main.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd All Rights Reserved +* Copyright (c) 2011-2016 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,14 +15,15 @@ #ifndef __STTD_MAIN_H_ #define __STTD_MAIN_H_ +#include +#include +#include #include -#include #include #include +#include #include -#include -#include -#include + #ifdef __cplusplus extern "C" { @@ -34,44 +35,39 @@ extern "C" { #define TAG_STTD "sttd" -#define BASE_DIRECTORY_DEFAULT "/usr/lib/voice/stt/1.0/" -#define ENGINE_DIRECTORY_DEFAULT "/usr/lib/voice/stt/1.0/engine" -#define ENGINE_DIRECTORY_DEFAULT_SETTING "/usr/lib/voice/stt/1.0/setting" - -#define CONFIG_DIRECTORY "/opt/home/app/.voice" - -#define ENGINE_DIRECTORY_DOWNLOAD "/opt/usr/voice/stt/1.0/engine" -#define ENGINE_DIRECTORY_DOWNLOAD_SETTING "/opt/usr/voice/stt/1.0/setting" - /* for debug message */ -#define RECORDER_DEBUG -#define CLIENT_DATA_DEBUG +//#define CLIENT_DATA_DEBUG typedef enum { - STTD_ERROR_NONE = 0, /**< Successful */ - STTD_ERROR_OUT_OF_MEMORY = -ENOMEM, /**< Out of Memory */ - STTD_ERROR_IO_ERROR = -EIO, /**< I/O error */ - STTD_ERROR_INVALID_PARAMETER = -EINVAL, /**< Invalid parameter */ - STTD_ERROR_TIMED_OUT = -ETIMEDOUT, /**< No answer from the daemon */ - STTD_ERROR_RECORDER_BUSY = -EBUSY, /**< Busy recorder */ - STTD_ERROR_OUT_OF_NETWORK = -ENETDOWN, /**< Out of network */ - STTD_ERROR_INVALID_STATE = -0x0100000 | 0x31, /**< Invalid state */ - STTD_ERROR_INVALID_LANGUAGE = -0x0100000 | 0x32, /**< Invalid language */ - STTD_ERROR_ENGINE_NOT_FOUND = -0x0100000 | 0x33, /**< No available engine */ - STTD_ERROR_OPERATION_FAILED = -0x0100000 | 0x34, /**< Operation failed */ - STTD_ERROR_NOT_SUPPORTED_FEATURE= -0x0100000 | 0x35 /**< Not supported feature of current engine */ -}stt_error_e; + STTD_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + STTD_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ + STTD_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ + STTD_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,/**< Invalid parameter */ + STTD_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< No answer from the STT service */ + STTD_ERROR_RECORDER_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */ + STTD_ERROR_OUT_OF_NETWORK = TIZEN_ERROR_NETWORK_DOWN, /**< Network is down */ + STTD_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,/**< Permission denied */ + STTD_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< STT NOT supported */ + STTD_ERROR_INVALID_STATE = TIZEN_ERROR_STT | 0x01, /**< Invalid state */ + STTD_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_STT | 0x02, /**< Invalid language */ + STTD_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_STT | 0x03, /**< No available engine */ + STTD_ERROR_OPERATION_FAILED = TIZEN_ERROR_STT | 0x04, /**< Operation failed */ + STTD_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_STT | 0x05, /**< Not supported feature of current engine */ + STTD_ERROR_NO_SPEECH = TIZEN_ERROR_STT | 0x06, /**< No speech while recording */ + STTD_ERROR_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x10, /**< Recording timed out */ + STTD_ERROR_SERVICE_RESET = TIZEN_ERROR_STT | 0x11 /**< Service reset */ +} stt_error_e; + +typedef enum { + STTD_RESULT_STATE_DONE = 0, /**< Sync state change */ + STTD_RESULT_STATE_NOT_DONE = 1 /**< Async state change */ +} sttd_result_state_e; typedef struct { char* engine_id; char* engine_name; char* ug_name; -}engine_s; - -typedef struct { - char* key; - char* value; -}engine_setting_s; +} engine_s; #ifdef __cplusplus }