#include <dlog/dlog.h>
#include <glib.h>
+
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define APP2EXT_SUCCESS 0
#define MMC_PATH "/opt/storage/sdcard"
#define APP2SD_PATH MMC_PATH"/app2sd/"
-#define APP_INSTALLATION_PATH "/opt/usr/apps/"
+#define APP_INSTALLATION_PATH tzplatform_mkpath(TZ_USER_APP, "")
/**
* Enum for application installation location
Name: app2sd
Summary: Application installation on external memory
Version: 0.5.27
-Release: 1
-Group: Application Framework/Application Installer
+Release: 0
+Group: Application Framework/Package Management
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1001: app2sd.manifest
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
Tizen application installation on external memory
### Required packages
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED libssl dlog openssl db-util pkgmgr-info vconf)
+pkg_check_modules(pkgs REQUIRED libssl dlog openssl db-util pkgmgr-info vconf libtzplatform-config)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
* It should be called before actual installation is done.
* @pre vfat type sd card must be present.
* @post Installation is done by package installer.
- Encryption password is saved in db /opt/dbspace/.app2sd.db
+ Encryption password is saved in db TZ_SYS_DB/.app2sd.db
* @param[in] appname application package name
* [Ex: com.samsung.calculator]
*This entry is parsed from application package control/manifest file.
#include <pkgmgr-info.h>
#include <vconf.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#define MAX_BUF_LEN 1024
-#define APP2SD_TMP_PATH "/opt/usr/apps/tmp"
+#define APP2SD_TMP_PATH tzplatform_mkpath(TZ_USER_APP, "tmp")
int app2sd_pre_app_install(const char *pkgid, GList* dir_list,
int size)
#include <dlog.h>
#include <time.h>
#include <db-util.h>
+
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#define MAX_QUERY_LEN 4096
#define PASSWORD_LENGTH 64
/*
*/
/*sqlite db code*/
-#define APP2SD_DB_FILE "/opt/dbspace/.app2sd.db"
+#define APP2SD_DB_FILE tzplatform_mkpath(TZ_SYS_DB, ".app2sd.db")
sqlite3 *app2sd_db;
#define QUERY_CREATE_TABLE_APP2SD "create table app2sd \
(pkgid text primary key,\