check and revise by coding rule 05/66205/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Mon, 18 Apr 2016 00:45:59 +0000 (09:45 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Mon, 18 Apr 2016 00:45:59 +0000 (09:45 +0900)
Change-Id: Id4db6f2742cb91e7f71ec977c5bbc76277c3cc1d
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
13 files changed:
client/tts.c [changed mode: 0644->0755]
client/tts_client.h [changed mode: 0644->0755]
common/tts_config_mgr.h [changed mode: 0644->0755]
common/tts_config_parser.h [changed mode: 0644->0755]
include/tts.h [changed mode: 0644->0755]
server/ttsd_config.h [changed mode: 0644->0755]
server/ttsd_data.h [changed mode: 0644->0755]
server/ttsd_engine_agent.c [changed mode: 0644->0755]
server/ttsd_main.h [changed mode: 0644->0755]
server/ttsd_player.c [changed mode: 0644->0755]
server/ttsd_player.h [changed mode: 0644->0755]
server/ttsp.h [changed mode: 0644->0755]
test/test_main.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 59ae6b2..4420e83
@@ -745,12 +745,12 @@ int tts_add_text(tts_h tts, const char* text, const char* language, int voice_ty
                return TTS_ERROR_NOT_SUPPORTED;
        }
 
-       if( speed < 0 ) {
+       if (speed < 0) {
                SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Speed should not be negative(%d)", speed);
                return TTS_ERROR_INVALID_PARAMETER;
        }
 
-       if( voice_type < 0 ) {
+       if (voice_type < 0) {
                SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Voice type should not be negative(%d)", voice_type);
                return TTS_ERROR_INVALID_PARAMETER;
        }
old mode 100644 (file)
new mode 100755 (executable)
index c9e1755..45160ac
@@ -55,7 +55,7 @@ typedef struct {
        /* callback data */
        int             utt_id;
        int             reason;
-}tts_client_s;
+} tts_client_s;
 
 int tts_client_new(tts_h* tts);
 
old mode 100644 (file)
new mode 100755 (executable)
index 2e5c21c..0937887
@@ -43,7 +43,7 @@ typedef enum {
        TTS_CONFIG_SPEED_FAST           = 11,   /**< Fast */
        TTS_CONFIG_SPEED_VERY_FAST      = 14,   /**< Very fast */
        TTS_CONFIG_SPEED_MAX            = 15    /**< Max value */
-}tts_config_speed_e;
+} tts_config_speed_e;
 
 
 typedef bool (*tts_config_supported_engine_cb)(const char* engine_id, const char* engine_name, const char* setting, void* user_data);
old mode 100644 (file)
new mode 100755 (executable)
index 40cbf64..83e3ce2
@@ -28,12 +28,12 @@ typedef enum {
        TTS_CONFIG_VOICE_TYPE_FEMALE = 2,       /**< Female */
        TTS_CONFIG_VOICE_TYPE_CHILD = 3,        /**< Child */
        TTS_CONFIG_VOICE_TYPE_USER_DEFINED = 4  /**< Engine defined */
-}tts_config_voice_type_e;
+} tts_config_voice_type_e;
 
 typedef struct {
        char*   language;
        int     type;
-}tts_config_voice_s;
+} tts_config_voice_s;
 
 typedef struct {
        char*   name;
@@ -41,7 +41,7 @@ typedef struct {
        char*   setting;
        GSList* voices;
        bool    pitch_support;
-}tts_engine_info_s;
+} tts_engine_info_s;
 
 typedef struct {
        char*   engine_id;
@@ -51,7 +51,7 @@ typedef struct {
        int     type;
        int     speech_rate;
        int     pitch;
-}tts_config_s;
+} tts_config_s;
 
 
 /* Get engine information */
old mode 100644 (file)
new mode 100755 (executable)
index e1c0ffe..b7c2073
@@ -61,7 +61,7 @@ typedef enum {
        TTS_MODE_DEFAULT        = 0,    /**< Default mode for normal application */
        TTS_MODE_NOTIFICATION   = 1,    /**< Notification mode */
        TTS_MODE_SCREEN_READER  = 2     /**< Accessibiliity mode */
-}tts_mode_e;
+} tts_mode_e;
 
 /** 
  * @brief Enumerations for state.
@@ -72,7 +72,7 @@ typedef enum {
        TTS_STATE_READY         = 1,    /**< 'READY' state */
        TTS_STATE_PLAYING       = 2,    /**< 'PLAYING' state */
        TTS_STATE_PAUSED        = 3     /**< 'PAUSED' state*/
-}tts_state_e;
+} tts_state_e;
 
 /** 
  * @brief Definitions for automatic speaking speed.
old mode 100644 (file)
new mode 100755 (executable)
index 76e4597..5a627f8
@@ -26,7 +26,7 @@ typedef enum {
        TTS_CONFIG_TYPE_VOICE,
        TTS_CONFIG_TYPE_SPEED,
        TTS_CONFIG_TYPE_PITCH
-}tts_config_type_e;
+} tts_config_type_e;
 
 typedef void (*ttsd_config_changed_cb)(tts_config_type_e type, const char* str_param, int int_param);
 
old mode 100644 (file)
new mode 100755 (executable)
index 8039e9e..2b73153
@@ -26,19 +26,17 @@ typedef enum {
        APP_STATE_READY,
        APP_STATE_PLAYING,
        APP_STATE_PAUSED
-}app_state_e;
+} app_state_e;
 
-typedef struct 
-{
+typedef struct {
        int     utt_id; 
        char*   text;
        char*   lang;
        int     vctype;
        int     speed;
-}speak_data_s;
+} speak_data_s;
 
-typedef struct 
-{
+typedef struct {
        int             utt_id;
        void*           data;
        unsigned int    data_size;
@@ -47,7 +45,7 @@ typedef struct
        ttsp_audio_type_e       audio_type;
        int                     rate;
        int                     channels;
-}sound_data_s;
+} sound_data_s;
 
 typedef void (* ttsd_used_voice_cb)(const char* lang, int type);
 
old mode 100644 (file)
new mode 100755 (executable)
index f29acee..7196df6
@@ -487,7 +487,7 @@ static int __internal_update_engine_list()
                                if (NULL != filepath) {
                                        snprintf(filepath, file_size, "%s/%s", TTS_DEFAULT_ENGINE, dirp->d_name);
                                } else {
-                                       SLOG(LOG_ERROR, get_tag(), "[Engine Agent ERROR] Not enough memory!!" );
+                                       SLOG(LOG_ERROR, get_tag(), "[Engine Agent ERROR] Not enough memory!!");
                                        continue;
                                }
 
old mode 100644 (file)
new mode 100755 (executable)
index 04fd7af..ef8f98e
@@ -50,29 +50,29 @@ typedef enum {
        TTSD_ERROR_ENGINE_NOT_FOUND     = TIZEN_ERROR_TTS | 0x03,       /**< No available engine */
        TTSD_ERROR_OPERATION_FAILED     = TIZEN_ERROR_TTS | 0x04,       /**< Operation failed */
        TTSD_ERROR_AUDIO_POLICY_BLOCKED = TIZEN_ERROR_TTS | 0x05        /**< Audio policy blocked */
-}ttsd_error_e;
+} ttsd_error_e;
 
 typedef enum {
        TTSD_MODE_DEFAULT = 0,          /**< Default mode for normal application */
        TTSD_MODE_NOTIFICATION,         /**< Notification mode */
        TTSD_MODE_SCREEN_READER         /**< Screen reader mode */
-}ttsd_mode_e;
+} ttsd_mode_e;
 
 typedef enum {
        TTSD_INTERRUPTED_PAUSED = 0,    /**< Current state change 'Pause' */
        TTSD_INTERRUPTED_STOPPED        /**< Current state change 'Ready' */
-}ttsd_interrupted_code_e;
+} ttsd_interrupted_code_e;
 
 typedef struct {
        char* engine_id;
        char* engine_name;
        char* ug_name;
-}engine_s;
+} engine_s;
 
 typedef struct {
        char* language;
        int type;
-}voice_s;
+} voice_s;
 
 /* get daemon mode : default, notification or screen reader */
 ttsd_mode_e ttsd_get_mode();
old mode 100644 (file)
new mode 100755 (executable)
index 54699be..502da43
@@ -41,7 +41,7 @@ typedef struct {
        bool                    is_paused_data;
        int                     idx;
        sound_data_s*           paused_data;
-}player_s;
+} player_s;
 
 #define SOUND_BUFFER_LENGTH    2048
 
old mode 100644 (file)
new mode 100755 (executable)
index 4662b4e..e3b6594
@@ -23,13 +23,13 @@ typedef enum {
        PLAYER_END_OF_PLAYING,
        PLAYER_EMPTY_SOUND_QUEUE,
        PLAYER_ERROR
-}player_event_e;
+} player_event_e;
 
 typedef enum {
        TTSD_PLAYER_STATE_NULL,
        TTSD_PLAYER_STATE_PAUSED,
        TTSD_PLAYER_STATE_PLAYING
-}ttsd_player_state_e;
+} ttsd_player_state_e;
 
 /*
 * TTSD Player Interfaces 
old mode 100644 (file)
new mode 100755 (executable)
index 929b86b..ecd4df3
@@ -39,7 +39,7 @@ typedef enum {
        TTSP_ERROR_INVALID_STATE        = -0x0100021,   /**< Invalid state */
        TTSP_ERROR_INVALID_VOICE        = -0x0100022,   /**< Invalid voice */
        TTSP_ERROR_OPERATION_FAILED     = -0x0100025    /**< Operation failed */
-}ttsp_error_e;
+} ttsp_error_e;
 
 /**
 * @brief Enumerations of audio type.
@@ -48,7 +48,7 @@ typedef enum {
        TTSP_AUDIO_TYPE_RAW_S16 = 0,    /**< Signed 16-bit audio sample */
        TTSP_AUDIO_TYPE_RAW_U8,         /**< Unsigned 8-bit audio sample */
        TTSP_AUDIO_TYPE_MAX
-}ttsp_audio_type_e;
+} ttsp_audio_type_e;
 
 /**
 * @brief Enumerations of result event type.
@@ -58,7 +58,7 @@ typedef enum {
        TTSP_RESULT_EVENT_START         = 1,  /**< event when the sound data is first data by callback function */
        TTSP_RESULT_EVENT_CONTINUE      = 2,  /**< event when the next sound data exist, not first and not last */
        TTSP_RESULT_EVENT_FINISH        = 3   /**< event when the sound data is last data or sound data is only one result */
-}ttsp_result_event_e;
+} ttsp_result_event_e;
 
 /**
 * @brief Enumerations of TTS mode.
@@ -67,7 +67,7 @@ typedef enum {
        TTSP_MODE_DEFAULT       = 0,    /**< Default mode for normal application */
        TTSP_MODE_NOTIFICATION  = 1,    /**< Notification mode */
        TTSP_MODE_SCREEN_READER = 2     /**< Accessibiliity mode */
-}ttsp_mode_e;
+} ttsp_mode_e;
 
 /** 
 * @brief Defines of voice type.
@@ -125,7 +125,7 @@ typedef bool (*ttspe_supported_voice_cb)(const char* language, int type, void* u
 * 
 * @see ttspe_deinitialize()
 */
-typedef int (* ttspe_initialize)(ttspe_result_cb callback);
+typedef int (*ttspe_initialize)(ttspe_result_cb callback);
 
 /**
 * @brief Deinitializes the engine.
@@ -136,7 +136,7 @@ typedef int (* ttspe_initialize)(ttspe_result_cb callback);
 * 
 * @see ttspe_initialize()
 */
-typedef int (* ttspe_deinitialize)(void);
+typedef int (*ttspe_deinitialize)(void);
 
 /**
 * @brief Retrieves all supported voices of the engine using callback function.
@@ -153,7 +153,7 @@ typedef int (* ttspe_deinitialize)(void);
 *
 * @see ttspe_supported_voice_cb()
 */
-typedef int (* ttspe_foreach_supported_voices)(ttspe_supported_voice_cb callback, void* user_data);
+typedef int (*ttspe_foreach_supported_voices)(ttspe_supported_voice_cb callback, void* user_data);
 
 /**
 * @brief Checks whether the voice is valid or not.
@@ -165,7 +165,7 @@ typedef int (* ttspe_foreach_supported_voices)(ttspe_supported_voice_cb callback
 *
 * @see ttspe_foreach_supported_voices()
 */
-typedef bool (* ttspe_is_valid_voice)(const char* language, int type);
+typedef bool (*ttspe_is_valid_voice)(const char* language, int type);
 
 /**
 * @brief Sets default pitch.
@@ -178,7 +178,7 @@ typedef bool (* ttspe_is_valid_voice)(const char* language, int type);
 * @retval #TTSP_ERROR_INVALID_STATE Not initialized
 * @retval #TTSP_ERROR_OPERATION_FAILED Fail
 */
-typedef int (* ttspe_set_pitch)(int pitch);
+typedef int (*ttspe_set_pitch)(int pitch);
 
 /**
 * @brief Load voice of the engine.
@@ -196,7 +196,7 @@ typedef int (* ttspe_set_pitch)(int pitch);
 *
 * @see ttspe_unload_voice()
 */
-typedef int (* ttspe_load_voice)(const char* language, int type);
+typedef int (*ttspe_load_voice)(const char* language, int type);
 
 /**
 * @brief Unload voice of the engine.
@@ -213,7 +213,7 @@ typedef int (* ttspe_load_voice)(const char* language, int type);
 *
 * @see ttspe_load_voice()
 */
-typedef int (* ttspe_unload_voice)(const char* language, int type);
+typedef int (*ttspe_unload_voice)(const char* language, int type);
 
 /**
 * @brief Starts voice synthesis, asynchronously.
@@ -237,7 +237,7 @@ typedef int (* ttspe_unload_voice)(const char* language, int type);
 * @see ttspe_result_cb()
 * @see ttspe_cancel_synthesis()
 */
-typedef int (* ttspe_start_synthesis)(const char* language, int type, const char* text, int speed, void* user_data);
+typedef int (*ttspe_start_synthesis)(const char* language, int type, const char* text, int speed, void* user_data);
 
 /**
 * @brief Cancels voice synthesis.
@@ -250,7 +250,7 @@ typedef int (* ttspe_start_synthesis)(const char* language, int type, const char
 *
 * @see ttspe_start_synthesis()
 */
-typedef int (* ttspe_cancel_synthesis)(void);
+typedef int (*ttspe_cancel_synthesis)(void);
 
 
 /**
@@ -263,7 +263,7 @@ typedef int (* ttspe_cancel_synthesis)(void);
 * @retval #TTSP_ERROR_INVALID_PARAMETER Invalid parameter
 *
 */
-typedef int (* ttspd_get_mode)(ttsp_mode_e* mode);
+typedef int (*ttspd_get_mode)(ttsp_mode_e* mode);
 
 /**
 * @brief Gets the speed range.
@@ -277,7 +277,7 @@ typedef int (* ttspd_get_mode)(ttsp_mode_e* mode);
 * @retval #TTSP_ERROR_INVALID_PARAMETER Invalid parameter
 *
 */
-typedef int (* ttspd_get_speed_range)(int* min, int* normal, int* max);
+typedef int (*ttspd_get_speed_range)(int* min, int* normal, int* max);
 
 /**
 * @brief Gets the pitch range.
@@ -291,7 +291,7 @@ typedef int (* ttspd_get_speed_range)(int* min, int* normal, int* max);
 * @retval #TTSP_ERROR_INVALID_PARAMETER Invalid parameter
 *
 */
-typedef int (* ttspd_get_pitch_range)(int* min, int* normal, int* max);
+typedef int (*ttspd_get_pitch_range)(int* min, int* normal, int* max);
 
 /**
 * @brief A structure of the engine functions
@@ -327,7 +327,7 @@ typedef struct {
        ttspd_get_mode                  get_mode;               /**< Get mode */
        ttspd_get_speed_range           get_speed_range;        /**< Get speed range */
        ttspd_get_pitch_range           get_pitch_range;        /**< Get pitch range */
-}ttspd_funcs_s;
+} ttspd_funcs_s;
 
 /**
 * @brief Loads the engine by the daemon.
old mode 100644 (file)
new mode 100755 (executable)
index 113d898..6747211
@@ -188,7 +188,7 @@ static void __tts_test_utt_completed_cb(tts_h tts, int utt_id, void* user_data)
        return;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
        if (1 == argc || 5 < argc) {
                SLOG(LOG_DEBUG, tts_tag(), "Please check parameter");
@@ -203,7 +203,7 @@ int main (int argc, char *argv[])
 
        while (NULL != argv[n]) {
 
-               if(!strcmp("-h", argv[n])) {
+               if (!strcmp("-h", argv[n])) {
                        SLOG(LOG_DEBUG, tts_tag(), " ==========================================");
                        SLOG(LOG_DEBUG, tts_tag(), "  TTS test usage");
                        SLOG(LOG_DEBUG, tts_tag(), " ==========================================");
@@ -230,7 +230,7 @@ int main (int argc, char *argv[])
                else if (!strcmp("-f", argv[n])) {
                        src_path = TTS_STRDUP(argv[n+1]);
                        SLOG(LOG_ERROR, tts_tag(), "File path : %s", src_path);
-                       if(!__tts_test_get_text_from_file(src_path, &g_text)) {
+                       if (!__tts_test_get_text_from_file(src_path, &g_text)) {
                                return 0;
                        }
                }