## Dependent packages ##
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
- mm-player dlog ecore ecore-file dbus-1 mm-session capi-system-runtime-info vconf vconf-internal-keys
+ mm-player dlog ecore ecore-file dbus-1 mm-session capi-system-runtime-info vconf vconf-internal-keys libtzplatform-config
)
## Client library ##
#ifndef _TTS_DEFS_H__
#define _TTS_DEFS_H__
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#define TTSD_METHOD_ERROR "ttsd_method_error"
#define TTSD_METHOD_SET_STATE "ttsd_method_set_state"
#define TTSD_METHOD_GET_STATE "ttsd_method_get_state"
-
-#define MESSAGE_FILE_PATH "/opt/home/app/.voice/tts"
+
+#define MESSAGE_FILE_PATH tzplatform_mkpath(TZ_USER_HOME, ".voice/tts")
/******************************************************************************************
* Message Definition for Setting
Name: tts
Summary: Text To Speech client library and daemon
Version: 0.1.62
-Release: 1
-Group: libs
+Release: 0
+Group: Graphics & UI Framework/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-Source1001: %{name}.manifest
-Source1002: %{name}-devel.manifest
-Requires(post): /sbin/ldconfig
+Source1001: %{name}.manifest
+Source1002: %{name}-devel.manifest
+Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(dbus-1)
-BuildRequires: pkgconfig(mm-player)
-BuildRequires: pkgconfig(mm-common)
-BuildRequires: pkgconfig(mm-session)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(vconf-internal-keys)
-BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(ecore-file)
-BuildRequires: pkgconfig(capi-system-runtime-info)
-
-BuildRequires: cmake
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dbus-1)
+BuildRequires: pkgconfig(mm-player)
+BuildRequires: pkgconfig(mm-common)
+BuildRequires: pkgconfig(mm-session)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(vconf-internal-keys)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-file)
+BuildRequires: pkgconfig(capi-system-runtime-info)
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: cmake
%description
Text To Speech client library and daemon.
%files
%manifest %{name}.manifest
-/etc/config/sysinfo-tts.xml
+%config %{_sysconfdir}/config/sysinfo-tts.xml
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/voice/tts/1.0/ttsd.conf
#include <runtime_info.h>
#include <vconf.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "ttsd_main.h"
#include "ttsd_config.h"
#include "ttsd_engine_agent.h"
#define CONFIG_DEFAULT BASE_DIRECTORY_DEFAULT"/ttsd.conf"
-#define DEFAULT_ERROR_FILE_NAME CONFIG_DIRECTORY"/ttsd_default.err"
+#define DEFAULT_ERROR_FILE_NAME tzplatform_mkpath(TZ_USER_HOME, ".voice/ttsd_default.err")
#define ENGINE_ID "ENGINE_ID"
#define VOICE "VOICE"
SLOG(LOG_ERROR, get_tag(), "==================================================");
return 0;
-}
\ No newline at end of file
+}
#include <sys/inotify.h>
#include <vconf.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "ttsd_main.h"
#include "ttsd_config.h"
#include "ttsd_engine_agent.h"
#include "ttsd_data.h"
-#define NOTI_ERROR_FILE_NAME CONFIG_DIRECTORY"/ttsd_noti.err"
+#define NOTI_ERROR_FILE_NAME tzplatform_mkpath(TZ_USER_HOME, ".voice/ttsd_noti.err")
#define ENGINE_ID "ENGINE_ID"
#define VOICE "VOICE"
#include <vconf-internal-keys.h>
#include <vconf.h>
#include <runtime_info.h>
+
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "ttsd_main.h"
#include "ttsd_config.h"
#include "ttsd_engine_agent.h"
#include "ttsd_data.h"
-#define SR_ERROR_FILE_NAME CONFIG_DIRECTORY"/ttsd_sr.err"
+#define SR_ERROR_FILE_NAME tzplatform_mkpath(TZ_USER_HOME, ".voice/ttsd_sr.err")
#define ENGINE_ID "ENGINE_ID"
#include <dlog.h>
#include <errno.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "ttsp.h"
#include "tts_defs.h"
#define ENGINE_DIRECTORY_DEFAULT "/usr/lib/voice/tts/1.0/engine"
#define ENGINE_DIRECTORY_DEFAULT_SETTING "/usr/lib/voice/tts/1.0/setting"
-#define CONFIG_DIRECTORY "/opt/home/app/.voice"
-
-#define ENGINE_DIRECTORY_DOWNLOAD "/opt/usr/voice/tts/1.0/engine"
-#define ENGINE_DIRECTORY_DOWNLOAD_SETTING "/opt/usr/voice/tts/1.0/setting"
+#define CONFIG_DIRECTORY tzplatform_mkpath(TZ_USER_HOME, ".voice")
+
+#define ENGINE_DIRECTORY_DOWNLOAD tzplatform_mkpath(TZ_USER_HOME, ".voice/tts/1.0/engine")
+#define ENGINE_DIRECTORY_DOWNLOAD_SETTING tzplatform_mkpath(TZ_USER_HOME, ".voice/tts/1.0/setting")
#define CONFIG_DEFAULT BASE_DIRECTORY_DEFAULT"/ttsd.conf"
-#define DEFAULT_CONFIG_FILE_NAME CONFIG_DIRECTORY"/ttsd_default.conf"
+#define DEFAULT_CONFIG_FILE_NAME tzplatform_mkpath(TZ_USER_HOME, ".voice/ttsd_default.conf")
/* for debug message */
#define DATA_DEBUG