Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / pkgmgr_registration.h
index 70d71b1..8604e23 100644 (file)
@@ -5,10 +5,10 @@
 #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"
@@ -19,46 +19,60 @@ namespace common_installer {
  * \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
@@ -66,7 +80,6 @@ bool UpgradeAppInPkgmgr(manifest_x* manifest,
  * \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);
@@ -82,13 +95,29 @@ bool UnregisterAppInPkgmgr(manifest_x* manifest,
  *
  * \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
@@ -113,6 +142,44 @@ bool DisablePkgInPkgmgr(const std::string& pkgid, uid_t uid,
 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_