Change implementation of regeneratePkgNI
[platform/core/dotnet/launcher.git] / NativeLauncher / inc / utils.h
index 927b213..dca091f 100644 (file)
@@ -165,13 +165,6 @@ bool isDirectory(const std::string& path);
 bool isManagedAssembly(const std::string& filePath);
 
 /**
- * @brief check the file is native image or not.
- * @param[in] file path
- * @return return true when the file is native image.
- */
-bool isNativeImage(const std::string& filePath);
-
-/**
  * @brief Resolve assembly files from directories and append their paths to the given list.
  * @remark If a native image exists for an assembly in the same directory, it will be used.
  *         If multiple assemblies of the same name exist, the first one will be used.
@@ -296,18 +289,30 @@ int pkgmgrGetPkgInfo(const std::string& pkgId, pkgmgrinfo_pkginfo_h* handle);
 int pkgmgrGetAppInfo(const std::string& appId, pkgmgrinfo_appinfo_h* handle);
 
 /**
- * @brief Executes the metadata filter query for all the installed packages.
+ * @brief Executes the metadata filter query for appinfo.
  *        This function is a wrapper of pkgmgrinfo_appinfo_metadata_filter_foreach() to handle multi-user case
  * @param[in] metadata filter handle
  * @param[in] callback function
  * @param[in] user data
  * @return 0 if success, otherwise -1
  */
-int pkgmgrMDFilterForeach(pkgmgrinfo_appinfo_metadata_filter_h handle,
+int pkgmgrAppMDFilterForeach(pkgmgrinfo_appinfo_metadata_filter_h handle,
                                         pkgmgrinfo_app_list_cb app_cb,
                                         void *user_data);
 
 /**
+ * @brief Executes the metadata filter query for pkginfo.
+ *        This function is a wrapper of pkgmgrinfo_pkginfo_metadata_filter_foreach()
+ * @param[in] metadata filter handle
+ * @param[in] callback function
+ * @param[in] user data
+ * @return 0 if success, otherwise -1
+ */
+int pkgmgrPkgMDFilterForeach(pkgmgrinfo_pkginfo_metadata_filter_h handle,
+                                        pkgmgrinfo_pkg_list_cb app_cb,
+                                        void *user_data);
+
+/**
  * @brief Prints HW Clock log
  * @param[in] format `printf`-like format string
  * @param[in] ... `printf`-like variadic list of arguments corresponding to the format string
@@ -326,4 +331,18 @@ const char* getNCDBStartupHook();
  */
 bool isNCDBStartupHookProvided();
 
+/**
+ * @brief get paths where the resource dll is located in RPK package
+ * @param[in] root path
+ * @return std::string colon-separated string of rpk target paths
+ */
+std::string getResourcePaths(const std::string& rootPath);
+
+/**
+ * @brief check the package is rpk type
+ * @param[in] pkgId package ID
+ * @return return true when package is rpk type
+ */
+bool isRPK(const std::string& pkgId);
+
 #endif /* __UTILS_H__ */