sync codes to 2.4 spin
[platform/core/uifw/tts.git] / server / ttsd_data.h
index a73bc0e..8039e9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright (c) 2012, 2013 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
@@ -30,11 +30,11 @@ typedef enum {
 
 typedef struct 
 {
-       int                     utt_id; 
-       char*                   text;
-       char*                   lang;
-       ttsp_voice_type_e       vctype;
-       ttsp_speed_e            speed;
+       int     utt_id; 
+       char*   text;
+       char*   lang;
+       int     vctype;
+       int     speed;
 }speak_data_s;
 
 typedef struct 
@@ -49,6 +49,8 @@ typedef struct
        int                     channels;
 }sound_data_s;
 
+typedef void (* ttsd_used_voice_cb)(const char* lang, int type);
+
 int ttsd_data_new_client(int pid, int uid);
 
 int ttsd_data_delete_client(int uid);
@@ -59,24 +61,32 @@ int ttsd_data_get_client_count();
 
 int ttsd_data_get_pid(int uid);
 
-int ttsd_data_add_speak_data(int uid, speak_data_s data);
+/* speak data */
+int ttsd_data_add_speak_data(int uid, speak_data_s* data);
 
-int ttsd_data_get_speak_data(int uid, speak_data_s* data);
+int ttsd_data_get_speak_data(int uid, speak_data_s** data);
 
 int ttsd_data_get_speak_data_size(int uid);
 
-int ttsd_data_add_sound_data(int uid, sound_data_s data);
+/* sound data */
+int ttsd_data_add_sound_data(int uid, sound_data_s* data);
 
-int ttsd_data_get_sound_data(int uid, sound_data_s* data);
+int ttsd_data_get_sound_data(int uid, sound_data_s** data);
 
 int ttsd_data_get_sound_data_size(int uid);
 
 int ttsd_data_clear_data(int uid);
 
+
+int ttsd_data_set_used_voice(int uid, const char* lang, int type);
+
+int ttsd_data_reset_used_voice(int uid, ttsd_used_voice_cb callback);
+
 int ttsd_data_get_client_state(int pid, app_state_e* state);
 
 int ttsd_data_set_client_state(int pid, app_state_e state);
 
+
 int ttsd_data_get_current_playing();
 
 typedef bool(*ttsd_data_get_client_cb)(int pid, int uid, app_state_e state, void* user_data);
@@ -85,19 +95,9 @@ int ttsd_data_foreach_clients(ttsd_data_get_client_cb callback, void* user_data)
 
 bool ttsd_data_is_uttid_valid(int uid, int uttid);
 
-int ttsd_data_is_current_playing();
-
 int ttsd_data_get_same_pid_client_count(int pid);
 
-
-int ttsd_setting_data_add(int pid);
-
-int ttsd_setting_data_delete(int pid);
-
-int ttsd_setting_data_is_setting(int pid);
-
-
-/* for error log */
+/* For error handing */
 int ttsd_data_save_error_log(int uid, FILE* fp);