Remove unused parameter and related codes
[platform/core/appfw/app-installers.git] / src / common / pkgmgr_registration.h
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.
4
5 #ifndef COMMON_PKGMGR_REGISTRATION_H_
6 #define COMMON_PKGMGR_REGISTRATION_H_
7
8 #include <boost/filesystem.hpp>
9 #include <pkgmgr-info.h>
10 #include <unistd.h>
11
12 #include <string>
13
14 #include "common/installer_context.h"
15
16 namespace common_installer {
17
18 /**
19  * \brief Adapter interface for external PkgMgr module used for registering
20  *        package into pkgmgr
21  *
22  * \param manifest parsed manifest information
23  * \param pkgid package pkgid
24  * \param uid user id
25  * \param request_mode current request mode
26  *
27  * \return true if success
28  */
29 bool RegisterAppInPkgmgr(manifest_x* manifest,
30                          const std::string& pkgid,
31                          const CertificateInfo& cert_info,
32                          uid_t uid,
33                          RequestMode request_mode,
34                          const boost::filesystem::path& tep_path =
35                              boost::filesystem::path());
36
37 /**
38  * \brief Adapter interface for external PkgMgr module used for upgrading
39  *        package within pkgmgr
40  *
41  * \param manifest parsed manifest information
42  * \param pkgid package pkgid
43  * \param cert_info certifciate info
44  * \param uid user id
45  * \param request_mode current request mode
46  *
47  * \return true if success
48  */
49 bool UpgradeAppInPkgmgr(manifest_x* manifest,
50                         const std::string& pkgid,
51                         const CertificateInfo& cert_info,
52                         uid_t uid,
53                         RequestMode request_mode);
54
55 /**
56  * \brief Adapter interface for external PkgMgr module used for deregistering
57  *        package into pkgmgr
58  *
59  * \param manifest parsed manifest information
60  * \param pkgid package pkgid
61  * \param uid user id
62  * \param request_mode current request mode
63  *
64  * \return true if success
65  */
66 bool UnregisterAppInPkgmgr(manifest_x* manifest,
67                            const std::string& pkgid,
68                            uid_t uid,
69                            RequestMode request_mode);
70
71 /**
72  * \brief Adapter interface for external PkgMgr module used for updating
73  *        tep info about package within pkgmgr
74  *
75  * \param tep_path path of tep file
76  * \param pkgid package pkgid
77  * \param uid user id
78  * \param request_mode current request mode
79  *
80  * \return true if success
81  */
82 bool UpdateTepInfoInPkgmgr(const boost::filesystem::path& tep_path,
83                            const std::string& pkgid,
84                            uid_t uid,
85                            RequestMode request_mode);
86
87 /**
88  * \brief Adapter interface for external PkgMgr module used for updating
89  *        pkg disable info about package within pkgmgr
90  *
91  * \param pkgid package pkgid
92  * \param uid user id
93  * \param request_mode current request mode
94  *
95  * \return true if success
96  */
97 bool DisablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
98                         RequestMode request_mode);
99
100 /**
101  * \brief Adapter interface for external PkgMgr module used for updating
102  *        pkg enable info about package within pkgmgr
103  *
104  * \param pkgid package pkgid
105  * \param uid user id
106  * \param request_mode current request mode
107  *
108  * \return true if success
109  */
110 bool EnablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
111                         RequestMode request_mode);
112
113 }  // namespace common_installer
114
115 #endif  // COMMON_PKGMGR_REGISTRATION_H_