BuildRequires: pkgconfig(cynara-client)
BuildRequires: pkgconfig(cynara-session)
BuildRequires: pkgconfig(cynara-creds-gdbus)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
Service Adaptor Framework Library/Binary package
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/service-adaptor.service
%install_service multi-user.target.wants service-adaptor.service
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/service-adaptor
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/service-adaptor-devel
+mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
+cp LICENSE.APLv2 %{buildroot}/%{TZ_SYS_RO_SHARE}/license/service-adaptor
+cp LICENSE.APLv2 %{buildroot}/%{TZ_SYS_RO_SHARE}/license/service-adaptor-devel
%post -n service-adaptor
/sbin/ldconfig
%{_unitdir}/multi-user.target.wants/service-adaptor.service
%{_datadir}/dbus-1/system-services/org.tizen.serviceadaptor.client.service
%{_sysconfdir}/dbus-1/system.d/org.tizen.serviceadaptor.client.conf
-/usr/share/license/%{name}
+%{TZ_SYS_RO_SHARE}/license/%{name}
%{_includedir}/*.h
%files -n service-adaptor-devel
%{_includedir}/*.h
%{_includedir}/service-adaptor/*.h
%{_includedir}/service-provider/*.h
-/usr/share/license/%{name}-devel
+%{TZ_SYS_RO_SHARE}/license/%{name}-devel
cynara-client
cynara-session
cynara-creds-gdbus
+ libtzplatform-config
)
FOREACH(flag ${main_pkgs_CFLAGS})
#ifndef __DBUS_SERVER_H__
#define __DBUS_SERVER_H__
+#include <tzplatform_config.h>
+
/**
* Service Adaptor D-Bus server bus name.
*/
/**
* Service Adaptor Activation start key path
*/
-#define SERVICE_ADAPTOR_START_KEY_PATH "/opt/share/service-adaptor/.fingerprint"
+#define SERVICE_ADAPTOR_START_KEY_PATH tzplatform_mkpath(TZ_SYS_SHARE, "/service-adaptor/.fingerprint")
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include <stdio.h>
+#include <tzplatform_config.h>
#include "service-adaptor.h"
#include "service-adaptor-push.h"
/*#define PUSH_PLUGIN_PATH "/usr/lib/push-adaptor/plugins"*/
#ifdef SA_PUSH_ON_DEMAND_ENABLE
-#define SERVICE_ADAPTOR_SERVICE_FILE_PATH "/opt/share/service-adaptor/services/"
-#define SERVICE_ADAPTOR_PUSH_ENABLED_PATH "/opt/share/service-adaptor/.push/"
+#define SERVICE_ADAPTOR_SERVICE_FILE_PATH tzplatform_mkpath(TZ_SYS_SHARE, "/service-adaptor/services/")
+#define SERVICE_ADAPTOR_PUSH_ENABLED_PATH tzplatform_mkpath(TZ_SYS_SHARE, "/service-adaptor/.push/")
#endif
#define PUSH_SERVICE_FILE_KEY_PLUGIN_URI "PluginUri"
#include <glib.h>
#include <pluginConfig.h>
+#include <tzplatform_config.h>
#include "util/service_file_manager.h"
#include "service-adaptor-log.h"
ConfigHandle handle;
} service_file_t;
-#define SERVICE_FILE_ROOT_PATH "/opt/share/service-adaptor/"
-#define SERVICE_FILE_SERVICES_PATH SERVICE_FILE_ROOT_PATH "services/"
-#define SERVICE_FILE_AUTH_PATH SERVICE_FILE_ROOT_PATH ".auth/"
-#define SERVICE_FILE_PUSH_PATH SERVICE_FILE_ROOT_PATH ".push/"
+#define SERVICE_FILE_PUSH_PATH tzplatform_mkpath(TZ_SYS_SHARE, "/service-adaptor/.push/")
#define SERVICE_FILE_SECTION_STRING_GENERAL "general"
#define SERVICE_FILE_SECTION_STRING_BUS "bus"
return -102;
}
- char *path = SERVICE_FILE_PUSH_PATH;
-
DIR *dirp = NULL;
struct dirent dent, *result = NULL;
- dirp = opendir(path);
+ dirp = opendir(SERVICE_FILE_PUSH_PATH);
if (NULL == dirp) {
service_adaptor_error("dir open error");
return -103;
)
INCLUDE(FindPkgConfig)
-pkg_check_modules(test_pkgs REQUIRED dlog glib-2.0 capi-appfw-application)
+pkg_check_modules(test_pkgs REQUIRED dlog glib-2.0 capi-appfw-application libtzplatform-config)
FOREACH(flag ${test_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <string.h>
#include <glib-object.h>
#include <glib-unix.h>
+#include <tzplatform-config.h>
#include "service_adaptor_client.h"
printf("service_auth_oauth1_get_access_token() Request Successed\n");
}
- char *cloud_path = "/root/cloud";
+ char *cloud_path = tzplatform_mkstr(TZ_SYS_ROOT,"/cloud");
service_storage_cloud_file_h file = NULL;
ret = service_storage_cloud_file_create(service_plugin, &file);
ret = service_storage_cloud_file_set_callback(file, _service_storage_cloud_file_cb, NULL);