#ifndef COMMON_PKGMGR_REGISTRATION_H_
#define COMMON_PKGMGR_REGISTRATION_H_
-#include <boost/filesystem.hpp>
#include <pkgmgr-info.h>
#include <unistd.h>
+#include <filesystem>
#include <string>
-#include <vector>
#include "common/installer_context.h"
* \brief Adapter interface for external PkgMgr module used for registering
* package into pkgmgr
*
- * \param xml_path path to generated xml
+ * \param manifest parsed manifest information
* \param pkgid package pkgid
* \param uid user id
+ * \param storage install storage
* \param request_mode current request mode
*
* \return true if success
*/
bool RegisterAppInPkgmgr(manifest_x* manifest,
- const boost::filesystem::path& xml_path,
const std::string& pkgid,
const CertificateInfo& cert_info,
uid_t uid,
+ Storage storage,
RequestMode request_mode,
- const boost::filesystem::path& tep_path =
- boost::filesystem::path());
+ const std::filesystem::path& tep_path);
/**
* \brief Adapter interface for external PkgMgr module used for upgrading
* package within pkgmgr
*
- * \param xml_path path to generated xml
+ * \param manifest parsed manifest information
* \param pkgid package pkgid
* \param cert_info certifciate info
* \param uid user id
+ * \param storage install storage
* \param request_mode current request mode
*
* \return true if success
*/
bool UpgradeAppInPkgmgr(manifest_x* manifest,
- const boost::filesystem::path& xml_path,
const std::string& pkgid,
const CertificateInfo& cert_info,
uid_t uid,
+ Storage storage,
RequestMode request_mode);
/**
- * \brief Adapter interface for external PkgMgr module used for updating
- * tep info about package within pkgmgr
+ * \brief Adapter interface for external PkgMgr module used for deregistering
+ * package into pkgmgr for pkgid
*
- * \param tep_path path of tep file
+ * \param pkgid unregistered package pkgid
+ * \param uid user id
+ * \param request_mode current request mode
+ *
+ * \return true if success
+ */
+bool UnregisterAppInPkgmgrForPkgId(const std::string& pkgid, uid_t uid,
+ RequestMode request_mode);
+
+/**
+ * \brief Adapter interface for external PkgMgr module used for deregistering
+ * package into pkgmgr
+ *
+ * \param manifest parsed manifest information
* \param pkgid package pkgid
* \param uid user id
* \param request_mode current request mode
*
* \return true if success
*/
-bool UpdateTepInfoInPkgmgr(const boost::filesystem::path& tep_path,
+bool UnregisterAppInPkgmgr(manifest_x* manifest,
const std::string& pkgid,
uid_t uid,
RequestMode request_mode);
/**
- * \brief Adapter interface for external PkgMgr module used for deregistering
- * package into pkgmgr
+ * \brief Adapter interface for external PkgMgr module used for updating
+ * tep info about package within pkgmgr
*
- * \param xml_path path to generated xml
+ * \param tep_path path of tep file
* \param pkgid package pkgid
* \param uid user id
* \param request_mode current request mode
*
* \return true if success
*/
-bool UnregisterAppInPkgmgr(manifest_x* manifest,
- const boost::filesystem::path& xml_path,
+bool UpdateTepInfoInPkgmgr(const std::filesystem::path& tep_path,
const std::string& pkgid,
uid_t uid,
RequestMode request_mode);
/**
- * \brief Adapter interface for external PkgMgr module used for getting
- * certificate information for given package
+ * \brief Adapter interface for external PkgMgr module used for updating
+ * installed storage info about package within pkgmgr
*
+ * \param storage installed storage of package
+ * \param ext_path external/extended path of package
* \param pkgid package pkgid
* \param uid user id
*
- * \return returns certificate information
+ * \return true if success
*/
-std::string QueryCertificateAuthorCertificate(const std::string& pkgid,
- uid_t uid);
+bool UpdateInstalledStorageInPkgmgr(Storage storage,
+ const std::filesystem::path& ext_path,
+ const std::string& pkgid,
+ uid_t uid);
/**
- * \brief Adapter interface for external PkgMgr module used for getting
- * list of appids for given package
+ * \brief Adapter interface for external PkgMgr module used for updating
+ * pkg disable info about package within pkgmgr
*
- * \param pkg_id[in] package pkgid
- * \param result[out] Output
+ * \param pkgid package pkgid
* \param uid user id
+ * \param request_mode current request mode
*
* \return true if success
*/
-bool QueryAppidsForPkgId(const std::string& pkg_id,
- std::vector<std::string>* result, uid_t uid);
+bool DisablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
+ RequestMode request_mode);
/**
- * \brief Adapter interface for external PkgMgr module used for getting
- * list of privileges for given package
+ * \brief Adapter interface for external PkgMgr module used for updating
+ * pkg enable info about package within pkgmgr
*
- * \param pkg_id id of package
+ * \param pkgid package pkgid
* \param uid user id
- * \param result result - privileges
+ * \param request_mode current request mode
*
* \return true if success
*/
-bool QueryPrivilegesForPkgId(const std::string& pkg_id, uid_t uid,
- std::vector<std::string>* result);
+bool EnablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
+ RequestMode request_mode);
/**
- * \brief Adapter interface for external PkgMgr module used for checking
- * if given package is installed/registered
+ * \brief Adapter interface for inserting pkg plugin execution info
*
- * \param pkg_id package id
- * \param request_mode request mode
+ * \param manifest parsed manifest information
+ * \param uid user id
+ * \param request_mode current request mode
*
- * \return true if package is installed
+ * \return true if success
*/
-bool IsPackageInstalled(const std::string& pkg_id, RequestMode request_mode);
+bool RegisterPluginInfo(manifest_x* manifest,
+ uid_t uid,
+ RequestMode request_mode);
+/**
+ * \brief Adapter interface for updating pkg plugin execution info
+ *
+ * \param manifest parsed manifest information
+ * \param uid user id
+ * \param request_mode current request mode
+ *
+ * \return true if success
+ */
+bool UpdatePluginInfo(manifest_x* manifest,
+ uid_t uid,
+ RequestMode request_mode);
+
+/**
+ * \brief Adapter interface for deleting pkg plugin execution info
+ *
+ * \param pkgid package ID
+ * \param uid user id
+ * \param request_mode current request mode
+ *
+ * \return true if success
+ */
+bool UnregisterPluginInfo(const std::string& pkgid,
+ uid_t uid,
+ RequestMode request_mode);
} // namespace common_installer
#endif // COMMON_PKGMGR_REGISTRATION_H_