From: Wonnam Jang Date: Wed, 10 Oct 2018 08:14:29 +0000 (+0900) Subject: Change session dbus to system dbus X-Git-Tag: submit/tizen/20181030.100516^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d886b3ee5fbcff155ff54e8d2d2d990c4f12b14d;p=platform%2Fcore%2Fuifw%2Ftts.git Change session dbus to system dbus Change-Id: I542d32b1091269d4308043c222fe75c7671a35dd Signed-off-by: Wonnam Jang Signed-off-by: Hyotaek Shim --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3522de2..b462e71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,13 +61,13 @@ ADD_SUBDIRECTORY(engine-parser) ## Config ## INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-config.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/tts/1.0) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-server.conf DESTINATION /etc/dbus-1/session.d) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-server.conf DESTINATION /etc/dbus-1/system.d) ## Dbus service ## -INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsnotiserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttssrserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsinterruptserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/system-services) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsnotiserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/system-services) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttssrserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/system-services) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsinterruptserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/system-services) ## voice_getengine ## IF("${ARCH}" MATCHES "^arm.*") diff --git a/client/tts_dbus.c b/client/tts_dbus.c index 73d9b2d..0c60f4a 100644 --- a/client/tts_dbus.c +++ b/client/tts_dbus.c @@ -181,7 +181,7 @@ int tts_dbus_open_connection() dbus_error_init(&err); /* connect to the DBUS system bus, and check for errors */ - g_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err); + g_conn_sender = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Dbus Connection Error (%s)", err.message); dbus_error_free(&err); @@ -194,7 +194,7 @@ int tts_dbus_open_connection() dbus_connection_set_exit_on_disconnect(g_conn_sender, false); - g_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err); + g_conn_listener = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Dbus Connection Error (%s)", err.message); dbus_error_free(&err); diff --git a/org.tizen.voice.ttsinterruptserver.service b/org.tizen.voice.ttsinterruptserver.service index c79f344..492bd6d 100644 --- a/org.tizen.voice.ttsinterruptserver.service +++ b/org.tizen.voice.ttsinterruptserver.service @@ -2,3 +2,5 @@ Name=org.tizen.voice.ttsinterruptserver Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-interrupt mode interrupt" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-noti mode noti" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttsinterruptserver.tv.service b/org.tizen.voice.ttsinterruptserver.tv.service index d45960e..0ad0b09 100644 --- a/org.tizen.voice.ttsinterruptserver.tv.service +++ b/org.tizen.voice.ttsinterruptserver.tv.service @@ -3,3 +3,5 @@ Name=org.tizen.voice.ttsinterruptserver #Exec=/bin/sh -c "buxton2ctl get user db/voice/tts_engine | awk '{print$5}' | xargs -t -i launch_app {}-noti" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-noti mode noti" Exec=/bin/sh -c "launch_app org.tizen.tts-engine-vd-interrupt mode interrupt" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttsnotiserver.service b/org.tizen.voice.ttsnotiserver.service index 715d186..111b70f 100644 --- a/org.tizen.voice.ttsnotiserver.service +++ b/org.tizen.voice.ttsnotiserver.service @@ -2,3 +2,5 @@ Name=org.tizen.voice.ttsnotiserver Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-noti mode noti" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-noti mode noti" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttsnotiserver.tv.service b/org.tizen.voice.ttsnotiserver.tv.service index 95ff1d7..188e228 100644 --- a/org.tizen.voice.ttsnotiserver.tv.service +++ b/org.tizen.voice.ttsnotiserver.tv.service @@ -3,3 +3,5 @@ Name=org.tizen.voice.ttsnotiserver #Exec=/bin/sh -c "buxton2ctl get user db/voice/tts_engine | awk '{print$5}' | xargs -t -i launch_app {}-noti" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-noti mode noti" Exec=/bin/sh -c "launch_app org.tizen.tts-engine-vd-noti mode noti" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttsserver.service b/org.tizen.voice.ttsserver.service index 4a92dde..14527fe 100644 --- a/org.tizen.voice.ttsserver.service +++ b/org.tizen.voice.ttsserver.service @@ -2,3 +2,5 @@ Name=org.tizen.voice.ttsserver Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttsserver.tv.service b/org.tizen.voice.ttsserver.tv.service index a30949f..cbca808 100644 --- a/org.tizen.voice.ttsserver.tv.service +++ b/org.tizen.voice.ttsserver.tv.service @@ -3,3 +3,5 @@ Name=org.tizen.voice.ttsserver #Exec=/bin/sh -c "buxton2ctl get user db/voice/tts_engine | awk '{print$5}' | xargs -t -i launch_app {}" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default" Exec=/bin/sh -c "launch_app org.tizen.tts-engine-vd" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttssrserver.service b/org.tizen.voice.ttssrserver.service index 119f965..adc2f0e 100644 --- a/org.tizen.voice.ttssrserver.service +++ b/org.tizen.voice.ttssrserver.service @@ -2,3 +2,5 @@ Name=org.tizen.voice.ttssrserver Exec=/bin/sh -c "voice_getengine get system db/voice/tts/engine/default | awk '{print$5}' | xargs -t -i launch_app {}-sr mode sr" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-sr mode sr" +User=system +Group=system \ No newline at end of file diff --git a/org.tizen.voice.ttssrserver.tv.service b/org.tizen.voice.ttssrserver.tv.service index 0833130..3d204d9 100644 --- a/org.tizen.voice.ttssrserver.tv.service +++ b/org.tizen.voice.ttssrserver.tv.service @@ -3,3 +3,5 @@ Name=org.tizen.voice.ttssrserver #Exec=/bin/sh -c "buxton2ctl get user db/voice/tts_engine | awk '{print$5}' | xargs -t -i launch_app {}-sr" #Exec=/bin/sh -c "launch_app org.tizen.tts-engine-default-sr mode sr" Exec=/bin/sh -c "launch_app org.tizen.tts-engine-vd-sr mode sr" +User=system +Group=system \ No newline at end of file diff --git a/packaging/tts.spec b/packaging/tts.spec index 731ddcf..b0377ab 100644 --- a/packaging/tts.spec +++ b/packaging/tts.spec @@ -110,15 +110,15 @@ mkdir -p %{TZ_SYS_RO_SHARE}/voice/test %defattr(-,root,root,-) %{_libdir}/lib*.so %{TZ_SYS_RO_SHARE}/voice/tts/1.0/tts-config.xml -%{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.ttsserver.service -%{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.ttsnotiserver.service -%{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.ttssrserver.service -%{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice.ttsinterruptserver.service +%{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsserver.service +%{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsnotiserver.service +%{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttssrserver.service +%{TZ_SYS_RO_SHARE}/dbus-1/system-services/org.tizen.voice.ttsinterruptserver.service #%{TZ_SYS_RO_SHARE}/voice/test/tts-test %{_bindir}/voice_getengine %{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-parser.so* #%{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-language-pack-parser.so* -/etc/dbus-1/session.d/tts-server.conf +/etc/dbus-1/system.d/tts-server.conf %files devel %manifest %{name}-devel.manifest diff --git a/server/ttsd_dbus.c b/server/ttsd_dbus.c index ce47e61..c69cd30 100644 --- a/server/ttsd_dbus.c +++ b/server/ttsd_dbus.c @@ -331,7 +331,7 @@ int ttsd_dbus_open_connection() int ret; /* Create connection for sender */ - g_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err); + g_conn_sender = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { SLOG(LOG_ERROR, tts_tag(), "[Dbus ERROR] Fail dbus_bus_get : %s", err.message); dbus_error_free(&err); @@ -345,7 +345,7 @@ int ttsd_dbus_open_connection() dbus_connection_set_exit_on_disconnect(g_conn_sender, false); /* connect to the bus and check for errors */ - g_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err); + g_conn_listener = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { SLOG(LOG_ERROR, tts_tag(), "[Dbus ERROR] Fail dbus_bus_get : %s", err.message); dbus_error_free(&err); diff --git a/tts-server.conf b/tts-server.conf index b88e2c4..9a4b34f 100644 --- a/tts-server.conf +++ b/tts-server.conf @@ -2,22 +2,45 @@ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> - - - + - - - - + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + + + +