Delete ecore timer when quit ecore main loop
[platform/core/uifw/tts.git] / server / ttse.c
index 5dd4071..0f40802 100755 (executable)
@@ -23,6 +23,7 @@
 #include <Ecore.h>
 
 #include "ttse.h"
+#include "ttse_internal.h"
 
 static ttsd_mode_e g_tts_mode = TTSD_MODE_DEFAULT;
 
@@ -32,6 +33,8 @@ const char* tts_tag()
                return "ttsdnoti";
        } else if (TTSD_MODE_SCREEN_READER == g_tts_mode) {
                return "ttsdsr";
+       } else if (TTSD_MODE_INTERRUPT == g_tts_mode) {
+               return "ttsdinterrupt";
        } else {
                return "ttsd";
        }
@@ -63,6 +66,8 @@ int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
                                        mode = TTSD_MODE_NOTIFICATION;
                                } else if (!strcmp("sr", val)) {
                                        mode = TTSD_MODE_SCREEN_READER;
+                               } else if (!strcmp("interrupt", val)) {
+                                       mode = TTSD_MODE_INTERRUPT;
                                } else {
                                        SLOG(LOG_WARN, tts_tag(), "[WARNING] mode (%s)", val);
                                }
@@ -110,6 +115,13 @@ int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
        return TTSE_ERROR_NONE;
 }
 
+int ttse_terminate()
+{
+       ttsd_terminate();
+
+       return TTSE_ERROR_NONE;
+}
+
 int ttse_get_speed_range(int* min, int* normal, int* max)
 {
        if (NULL == min || NULL == normal || NULL == max) {