## Dependent packages ##
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
- glib-2.0 dbus-1 vconf dlog ecore ecore-file capi-media-audio-io capi-media-sound-manager
+ glib-2.0 dbus-1 vconf dlog ecore ecore-file capi-media-audio-io capi-media-sound-manager libtzplatform-config
)
## Client library ##
Name: stt
Summary: Speech To Text client library and daemon
Version: 0.1.41
-Release: 1
-Group: UI Framework/Libraries
+Release: 0
+Group: Graphics & UI Framework/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-Source1001: %{name}.manifest
-Source1002: %{name}-devel.manifest
+Source1001: %{name}.manifest
+Source1002: %{name}-devel.manifest
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(capi-media-audio-io)
BuildRequires: pkgconfig(capi-media-sound-manager)
-
+BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: cmake
%description
%package devel
Summary: Speech To Text header files for STT development
-Group: Development/UI Framework
+Group: Graphics & UI Framework/Development
Requires: %{name} = %{version}-%{release}
%description devel
%files
%manifest %{name}.manifest
%license LICENSE.APLv2
-/etc/config/sysinfo-stt.xml
+%config %{_sysconfdir}/config/sysinfo-stt.xml
%defattr(-,root,root,-)
%{_libdir}/libstt.so
%{_libdir}/libstt_setting.so
*/
#include <Ecore_File.h>
+
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "sttd_main.h"
#include "sttd_config.h"
-#define CONFIG_FILE_PATH CONFIG_DIRECTORY"/sttd.conf"
+#define CONFIG_FILE_PATH tzplatform_mkpath(TZ_USER_HOME, ".voice/sttd.conf")
#define CONFIG_DEFAULT BASE_DIRECTORY_DEFAULT"/sttd.conf"
#define ENGINE_ID "ENGINE_ID"
strncat(filepath, dirp->d_name, strlen(dirp->d_name) );
} else {
SLOG(LOG_ERROR, TAG_STTD, "[Engine Agent ERROR] Memory not enough!!" );
- continue;
+ continue;
}
/* get its info and update engine list */
#include <dlog.h>
#include <errno.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#define ENGINE_DIRECTORY_DEFAULT "/usr/lib/voice/stt/1.0/engine"
#define ENGINE_DIRECTORY_DEFAULT_SETTING "/usr/lib/voice/stt/1.0/setting"
-#define CONFIG_DIRECTORY "/opt/home/app/.voice"
+#define CONFIG_DIRECTORY tzplatform_mkpath(TZ_USER_HOME, ".voice")
-#define ENGINE_DIRECTORY_DOWNLOAD "/opt/usr/voice/stt/1.0/engine"
-#define ENGINE_DIRECTORY_DOWNLOAD_SETTING "/opt/usr/voice/stt/1.0/setting"
+#define ENGINE_DIRECTORY_DOWNLOAD tzplatform_mkpath(TZ_USER_HOME, ".voice/stt/1.0/engine")
+#define ENGINE_DIRECTORY_DOWNLOAD_SETTING tzplatform_mkpath(TZ_USER_HOME, ".voice/stt/1.0/setting")
/* for debug message */
#define RECORDER_DEBUG