delete dbinfo related APIs & apply seperation of RW/RO location
[platform/core/appfw/pkgmgr-info.git] / parser / pkgmgr_parser.h
index f9402e1..b0b39f6 100644 (file)
@@ -70,33 +70,6 @@ enum {
 };
 
 /**
- * @fn char *pkgmgr_parser_get_manifest_file(const char *pkgid)
- * @brief      This API gets the manifest file of the package.
- *
- * @par                This API is for package-manager installer backends.
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in]  pkgid   pointer to package ID
- * @return     manifest file path on success, NULL on failure
- * @pre                None
- * @post               Free the manifest file pointer that is returned by API
- * @code
-static int get_manifest_file(const char *pkgid)
-{
-       char *manifest = NULL;
-       manifest = pkgmgr_parser_get_manifest_file(pkgid);
-       if (manifest == NULL)
-               return -1;
-       printf("Manifest File Path is %s\n", manifest);
-       free(manifest);
-       return 0;
-}
- * @endcode
- */
-char *pkgmgr_parser_get_manifest_file(const char *pkgid);
-char *pkgmgr_parser_get_usr_manifest_file(const char *pkgid, uid_t uid);
-
-/**
  * @fn int pkgmgr_parser_parse_manifest_for_installation(const char *manifest, char *const tagv[])
  * @fn int pkgmgr_parser_parse_usr_manifest_for_installation(const char *manifest, uid_t uid, char *const tagv[])
  * @brief      This API parses the manifest file of the package after installation and stores the data in DB.
@@ -126,37 +99,8 @@ static int parse_manifest_file_for_installation(const char *manifest)
  */
 int pkgmgr_parser_parse_manifest_for_installation(const char *manifest, char *const tagv[]);
 int pkgmgr_parser_parse_usr_manifest_for_installation(const char *manifest, uid_t uid, char *const tagv[]);
-
-/**
- * @fn int pkgmgr_parser_parse_manifest_for_installation_withtep(const char *manifest, const char *tep_path, char *const tagv[])
- * @fn int pkgmgr_parser_parse_usr_manifest_for_installation_withtep(const char *manifest, const char *tep_path, uid_t uid, char *const tagv[])
- * @brief      This API parses the manifest file of the package after installation and stores the parsed data and tep information in DB if exists.
- *
- * @par                This API is for package-manager installer backends.
- * @par Sync (or) Async : Synchronous API
- *
- * @param[in]  manifest        pointer to package manifest file
- * @param[in]  uid     the addressee user id of the instruction
- * @param[in]  tagv            array of xml tags or NULL
- * @return     0 if success, error code(<0) if fail
- * @retval     PMINFO_R_OK     success
- * @retval     PMINFO_R_EINVAL invalid argument
- * @retval     PMINFO_R_ERROR  internal error
- * @pre                None
- * @post               None
- * @code
-static int parse_manifest_file_for_installation(const char *manifest, const char *tep_path)
-{
-       int ret = 0;
-       ret = pkgmgr_parser_parse_manifest_for_installation_withtep(manifest, tep_path, NULL);
-       if (ret)
-               return -1;
-       return 0;
-}
- * @endcode
- */
-int pkgmgr_parser_parse_manifest_for_installation_withtep(const char *manifest, const char *tep_path, char *const tagv[]);
-int pkgmgr_parser_parse_usr_manifest_for_installation_withtep(const char *manifest, const char *tep_path, uid_t uid, char *const tagv[]);
+int pkgmgr_parser_process_manifest_x_for_installation(manifest_x* mfx, const char *manifest);
+int pkgmgr_parser_process_usr_manifest_x_for_installation(manifest_x* mfx, const char *manifest, uid_t uid);
 
 /**
  * @fn int pkgmgr_parser_update_tep(const char* pkgid, const char * tep_path)
@@ -219,6 +163,9 @@ static int parse_manifest_file_for_upgrade(const char *manifest)
  */
 int pkgmgr_parser_parse_manifest_for_upgrade(const char *manifest, char *const tagv[]);
 int pkgmgr_parser_parse_usr_manifest_for_upgrade(const char *manifest, uid_t uid, char *const tagv[]);
+int pkgmgr_parser_process_manifest_x_for_upgrade(manifest_x* mfx, const char *manifest);
+int pkgmgr_parser_process_usr_manifest_x_for_upgrade(manifest_x* mfx, const char *manifest, uid_t uid);
+
 /**
  * @fn int pkgmgr_parser_parse_manifest_for_uninstallation(const char *manifest, char *const tagv[])
  * @fn int pkgmgr_parser_parse_usr_manifest_for_uninstallation(const char *manifest, uid_t uid, char *const tagv[])
@@ -249,6 +196,9 @@ static int parse_manifest_file_for_uninstallation(const char *manifest)
  */
 int pkgmgr_parser_parse_manifest_for_uninstallation(const char *manifest, char *const tagv[]);
 int pkgmgr_parser_parse_usr_manifest_for_uninstallation(const char *manifest, uid_t uid, char *const tagv[]);
+int pkgmgr_parser_process_manifest_x_for_uninstallation(manifest_x* mfx, const char *manifest);
+int pkgmgr_parser_process_usr_manifest_x_for_uninstallation(manifest_x* mfx, const char *manifest, uid_t uid);
+
 /**
  * @fn int pkgmgr_parser_parse_manifest_for_preload()
  * @fn int pkgmgr_parser_parse_usr_manifest_for_preload(uid_t uid)