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>
15 #include "common/context_installer.h"
17 namespace common_installer {
19 bool RegisterAppInPkgmgr(const boost::filesystem::path& xml_path,
20 const std::string& pkgid,
21 const CertificateInfo& cert_info,
23 RequestMode request_mode);
24 bool UpgradeAppInPkgmgr(const boost::filesystem::path& xml_path,
25 const std::string& pkgid,
26 const CertificateInfo& cert_info,
28 RequestMode request_mode);
29 bool UnregisterAppInPkgmgr(const boost::filesystem::path& xml_path,
30 const std::string& pkgid,
32 RequestMode request_mode);
33 std::string QueryCertificateAuthorCertificate(const std::string& pkgid,
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);
39 } // namespace common_installer
41 #endif // COMMON_PKGMGR_REGISTRATION_H_