1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_PKGMGR_REGISTRATION_H_
6 #define COMMON_PKGMGR_REGISTRATION_H_
8 #include <boost/filesystem.hpp>
9 #include <pkgmgr-info.h>
14 #include "common/installer_context.h"
16 namespace common_installer {
19 * \brief Adapter interface for external PkgMgr module used for registering
22 * \param manifest parsed manifest information
23 * \param pkgid package pkgid
25 * \param request_mode current request mode
27 * \return true if success
29 bool RegisterAppInPkgmgr(manifest_x* manifest,
30 const std::string& pkgid,
31 const CertificateInfo& cert_info,
33 RequestMode request_mode,
34 const boost::filesystem::path& tep_path =
35 boost::filesystem::path());
38 * \brief Adapter interface for external PkgMgr module used for upgrading
39 * package within pkgmgr
41 * \param manifest parsed manifest information
42 * \param pkgid package pkgid
43 * \param cert_info certifciate info
45 * \param request_mode current request mode
47 * \return true if success
49 bool UpgradeAppInPkgmgr(manifest_x* manifest,
50 const std::string& pkgid,
51 const CertificateInfo& cert_info,
53 RequestMode request_mode);
56 * \brief Adapter interface for external PkgMgr module used for deregistering
59 * \param manifest parsed manifest information
60 * \param pkgid package pkgid
62 * \param request_mode current request mode
64 * \return true if success
66 bool UnregisterAppInPkgmgr(manifest_x* manifest,
67 const std::string& pkgid,
69 RequestMode request_mode);
72 * \brief Adapter interface for external PkgMgr module used for updating
73 * tep info about package within pkgmgr
75 * \param tep_path path of tep file
76 * \param pkgid package pkgid
78 * \param request_mode current request mode
80 * \return true if success
82 bool UpdateTepInfoInPkgmgr(const boost::filesystem::path& tep_path,
83 const std::string& pkgid,
85 RequestMode request_mode);
88 * \brief Adapter interface for external PkgMgr module used for updating
89 * pkg disable info about package within pkgmgr
91 * \param pkgid package pkgid
93 * \param request_mode current request mode
95 * \return true if success
97 bool DisablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
98 RequestMode request_mode);
101 * \brief Adapter interface for external PkgMgr module used for updating
102 * pkg enable info about package within pkgmgr
104 * \param pkgid package pkgid
106 * \param request_mode current request mode
108 * \return true if success
110 bool EnablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
111 RequestMode request_mode);
113 } // namespace common_installer
115 #endif // COMMON_PKGMGR_REGISTRATION_H_