Fix bug(Nabi S1-12186) and add smack rule
authorKwangyoun Kim <ky85.kim@samsung.com>
Tue, 5 Feb 2013 12:36:35 +0000 (21:36 +0900)
committerKwangyoun Kim <ky85.kim@samsung.com>
Tue, 5 Feb 2013 12:36:35 +0000 (21:36 +0900)
Change-Id: I2d5f78ca96333f2c631199390bab42faa1b316af

CMakeLists.txt
changelog [new file with mode: 0755]
client/tts.c
client/tts_client.c
client/tts_client.h
client/tts_setting.c
debian/changelog [deleted file]
packaging/tts.spec [changed mode: 0644->0755]
server/ttsd_player.cpp
tts-server.rule [new file with mode: 0755]

index 19ad256a96e550df48efaea89843f582b8746545..b163e2126952464d011a22d338e5ca2b3a7bac0a 100755 (executable)
@@ -17,4 +17,4 @@ ADD_SUBDIRECTORY(client)
 ADD_SUBDIRECTORY(server)
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.APLv2 RENAME tts DESTINATION /usr/share/license)
-
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-server.rule DESTINATION  /etc/smack/accesses2.d)
diff --git a/changelog b/changelog
new file mode 100755 (executable)
index 0000000..f1f8bba
--- /dev/null
+++ b/changelog
@@ -0,0 +1,367 @@
+tts (0.1.1-47)
+
+  * Fix bug (Nabi S1-12186)
+  * Add smack rule
+  * Fix player sync problem
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com>  Tue, 05 Feb 2013
+
+tts (0.1.1-46slp2+1) unstable; urgency=low
+
+  * Fix for GCC 4.7
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com>  Tue, 29 Jan 2013 17:00:41 +0900
+
+tts (0.1.1-45slp2+1) unstable; urgency=low
+
+  * Fix PLM issue(P121126-2493)
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com>  Mon, 28 Jan 2013 17:07:57 +0900
+
+tts (0.1.1-44slp2+1) unstable; urgency=low
+
+  * Fix PLM issue(P130121-3243)
+  * Add Daemon termination
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com>  Thu, 24 Jan 2013 17:52:28 +0900
+
+tts (0.1.1-43slp2+1) unstable; urgency=low
+
+  * Change license and notice file
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com>  Wed, 23 Jan 2013 14:45:07 +0900
+
+tts (0.1.1-42slp2+1) unstable; urgency=low
+
+  * Fix prevent issue
+  * Change license file 
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com>  Tue, 15 Jan 2013 11:30:30 +0900
+
+tts (0.1.1-41slp2+1) unstable; urgency=low
+
+  * Fix prevent issue
+  * Fix bug when engine result is NULL
+  * Change config path
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 18 Dec 2012 12:16:38 +0900
+
+tts (0.1.1-40slp2+1) unstable; urgency=low
+
+  * Fix prevent
+  * Git: framework/uifw/voice/tts
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 04 Dec 2012 16:40:08 +0900
+
+tts (0.1.1-39slp2+1) unstable; urgency=low
+
+  * Remove dependency of openssl
+  * Fix bug of config 
+  * Git: framework/uifw/voice/tts
+  * Tag: tts_0.1.1-39slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 22 Nov 2012 16:31:53 +0900
+
+tts (0.1.1-38slp2+1) unstable; urgency=low
+
+  * Add manifest and license file
+  * Add tag for binary merge
+  * Git: framework/uifw/voice/tts
+  * Tag: tts_0.1.1-38slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 10 Oct 2012 14:48:46 +0900
+
+tts (0.1.1-37slp2+1) unstable; urgency=low
+
+  * Fix the bug of player BS
+  * Git: framework/uifw/voice/tts
+  * Tag: tts_0.1.1-37slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 16 Aug 2012 11:30:47 +0900
+
+tts (0.1.1-36slp2+1) unstable; urgency=low
+
+  * Update Setting API for async init
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-36slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 06 Aug 2012 19:30:59 +0900
+
+tts (0.1.1-35slp2+1) unstable; urgency=low
+
+  * Remove fd write option of dbus in client lib
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-35slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 31 Jul 2012 10:17:11 +0900
+
+tts (0.1.1-34slp2+1) unstable; urgency=low
+
+  * Fix the bug of setting client management
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-34slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 24 Jul 2012 13:47:43 +0900
+
+tts (0.1.1-33slp2+1) unstable; urgency=low
+
+  * Update API for async init
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-33slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 04 Jun 2012 19:48:29 +0900
+
+tts (0.1.1-32slp2+1) unstable; urgency=low
+
+  * Add config file
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-32slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 24 May 2012 14:50:30 +0900
+
+tts (0.1.1-31slp2+1) unstable; urgency=low
+
+  * update config not to depend on VConf
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-31slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 18 May 2012 18:56:19 +0900
+
+tts (0.1.1-30slp2+1) unstable; urgency=low
+
+  * fix bug about fork daemon
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-30slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 26 Mar 2012 15:48:37 +0900
+
+tts (0.1.1-29slp2+1) unstable; urgency=low
+
+  * udpate changelog
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-29slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 19 Mar 2012 19:20:22 +0900
+
+tts (0.1.1-28slp2+1) unstable; urgency=low
+
+  * udpate setting api
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-28slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 19 Mar 2012 11:37:32 +0900
+
+tts (0.1.1-27slp2+1) unstable; urgency=low
+
+  * fix IPC bug
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-27slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 14 Mar 2012 16:14:08 +0900
+
+tts (0.1.1-26slp2+1) unstable; urgency=low
+
+  * beta release
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-26slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 17 Feb 2012 17:42:12 +0900
+
+tts (0.1.1-25slp2+1) unstable; urgency=low
+
+  * fix player bug and update doxygen
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-25slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 17 Feb 2012 10:45:28 +0900
+
+tts (0.1.1-24slp2+1) unstable; urgency=low
+
+  * update engine api
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-24slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 05 Jan 2012 15:53:48 +0900
+
+tts (0.1.1-23slp2+1) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-23slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 19 Dec 2011 13:50:50 +0900
+
+tts (0.1.1-22slp2+1) unstable; urgency=low
+
+  * code cleanup and update log 
+  * Git: slp/pkgs/t/tts
+  * Tag: tts_0.1.1-22slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 16 Dec 2011 15:56:08 +0900
+
+tts (0.1.1-21slp2+1) unstable; urgency=low
+
+  * code cleanup and update log 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-21slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 06 Dec 2011 19:01:19 +0900
+
+tts (0.1.1-20slp2+1) unstable; urgency=low
+
+  * change boiler plate 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-20slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 02 Dec 2011 10:52:46 +0900
+
+tts (0.1.1-19slp2+1) unstable; urgency=low
+
+  * update for connman 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-19slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 29 Nov 2011 16:14:14 +0900
+
+tts (0.1.1-18slp2+1) unstable; urgency=low
+
+  * bug fix about unref message
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-18slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 23 Nov 2011 15:34:46 +0900
+
+tts (0.1.1-17slp2+1) unstable; urgency=low
+
+  * update API : change sync function and use add_text in 'Play' state
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-17slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 16 Nov 2011 11:28:03 +0900
+
+tts (0.1.1-16slp2+1) unstable; urgency=low
+
+  * update Setting API 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-16slp2+1 
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 01 Nov 2011 11:24:58 +0900
+
+tts (0.1.1-15slp2+1) unstable; urgency=low
+
+  * update API doxygen and fix bug about initial default voice 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-15slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 27 Oct 2011 11:06:49 +0900
+
+tts (0.1.1-14slp2+1) unstable; urgency=low
+
+  * change API for SDK release
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-14slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 21 Oct 2011 16:42:51 +0900
+
+tts (0.1.1-13slp2+1) unstable; urgency=low
+
+  * update API's new callback 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-13slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 20 Oct 2011 17:49:13 +0900
+
+tts (0.1.1-12slp2+1) unstable; urgency=low
+
+  * update new API for sdk release and change boilerplate
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-12slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 19 Oct 2011 16:31:50 +0900
+
+tts (0.1.1-11slp2+1) unstable; urgency=low
+
+  * update bug of prevent and remove dependency of gtk
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-11slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 07 Sep 2011 14:47:34 +0900
+
+tts (0.1.1-10slp2+1) unstable; urgency=low
+
+  * update build file
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-10slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 19 Jul 2011 16:15:13 +0900
+
+tts (0.1.1-9slp2+1) unstable; urgency=low
+
+  * update build file
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-9slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 18 Jul 2011 10:27:52 +0900
+
+tts (0.1.1-8slp2+1) unstable; urgency=low
+
+  * Change IPC and Code Cleanup
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-8slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 15 Jul 2011 18:01:31 +0900
+
+tts (0.1.1-7slp2+1) unstable; urgency=low
+
+  * support multi instance 
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-7slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 24 Jun 2011 14:36:36 +0900
+
+tts (0.1.1-6slp2+1) unstable; urgency=low
+
+  * fix defect from prevent
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-6slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 07 Jun 2011 17:05:49 +0900
+
+tts (0.1.1-5slp2+1) unstable; urgency=low
+
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-5slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 23 May 2011 15:14:10 +0900
+
+tts (0.1.1-4slp2+1) unstable; urgency=low
+
+  * Change API - change error code
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-4slp2+1
+
+ -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 23 May 2011 09:00:57 +0900
+
+tts (0.1.1-3slp2+1) unstable; urgency=low
+
+  * change control file
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-3slp2+1
+
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Mon, 16 May 2011 10:45:01 +0900
+
+tts (0.1.1-2slp2+1) unstable; urgency=low
+
+  * Initial Release (change files to unix type).
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-2slp2+1
+
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Mon, 16 May 2011 10:11:02 +0900
+
+tts (0.1.1-1slp2+1) unstable; urgency=low
+
+  * Initial Release.
+  * Git: 165.213.180.234:slp/pkgs/t/tts
+  * Tag: tts_0.1.1-1slp2+1
+
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Fri, 13 May 2011 16:15:22 +0900
index 97928628a6c4b7fca7fc825fc86af598bbeb56d5..2b6732459c7fc6f09ef551dd0b5686001abf9393 100755 (executable)
@@ -26,6 +26,8 @@
 
 static bool g_is_daemon_started = false;
 
+static Ecore_Timer* g_connect_timer = NULL;
+
 /* Function definition */
 static int __tts_check_tts_daemon();
 static Eina_Bool __tts_notify_state_changed(void *data);
@@ -86,6 +88,12 @@ int tts_destroy(tts_h tts)
                return TTS_ERROR_INVALID_PARAMETER;
        }
 
+       /* check used callback */
+       if (0 != tts_client_get_use_callback(client)) {
+               SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Cannot destroy in Callback function");
+               return TTS_ERROR_OPERATION_FAILED;
+       }
+
        int ret = -1;
 
        /* check state */
@@ -100,6 +108,10 @@ int tts_destroy(tts_h tts)
                }
                g_is_daemon_started = false;
        case TTS_STATE_CREATED:
+               if (NULL != g_connect_timer) {
+                       SLOG(LOG_DEBUG, TAG_TTSC, "Connect Timer is deleted");
+                       ecore_timer_del(g_connect_timer);
+               }
                /* Free resources */
                tts_client_destroy(tts);
                break;
@@ -109,7 +121,7 @@ int tts_destroy(tts_h tts)
                if (0 != tts_dbus_close_connection()) {
                        SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to close connection");
                }
-       }
+       } 
 
        SLOG(LOG_DEBUG, TAG_TTSC, "=====");
        SLOG(LOG_DEBUG, TAG_TTSC, " ");
@@ -247,6 +259,8 @@ static Eina_Bool __tts_connect_daemon(void *data)
 
        ecore_timer_add(0, __tts_notify_state_changed, (void*)client->tts);
 
+       g_connect_timer = NULL;
+
        SLOG(LOG_DEBUG, TAG_TTSC, "[SUCCESS] uid(%d)", client->uid);
 
        SLOG(LOG_DEBUG, TAG_TTSC, "=====");
@@ -277,7 +291,7 @@ int tts_prepare(tts_h tts)
                return TTS_ERROR_INVALID_STATE;
        }
 
-       ecore_timer_add(0, __tts_connect_daemon, (void*)tts);
+       g_connect_timer = ecore_timer_add(0, __tts_connect_daemon, (void*)tts);
 
        SLOG(LOG_DEBUG, TAG_TTSC, "=====");
        SLOG(LOG_DEBUG, TAG_TTSC, " ");
index f0346ddece25c32b72368648c43da5f883909a4f..501bfbff464c014f0cc5d8b4768e951fb0721a0b 100755 (executable)
@@ -189,3 +189,8 @@ int tts_client_not_use_callback(tts_client_s* client)
        client->cb_ref_count--;
        return 0;
 }
+
+int tts_client_get_use_callback(tts_client_s* client)
+{
+       return client->cb_ref_count;
+}
\ No newline at end of file
index 11856f1959a37f2eefce1367141afa030b6d8c9c..e8eb89a3a16594a8de6718efd13674325136f285 100755 (executable)
@@ -67,6 +67,8 @@ int tts_client_use_callback(tts_client_s* client);
 
 int tts_client_not_use_callback(tts_client_s* client);
 
+int tts_client_get_use_callback(tts_client_s* client);
+
 #ifdef __cplusplus
 }
 #endif
index 020314b18549e6d310060bbec2a940a97b1ea75d..0f4f558583694c66604b6f0a96694394a21a327e 100755 (executable)
@@ -24,6 +24,8 @@
 
 static bool g_is_daemon_started = false;
 
+static Ecore_Timer* g_setting_connect_timer = NULL;
+
 static int __check_setting_tts_daemon();
 
 static tts_setting_state_e g_state = TTS_SETTING_STATE_NONE;
@@ -72,6 +74,8 @@ static Eina_Bool __tts_setting_connect_daemon(void *data)
 
        ecore_timer_add(0, __tts_setting_initialized, NULL);
 
+       g_setting_connect_timer = NULL;
+
        SLOG(LOG_DEBUG, TAG_TTSC, "=====");
        SLOG(LOG_DEBUG, TAG_TTSC, " ");
 
@@ -156,7 +160,7 @@ int tts_setting_initialize_async(tts_setting_initialized_cb callback, void* user
        g_initialized_cb = callback;
        g_user_data = user_data;
 
-       ecore_timer_add(0, __tts_setting_connect_daemon, NULL);
+       g_setting_connect_timer = ecore_timer_add(0, __tts_setting_connect_daemon, NULL);
 
        SLOG(LOG_DEBUG, TAG_TTSC, "=====");
        SLOG(LOG_DEBUG, TAG_TTSC, " ");
@@ -169,21 +173,20 @@ int tts_setting_finalize()
 {
        SLOG(LOG_DEBUG, TAG_TTSC, "===== Finalize TTS Setting");
 
+       int ret = 0;
+
        if (TTS_SETTING_STATE_NONE == g_state) {
-               SLOG(LOG_WARN, TAG_TTSC, "[WARNING] Not initialized");
-               SLOG(LOG_DEBUG, TAG_TTSC, "=====");
-               SLOG(LOG_DEBUG, TAG_TTSC, " ");
-               return TTS_SETTING_ERROR_INVALID_STATE;
+               ret = tts_setting_dbus_request_finalilze(); 
+               if (0 != ret) {
+                       SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result : %d", ret);
+               }
        }
 
-       int ret = tts_setting_dbus_request_finalilze(); 
-       if (0 != ret) {
-               SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result : %d", ret);
-               SLOG(LOG_DEBUG, TAG_TTSC, "=====");
-               SLOG(LOG_DEBUG, TAG_TTSC, " ");
-
-               return TTS_SETTING_ERROR_OPERATION_FAILED;
+       if (NULL != g_setting_connect_timer) {
+               SLOG(LOG_DEBUG, TAG_TTSC, "Setting Connect Timer is remained");
+               ecore_timer_del(g_setting_connect_timer);
        }
+
        g_is_daemon_started = false;
        
        if (0 != tts_setting_dbus_close_connection()) {
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644 (file)
index ac0d553..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-tts (0.1.1-46slp2+1) unstable; urgency=low
-
-  * Fix makefile for GCC 4.7
-
- -- Kwangyoun Kim <ky85.kim@samsung.com>  Tue, 29 Jan 2013 17:24:23 +0900
-
-tts (0.1.1-45slp2+1) unstable; urgency=low
-
-  * Fix PLM issue(P121126-2493)
-  * API is added
-
- -- Kwangyoun Kim <ky85.kim@samsung.com>  Mon, 28 Jan 2013 17:31:31 +0900
-
-tts (0.1.1-44slp2+1) unstable; urgency=low
-
-  * Fix PLM issue(P130121-3243)
-  * Add Daemon termination 
-
- -- Kwangyoun Kim <ky85.kim@samsung.com>  Thu, 24 Jan 2013 18:08:17 +0900
-
-tts (0.1.1-43slp2+1) unstable; urgency=low
-
-  * Change License and notice file
-
- -- Kwangyoun Kim <ky85.kim@samsung.com>  Wed, 23 Jan 2013 15:15:44 +0900
-
-tts (0.1.1-42slp2+1) unstable; urgency=low
-
-  * Fix prevent issue
-  * Change license file
-
- -- Kwangyoun Kim <ky85.kim@samsung.com>  Tue, 15 Jan 2013 13:09:08 +0900
-
-tts (0.1.1-41slp2+1) unstable; urgency=low
-
-  * Fix prevent issue
-  * Fix bug when engine result is NULL
-  * Change config path
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 18 Dec 2012 12:16:38 +0900
-
-tts (0.1.1-40slp2+1) unstable; urgency=low
-
-  * Fix prevent
-  * Git: framework/uifw/voice/tts
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 04 Dec 2012 16:40:08 +0900
-
-tts (0.1.1-39slp2+1) unstable; urgency=low
-
-  * Remove dependency of openssl
-  * Fix bug of config 
-  * Git: framework/uifw/voice/tts
-  * Tag: tts_0.1.1-39slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 22 Nov 2012 16:31:53 +0900
-
-tts (0.1.1-38slp2+1) unstable; urgency=low
-
-  * Add manifest and license file
-  * Add tag for binary merge
-  * Git: framework/uifw/voice/tts
-  * Tag: tts_0.1.1-38slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 10 Oct 2012 14:48:46 +0900
-
-tts (0.1.1-37slp2+1) unstable; urgency=low
-
-  * Fix the bug of player BS
-  * Git: framework/uifw/voice/tts
-  * Tag: tts_0.1.1-37slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 16 Aug 2012 11:30:47 +0900
-
-tts (0.1.1-36slp2+1) unstable; urgency=low
-
-  * Update Setting API for async init
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-36slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 06 Aug 2012 19:30:59 +0900
-
-tts (0.1.1-35slp2+1) unstable; urgency=low
-
-  * Remove fd write option of dbus in client lib
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-35slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 31 Jul 2012 10:17:11 +0900
-
-tts (0.1.1-34slp2+1) unstable; urgency=low
-
-  * Fix the bug of setting client management
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-34slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 24 Jul 2012 13:47:43 +0900
-
-tts (0.1.1-33slp2+1) unstable; urgency=low
-
-  * Update API for async init
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-33slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 04 Jun 2012 19:48:29 +0900
-
-tts (0.1.1-32slp2+1) unstable; urgency=low
-
-  * Add config file
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-32slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 24 May 2012 14:50:30 +0900
-
-tts (0.1.1-31slp2+1) unstable; urgency=low
-
-  * update config not to depend on VConf
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-31slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 18 May 2012 18:56:19 +0900
-
-tts (0.1.1-30slp2+1) unstable; urgency=low
-
-  * fix bug about fork daemon
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-30slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 26 Mar 2012 15:48:37 +0900
-
-tts (0.1.1-29slp2+1) unstable; urgency=low
-
-  * udpate changelog
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-29slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 19 Mar 2012 19:20:22 +0900
-
-tts (0.1.1-28slp2+1) unstable; urgency=low
-
-  * udpate setting api
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-28slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 19 Mar 2012 11:37:32 +0900
-
-tts (0.1.1-27slp2+1) unstable; urgency=low
-
-  * fix IPC bug
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-27slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 14 Mar 2012 16:14:08 +0900
-
-tts (0.1.1-26slp2+1) unstable; urgency=low
-
-  * beta release
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-26slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 17 Feb 2012 17:42:12 +0900
-
-tts (0.1.1-25slp2+1) unstable; urgency=low
-
-  * fix player bug and update doxygen
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-25slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 17 Feb 2012 10:45:28 +0900
-
-tts (0.1.1-24slp2+1) unstable; urgency=low
-
-  * update engine api
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-24slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 05 Jan 2012 15:53:48 +0900
-
-tts (0.1.1-23slp2+1) unstable; urgency=low
-
-  * update changelog
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-23slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 19 Dec 2011 13:50:50 +0900
-
-tts (0.1.1-22slp2+1) unstable; urgency=low
-
-  * code cleanup and update log 
-  * Git: slp/pkgs/t/tts
-  * Tag: tts_0.1.1-22slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 16 Dec 2011 15:56:08 +0900
-
-tts (0.1.1-21slp2+1) unstable; urgency=low
-
-  * code cleanup and update log 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-21slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 06 Dec 2011 19:01:19 +0900
-
-tts (0.1.1-20slp2+1) unstable; urgency=low
-
-  * change boiler plate 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-20slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 02 Dec 2011 10:52:46 +0900
-
-tts (0.1.1-19slp2+1) unstable; urgency=low
-
-  * update for connman 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-19slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 29 Nov 2011 16:14:14 +0900
-
-tts (0.1.1-18slp2+1) unstable; urgency=low
-
-  * bug fix about unref message
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-18slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 23 Nov 2011 15:34:46 +0900
-
-tts (0.1.1-17slp2+1) unstable; urgency=low
-
-  * update API : change sync function and use add_text in 'Play' state
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-17slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 16 Nov 2011 11:28:03 +0900
-
-tts (0.1.1-16slp2+1) unstable; urgency=low
-
-  * update Setting API 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-16slp2+1 
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 01 Nov 2011 11:24:58 +0900
-
-tts (0.1.1-15slp2+1) unstable; urgency=low
-
-  * update API doxygen and fix bug about initial default voice 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-15slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 27 Oct 2011 11:06:49 +0900
-
-tts (0.1.1-14slp2+1) unstable; urgency=low
-
-  * change API for SDK release
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-14slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 21 Oct 2011 16:42:51 +0900
-
-tts (0.1.1-13slp2+1) unstable; urgency=low
-
-  * update API's new callback 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-13slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Thu, 20 Oct 2011 17:49:13 +0900
-
-tts (0.1.1-12slp2+1) unstable; urgency=low
-
-  * update new API for sdk release and change boilerplate
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-12slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 19 Oct 2011 16:31:50 +0900
-
-tts (0.1.1-11slp2+1) unstable; urgency=low
-
-  * update bug of prevent and remove dependency of gtk
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-11slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Wed, 07 Sep 2011 14:47:34 +0900
-
-tts (0.1.1-10slp2+1) unstable; urgency=low
-
-  * update build file
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-10slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 19 Jul 2011 16:15:13 +0900
-
-tts (0.1.1-9slp2+1) unstable; urgency=low
-
-  * update build file
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-9slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 18 Jul 2011 10:27:52 +0900
-
-tts (0.1.1-8slp2+1) unstable; urgency=low
-
-  * Change IPC and Code Cleanup
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-8slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 15 Jul 2011 18:01:31 +0900
-
-tts (0.1.1-7slp2+1) unstable; urgency=low
-
-  * support multi instance 
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-7slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Fri, 24 Jun 2011 14:36:36 +0900
-
-tts (0.1.1-6slp2+1) unstable; urgency=low
-
-  * fix defect from prevent
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-6slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Tue, 07 Jun 2011 17:05:49 +0900
-
-tts (0.1.1-5slp2+1) unstable; urgency=low
-
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-5slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 23 May 2011 15:14:10 +0900
-
-tts (0.1.1-4slp2+1) unstable; urgency=low
-
-  * Change API - change error code
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-4slp2+1
-
- -- Dongyeol Lee <dy3.lee@samsung.com>  Mon, 23 May 2011 09:00:57 +0900
-
-tts (0.1.1-3slp2+1) unstable; urgency=low
-
-  * change control file
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-3slp2+1
-
- -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Mon, 16 May 2011 10:45:01 +0900
-
-tts (0.1.1-2slp2+1) unstable; urgency=low
-
-  * Initial Release (change files to unix type).
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-2slp2+1
-
- -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Mon, 16 May 2011 10:11:02 +0900
-
-tts (0.1.1-1slp2+1) unstable; urgency=low
-
-  * Initial Release.
-  * Git: 165.213.180.234:slp/pkgs/t/tts
-  * Tag: tts_0.1.1-1slp2+1
-
- -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Fri, 13 May 2011 16:15:22 +0900
old mode 100644 (file)
new mode 100755 (executable)
index 36b9077..126a0a0
@@ -50,6 +50,7 @@ mkdir -p %{buildroot}/usr/share/license
 
 %files
 %manifest tts-server.manifest
+/etc/smack/accesses2.d/tts-server.rule
 %defattr(-,root,root,-)
 %{_libdir}/lib*.so
 %{_libdir}/voice/tts/1.0/ttsd.conf
index 6e3ae01465530dd19dc59cb236df69fcaf37e30a..f5bbfe2c69b05b3c5a4d162ed61fdc5fd091be12 100755 (executable)
@@ -84,11 +84,14 @@ static player_result_callback_func g_result_callback;
 /** numbering for temp file */
 static unsigned int g_index;              
 
+/** For resume when the 'Paused' state of player after end of play */
+static bool g_pause_info;
+static int g_paused_uid;
+
 
 /*
 * Internal Interfaces 
 */
-
 player_s* __player_get_item(int uid);
 
 int __save_file(const int uid, const int index, const sound_data_s data, char** filename);
@@ -99,7 +102,6 @@ int __init_wave_header(WavHeader* hdr, size_t nsamples, size_t sampling_rate, in
 
 static int msg_callback(int message, void *data, void *user_param) ;
 
-
 /*
 * Player Interfaces 
 */
@@ -118,6 +120,8 @@ int ttsd_player_init(player_result_callback_func result_cb)
        g_index = 1;
        g_player_init = true;
 
+       g_pause_info = false;
+       g_paused_uid = -1;
        return 0;
 }
 
@@ -522,15 +526,29 @@ int ttsd_player_resume(const int uid)
 
        int ret = -1;
        if (MM_PLAYER_STATE_PAUSED == player_state) {
-               ret = mm_player_resume(current->player_handle);
-               if (MM_ERROR_NONE != ret) {
-                       SLOG(LOG_ERROR, TAG_TTSD, "[Player ERROR] fail mm_player_resume() : %d", ret);
-                       return -1;
+               /* When the 'Paused' state of player after end of play */
+               if (g_pause_info == true && g_paused_uid == uid) {
+                       g_playing_info = current;
+
+                       g_pause_info = false;
+                       g_paused_uid = -1;
+                       
+                       /* Current state need load and play */
+                       ret = ttsd_player_next_play(uid);
+                       if (0 != ret) {
+                               SLOG(LOG_ERROR, TAG_TTSD, "[player] Fail to next play in resume function");
+                       }
                } else {
-                       SLOG(LOG_DEBUG, TAG_TTSD, "[Player] Resume player");
-               }
+                       ret = mm_player_resume(current->player_handle);
+                       if (MM_ERROR_NONE != ret) {
+                               SLOG(LOG_ERROR, TAG_TTSD, "[Player ERROR] fail mm_player_resume() : %d", ret);
+                               return -1;
+                       } else {
+                               SLOG(LOG_DEBUG, TAG_TTSD, "[Player] Resume player");
+                       }
 
-               g_playing_info = current;
+                       g_playing_info = current;
+               }
        } else {
                SLOG(LOG_WARN, TAG_TTSD, "[Player WARNING] Current uid is NOT paused state.");
        }
@@ -700,65 +718,7 @@ static int msg_callback(int message, void *data, void *user_param)
                break;  /*MM_MESSAGE_ERROR*/
 
        case MM_MESSAGE_BEGIN_OF_STREAM:
-               {
-                       SLOG(LOG_DEBUG, TAG_TTSD, "===== BEGIN OF STREAM CALLBACK");
-
-                       /* Check uid */
-                       player_s* current;
-                       current = __player_get_item(uid);
-                       if (NULL == current) {
-                               SLOG(LOG_ERROR, TAG_TTSD, "[PLAYER] uid(%d) is NOT valid ", uid);
-                               return -1;
-                       }
-
-                       if (TTSP_RESULT_EVENT_START == user_data->event ||
-                           (TTSP_RESULT_EVENT_FINISH == current->event && TTSP_RESULT_EVENT_FINISH == user_data->event)) {
-                               int pid;
-                               pid = ttsd_data_get_pid(uid);
-
-                               /* send utterance start message */
-                               if (0 == ttsdc_send_utt_start_message(pid, uid, utt_id)) {
-                                       SLOG(LOG_DEBUG, TAG_TTSD, "[Send SUCCESS] Send Utterance Start Signal : pid(%d), uid(%d), uttid(%d)", pid, uid, utt_id);
-                               } else 
-                                       SLOG(LOG_ERROR, TAG_TTSD, "[Send ERROR] Fail to send Utterance Start Signal : pid(%d), uid(%d), uttid(%d)", pid, uid, utt_id);
-                       } else {
-                               SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] Don't need to send Utterance Start Signal");
-                       }
-
-                       /* set current playing info */
-                       current->utt_id = utt_id;
-                       current->event = user_data->event;
-                       g_playing_info = current;
-
-                       app_state_e state;
-                       if (0 != ttsd_data_get_client_state(uid, &state)) {
-                               SLOG(LOG_ERROR, TAG_TTSD, "[PLAYER ERROR] uid is not valid : %d", uid);
-                               SLOG(LOG_DEBUG, TAG_TTSD, "=====");
-                               SLOG(LOG_DEBUG, TAG_TTSD, "  ");
-                               break;
-                       }
-
-                       /* for sync problem */
-                       if (APP_STATE_PAUSED == state) {
-                               MMPlayerStateType player_state;
-                               mm_player_get_state(current->player_handle, &player_state);
-
-                               SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] Current state(%d)", player_state);
-
-                               int ret = 0;
-                               if (MM_PLAYER_STATE_PLAYING == player_state) {
-                                       ret = mm_player_pause(current->player_handle);
-                                       if (MM_ERROR_NONE != ret) {
-                                               SLOG(LOG_ERROR, TAG_TTSD, "[PLAYER ERROR] fail mm_player_pause() : %x", ret);
-                                       } else {
-                                               SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] uid(%d) changes 'Pause' state ", uid);
-                                       }
-                               }
-                       }
 
-                       SLOG(LOG_DEBUG, TAG_TTSD, "=====");
-                       SLOG(LOG_DEBUG, TAG_TTSD, "  ");
-               }
                break;
 
        case MM_MESSAGE_END_OF_STREAM:
@@ -797,12 +757,22 @@ static int msg_callback(int message, void *data, void *user_param)
                                        SLOG(LOG_ERROR, TAG_TTSD, "[Send ERROR] Fail to send Utterance Completed Signal : pid(%d), uid(%d), uttid(%d)", pid, uid, utt_id);
                        }
 
-                       int* uid_data = (int*) g_malloc0(sizeof(int));
-                       *uid_data = uid;
+                       /* for sync problem */
+                       MMPlayerStateType player_state;
+                       mm_player_get_state(current->player_handle, &player_state);
+                       
+                       if (MM_PLAYER_STATE_PAUSED == player_state) {
+                               g_pause_info = true;    /* The current state of player is 'Paused' */
+                               g_paused_uid = uid;     /* The current uid when the current state player is 'Paused' */
+                       } else {
+                               /* play state */
+                               int* uid_data = (int*) g_malloc0(sizeof(int));
+                               *uid_data = uid;
 
-                       SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] uid = %d", *uid_data);
+                               SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] uid = %d", *uid_data);
 
-                       ecore_timer_add(0, __player_next_play, (void*)uid_data);
+                               ecore_timer_add(0, __player_next_play, (void*)uid_data);
+                       }
 
                        SLOG(LOG_DEBUG, TAG_TTSD, "=====");
                        SLOG(LOG_DEBUG, TAG_TTSD, "  ");
@@ -1066,6 +1036,26 @@ int __set_and_start(player_s* player)
                return -3;
        }
 
+       /* If wdata's event is 'start', current wdata is first data of engine for synthesis. 
+        * If wdata's event is 'finish', player should check previous event to know whether this wdata is first or not.
+        * When previous wdata's event is 'finish' and current wdata's event is 'finish', 
+        * the player should send utt started event. 
+        */
+       if (TTSP_RESULT_EVENT_START == wdata.event ||
+           (TTSP_RESULT_EVENT_FINISH == player->event && TTSP_RESULT_EVENT_FINISH == wdata.event)) {
+               int pid;
+               pid = ttsd_data_get_pid(player->uid);
+
+               /* send utterance start message */
+               if (0 != ttsdc_send_utt_start_message(pid, player->uid, wdata.utt_id)) {
+                       SLOG(LOG_ERROR, TAG_TTSD, "[Send ERROR] Fail to send Utterance Start Signal : pid(%d), uid(%d), uttid(%d)", pid, player->uid, wdata.utt_id);
+               }
+       } else {
+               SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] Don't need to send Utterance Start Signal");
+       }
+
+       g_playing_info = player;
+
        if (NULL != sound_file) 
                g_free(sound_file);
        if (NULL != wdata.data) 
diff --git a/tts-server.rule b/tts-server.rule
new file mode 100755 (executable)
index 0000000..aa88311
--- /dev/null
@@ -0,0 +1,7 @@
+tts-server system::app_logging wx\r
+tts-server tts-engine-samsung::vdata rx\r
+tts-server system::vconf rwx\r
+tts-server sound_server rw\r
+tts-server system::share rwx\r
+tts-server pulseaudio rwx\r
+tts-server dbus rw\r