SET(EXEC_PREFIX "${PREFIX}")
SET(VERSION 0.2.10)
-IF (LIBDIR MATCHES "/usr/lib64")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLIB64")
-ENDIF (LIBDIR)
+ADD_DEFINITIONS("-DVOICE_LIBDIR=\"${LIBDIR}\"")
# pkg config tool
INCLUDE(FindPkgConfig)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-config.xml DESTINATION /usr/share/voice/vc/)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.vcserver.service DESTINATION /usr/share/dbus-1/services)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-server.conf DESTINATION /etc/dbus-1/session.d)
\ No newline at end of file
dbus_error_init(&err);
/* connect to the DBUS system bus, and check for errors */
- g_m_conn_sender = dbus_bus_get(DBUS_BUS_SESSION, &err);
+ g_m_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCM, "Dbus Connection Error (%s)", err.message);
}
/* connect to the DBUS system bus, and check for errors */
- g_m_conn_listener = dbus_bus_get(DBUS_BUS_SESSION, &err);
+ g_m_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCM, "Dbus Connection Error (%s)", err.message);
#define VC_CONFIG_BASE tzplatform_mkpath(TZ_USER_HOME, "share/.voice")
#define VC_CONFIG tzplatform_mkpath(TZ_USER_HOME, "share/.voice/vc-config.xml")
-#ifdef LIB64
-#define VC_DEFAULT_ENGINE_INFO "/usr/lib64/voice/vc/1.0/engine-info"
-#else
-#define VC_DEFAULT_ENGINE_INFO "/usr/lib/voice/vc/1.0/engine-info"
-#endif
+#define VC_DEFAULT_ENGINE_INFO VOICE_LIBDIR"/voice/vc/1.0/engine-info"
#define VC_NO_FOREGROUND_PID 0
[D-BUS Service]
Name=org.tizen.voice.vcserver
Exec=/usr/bin/vc-daemon
-
%{_libdir}/libvc_manager.so
%{_bindir}/vc-daemon
/usr/share/dbus-1/services/org.tizen.voice*
+/etc/dbus-1/session.d/vc-server.conf
/usr/share/voice/vc/vc-config.xml
/usr/share/license/%{name}
if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail to Send");
+ dbus_message_unref(msg);
return -1;
} else {
SLOG(LOG_DEBUG, TAG_VCD, "<<<< Send set volume : pid(%d), volume(%f)", manger_pid, volume);
int ret;
/* Create connection for sender */
- g_conn_sender = dbus_bus_get(DBUS_BUS_SESSION, &err);
+ g_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail dbus_bus_get : %s", err.message);
}
/* connect to the bus and check for errors */
- g_conn_listener = dbus_bus_get(DBUS_BUS_SESSION, &err);
+ g_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail dbus_bus_get : %s", err.message);
<busconfig>
<!-- root can own the service -->
- <policy user="default">
- <allow own_prefix="org.tizen.voice.vcclient"/>
- <allow send_destination="org.tizen.voice.vcclient"/>
- <allow receive_sender="org.tizen.voice.vcclient"/>
- </policy>
-
<policy user="root">
<allow own_prefix="org.tizen.voice.vcclient"/>
<allow send_destination="org.tizen.voice.vcclient"/>
<allow receive_sender="org.tizen.voice.vcclient"/>
</policy>
-
<policy context="default">
<allow own_prefix="org.tizen.voice.vcclient"/>
<allow send_destination="org.tizen.voice.vcclient"/>
<allow receive_sender="org.tizen.voice.vcclient"/>
</policy>
-
- <policy user="default">
- <allow own_prefix="org.tizen.voice.vcwidget"/>
- <allow send_destination="org.tizen.voice.vcwidget"/>
- <allow receive_sender="org.tizen.voice.vcwidget"/>
- </policy>
-
<policy user="root">
<allow own_prefix="org.tizen.voice.vcwidget"/>
<allow send_destination="org.tizen.voice.vcwidget"/>
<allow receive_sender="org.tizen.voice.vcwidget"/>
</policy>
-
<policy context="default">
<allow own_prefix="org.tizen.voice.vcwidget"/>
<allow send_destination="org.tizen.voice.vcwidget"/>
<allow receive_sender="org.tizen.voice.vcwidget"/>
</policy>
-
- <policy user="default">
- <allow own_prefix="org.tizen.voice.vcmanager"/>
- <allow send_destination="org.tizen.voice.vcmanager"/>
- <allow receive_sender="org.tizen.voice.vcmanager"/>
- </policy>
-
<policy user="root">
<allow own_prefix="org.tizen.voice.vcmanager"/>
<allow send_destination="org.tizen.voice.vcmanager"/>
<allow receive_sender="org.tizen.voice.vcmanager"/>
</policy>
-
<policy context="default">
<allow own_prefix="org.tizen.voice.vcmanager"/>
<allow send_destination="org.tizen.voice.vcmanager"/>
<allow receive_sender="org.tizen.voice.vcmanager"/>
</policy>
-
-
- <policy user="default">
- <allow own="org.tizen.voice.vcserver"/>
- <allow send_destination="org.tizen.voice.vcserver"/>
- <allow receive_sender="org.tizen.voice.vcserver"/>
- </policy>
<policy user="root">
<allow own="org.tizen.voice.vcserver"/>
<allow send_destination="org.tizen.voice.vcserver"/>
<allow receive_sender="org.tizen.voice.vcserver"/>
</policy>
-
- <policy user="system">
- <allow own="org.tizen.voice.vcserver"/>
- <allow send_destination="org.tizen.voice.vcserver"/>
- <allow receive_sender="org.tizen.voice.vcserver"/>
- </policy>
-
-
- <!--
- <policy context="default">
- <check send_destination="org.tizen.voice.vcserver"
- send_interface="org.tizen.voice.vcserver"
- privilege="(n/a)" />
- </policy>
- -->
-
- <!--
<policy context="default">
- <check send_destination="org.tizen.voice.vcserver"
- send_interface="org.tizen.voice.vcserver"
- privilege="http://tizen.org/privilege/recorder" />
+ <allow send_destination="org.tizen.voice.vcserver"
+ send_interface="org.tizen.voice.vcserver"/>
</policy>
- -->
</busconfig>