1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_UTILS_REQUEST_H_
6 #define COMMON_UTILS_REQUEST_H_
10 namespace common_installer {
12 /** Request type received from pkgmgr_installer */
13 enum class RequestType : int {
25 ManifestDirectInstall,
27 ManifestPartialInstall,
28 ManifestPartialUpdate,
30 ReadonlyUpdateInstall,
31 ReadonlyUpdateUninstall,
38 /** Request mode (USER vs GLOBAL) */
39 enum class RequestMode : int {
45 * Get string of given request type
47 * \return request mode
49 std::string GetRequestTypeString(RequestType request_type);
52 * Get mode for current request (GLOBAL/USER)
54 * \return request mode
56 RequestMode GetRequestMode(uid_t uid);
59 * Get apps root path for current request (GLOBAL/USER)
61 * \return root application path (eg. $HOME/apps_rw/)
63 const char* GetRootAppPath(bool is_readonly, uid_t uid);
66 * Get appt root path at exteded storage for current request (GLOBAL/USER)
68 * \return root application path at extended path
69 * (eg. $TZ_SYS_MEDIA/extended/globalapps)
71 const char* GetExtendedRootAppPath(uid_t uid);
73 } // namespace common_installer
75 #endif // COMMON_UTILS_REQUEST_H_