Workaround - sending appid during deinstallation
[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 #include <vector>
14
15 #include "common/context_installer.h"
16
17 namespace common_installer {
18
19 bool RegisterAppInPkgmgr(const boost::filesystem::path& xml_path,
20                          const std::string& pkgid,
21                          const CertificateInfo& cert_info,
22                          uid_t uid,
23                          RequestMode request_mode);
24 bool UpgradeAppInPkgmgr(const boost::filesystem::path& xml_path,
25                         const std::string& pkgid,
26                         const CertificateInfo& cert_info,
27                         uid_t uid,
28                         RequestMode request_mode);
29 bool UnregisterAppInPkgmgr(const boost::filesystem::path& xml_path,
30                            const std::string& pkgid,
31                            uid_t uid,
32                            RequestMode request_mode);
33 std::string QueryCertificateAuthorCertificate(const std::string& pkgid,
34                                               uid_t uid);
35 bool QueryAppidsForPkgId(const std::string& pkg_id,
36                          std::vector<std::string>* result, uid_t uid);
37 bool IsPackageInstalled(const std::string& pkg_id, RequestMode request_mode);
38
39 }  // namespace common_installer
40
41 #endif  // COMMON_PKGMGR_REGISTRATION_H_