#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 "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 deregistering
+ * package into pkgmgr for pkgid
+ *
+ * \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 xml_path path to generated xml
+ * \param manifest parsed manifest information
* \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,
const std::string& pkgid,
uid_t uid,
RequestMode request_mode);
*
* \return true if success
*/
-bool UpdateTepInfoInPkgmgr(const boost::filesystem::path& tep_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 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 true if success
+ */
+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 updating
* pkg disable info about package within pkgmgr
*
* \param pkgid package pkgid
bool EnablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
RequestMode request_mode);
+/**
+ * \brief Adapter interface for inserting pkg plugin execution info
+ *
+ * \param manifest parsed manifest information
+ * \param uid user id
+ * \param request_mode current request mode
+ *
+ * \return true if success
+ */
+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_