SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
-SET(requires "dlog bundle appcore-common appcore-efl aul ail appsvc notification elementary capi-base-common alarm-service sqlite3")
+SET(requires "dlog bundle appcore-common appcore-efl aul ail appsvc notification elementary capi-base-common alarm-service sqlite3 libtzplatform-config")
SET(pc_requires "capi-base-common")
INCLUDE(FindPkgConfig)
#define __TIZEN_APPFW_APP_PRIVATE_H__
#include <appcore-common.h>
+#include <tzplatform_config.h>
// GNU gettext macro is already defined at appcore-common.h
#ifdef _
#define TIZEN_PATH_MAX 1024
-#define PATH_FMT_APP_ROOT "/opt/usr/apps"
-#define PATH_FMT_RES_DIR PATH_FMT_APP_ROOT "/%s/res"
-#define PATH_FMT_LOCALE_DIR PATH_FMT_RES_DIR "/locale"
-#define PATH_FMT_DATA_DIR PATH_FMT_APP_ROOT "/%s/data"
+#define PATH_FMT_APP_ROOT tzplatform_getenv(TZ_USER_APP)
+#define PATH_FMT_RES_DIR "/res"
+#define PATH_FMT_LOCALE_DIR "/locale"
+#define PATH_FMT_DATA_DIR "/data"
-#define PATH_FMT_RO_APP_ROOT "/usr/apps"
-#define PATH_FMT_RO_RES_DIR PATH_FMT_RO_APP_ROOT "/%s/res"
-#define PATH_FMT_RO_LOCALE_DIR PATH_FMT_RO_RES_DIR "/locale"
+#define PATH_FMT_RO_APP_ROOT tzplatform_getenv(TZ_SYS_RO_APP)
+#define PATH_FMT_RO_RES_DIR "/res"
+#define PATH_FMT_RO_LOCALE_DIR "/local"
typedef void (*app_finalizer_cb) (void *data);
BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(sqlite3)
+BuildRequires: pkgconfig(libtzplatform-config)
app_set_appcore_event_cb(app_context);
- snprintf(locale_dir, TIZEN_PATH_MAX, PATH_FMT_LOCALE_DIR, app_context->package);
+ snprintf(locale_dir, TIZEN_PATH_MAX, "%s/%s" PATH_FMT_RES_DIR
+ PATH_FMT_LOCALE_DIR, PATH_FMT_APP_ROOT, app_context->package);
if (access(locale_dir, R_OK) != 0) {
- snprintf(locale_dir, TIZEN_PATH_MAX, PATH_FMT_RO_LOCALE_DIR, app_context->package);
+ snprintf(locale_dir, TIZEN_PATH_MAX, "%s/%s" PATH_FMT_RO_RES_DIR
+ PATH_FMT_RO_LOCALE_DIR, PATH_FMT_RO_APP_ROOT, app_context->package);
}
appcore_set_i18n(app_context->app_name, locale_dir);
#include <app_private.h>
#include <app_service_private.h>
+#include <tzplatform_config.h>
+
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "CAPI_APPFW_APPLICATION"
-static const char *INSTALLED_PATH = "/opt/usr/apps";
-static const char *RO_INSTALLED_PATH = "/usr/apps";
+#define INSTALLED_PATH tzplatform_getenv(TZ_USER_APP)
+#define RO_INSTALLED_PATH tzplatform_getenv(TZ_SYS_RO_APP)
+
static const char *RES_DIRECTORY_NAME = "res";
static const char *DATA_DIRECTORY_NAME = "data";
#include <app_storage.h>
#include <app_storage_private.h>
+#include <tzplatform_config.h>
+
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "CAPI_APPFW_APPLICATION_STORAGE"
-#define INTERNAL_MEMORY_PATH "/opt/usr/media"
+#define INTERNAL_MEMORY_PATH tzplatform_getenv(TZ_USER_CONTENT)
int storage_internal_get_state()
{