Add to check RW config file and reset config info
[platform/core/uifw/tts.git] / server / ttsd_config.h
index 45e9b89..26ad74f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright (c) 2011 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
 extern "C" {
 #endif
 
-#define TTSD_CONFIG_PREFIX "db/ttsd/"
+typedef enum {
+       TTS_CONFIG_TYPE_ENGINE,
+       TTS_CONFIG_TYPE_VOICE,
+       TTS_CONFIG_TYPE_SPEED,
+       TTS_CONFIG_TYPE_PITCH
+} tts_config_type_e;
 
-#define CONFIG_KEY_DEFAULT_ENGINE_ID   TTSD_CONFIG_PREFIX"engine"
-#define CONFIG_KEY_DEFAULT_LANGUAGE    TTSD_CONFIG_PREFIX"language"
-#define CONFIG_KEY_DEFAULT_VOICE_TYPE  TTSD_CONFIG_PREFIX"vctype"
-#define CONFIG_KEY_DEFAULT_SPEED       TTSD_CONFIG_PREFIX"speed"
+typedef void (*ttsd_config_changed_cb)(tts_config_type_e type, const char* str_param, int int_param);
 
-/*
-* tts-daemon config
-*/
-
-int ttsd_config_get_char_type(const char* key, char** value);
+typedef void (*ttsd_config_screen_reader_changed_cb)(bool value);
 
-int ttsd_config_set_char_type(const char* key, const char* value);
+int ttsd_config_initialize(ttsd_config_changed_cb config_cb);
 
-int ttsd_config_get_bool_type(const char* key, bool* value);
+int ttsd_config_finalize();
 
-int ttsd_config_set_bool_type(const char* key, const bool value);
+int ttsd_config_set_screen_reader_callback(ttsd_config_screen_reader_changed_cb sr_cb);
 
-int ttsd_config_get_int_type(const char* key, int* value);
+int ttsd_config_get_default_engine(char** engine_id);
 
-int ttsd_config_set_int_type(const char* key, const int value);
-
-/*
-* interface for engine plug-in
-*/
+int ttsd_config_set_default_engine(const char* engine_id);
 
-int ttsd_config_set_persistent_data(const char* engine_id, const char* key, const char* value);
+int ttsd_config_get_default_voice(char** language, int* type);
 
-int ttsd_config_get_persistent_data(const char* engine_id, const char* key, char** value);
+int ttsd_config_get_default_speed(int* speed);
 
-int ttsd_config_remove_persistent_data(const char* engine_id, const char* key);
+int ttsd_config_get_default_pitch(int* pitch);
 
+int ttsd_config_save_error(int uid, int uttid, const char* lang, int vctype, const char* text, 
+                          const char* func, int line, const char* message);
 
 #ifdef __cplusplus
 }