RequestMode (Global/User) type introduction
[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/context_installer.h"
15
16 namespace common_installer {
17
18 bool RegisterAppInPkgmgr(const boost::filesystem::path& xml_path,
19                          const std::string& pkgid,
20                          const CertificateInfo& cert_info,
21                          uid_t uid,
22                          RequestMode request_mode);
23 bool UpgradeAppInPkgmgr(const boost::filesystem::path& xml_path,
24                         const std::string& pkgid,
25                         const CertificateInfo& cert_info,
26                         uid_t uid,
27                         RequestMode request_mode);
28 bool UnregisterAppInPkgmgr(const boost::filesystem::path& xml_path,
29                            const std::string& pkgid,
30                            uid_t uid,
31                            RequestMode request_mode);
32 std::string QueryCertificateAuthorCertificate(const std::string& pkgid,
33                                               uid_t uid);
34 bool IsPackageInstalled(const std::string& pkg_id, RequestMode request_mode);
35
36 }  // namespace common_installer
37
38 #endif  // COMMON_PKGMGR_REGISTRATION_H_