Add missing attribute in manifest.xsd.in
[platform/core/appfw/pkgmgr-info.git] / parser / pkgmgr_parser_db.h
old mode 100755 (executable)
new mode 100644 (file)
index 7dd2975..2c145bb
@@ -46,8 +46,8 @@
 extern "C" {
 #endif
 #include "pkgmgr_parser.h"
-
 /**
+ * @fn int pkgmgr_parser_insert_manifest_info_in_usr_db(manifest_x *mfx, uid_t uid)
  * @fn int pkgmgr_parser_insert_manifest_info_in_db(manifest_x *mfx)
  * @brief      This API inserts the parsed manifest info in db
  *
@@ -55,6 +55,7 @@ extern "C" {
  * @par Sync (or) Async : Synchronous API
  *
  * @param[in]  mfx     pointer to manifest info
+ * @param[in]  uid     the addressee user id of the instruction
  * @return     0 if success, error code(<0) if fail
  * @pre                None
  * @post               None
@@ -72,15 +73,18 @@ static int insert_manifest_data(manifest_x *mfx)
  * @endcode
  */
 int pkgmgr_parser_insert_manifest_info_in_db(manifest_x *mfx);
+int pkgmgr_parser_insert_manifest_info_in_usr_db(manifest_x *mfx, uid_t uid);
 
 /**
  * @fn int pkgmgr_parser_update_manifest_info_in_db(manifest_x *mfx)
+ * @fn int pkgmgr_parser_update_manifest_info_in_db(manifest_x *mfx)
  * @brief      This API updates the manifest info in db
  *
  * @par                This API is for package-manager installer backends
  * @par Sync (or) Async : Synchronous API
  *
  * @param[in]  mfx     pointer to manifest info
+ * @param[in]  uid     the addressee user id of the instruction
  * @return     0 if success, error code(<0) if fail
  * @pre                None
  * @post               None
@@ -98,8 +102,37 @@ static int update_manifest_data(manifest_x *mfx)
  * @endcode
  */
 int pkgmgr_parser_update_manifest_info_in_db(manifest_x *mfx);
+int pkgmgr_parser_update_manifest_info_in_usr_db(manifest_x *mfx, uid_t uid);
 
 /**
+ * @fn int pkgmgr_parser_update_tep_info_in_db(const char * pkgid, const char * tep_path)
+ * @fn int pkgmgr_parser_update_tep_info_in_usr_db(const char * pkgid, const char * tep_path,uid_t uid)
+ * @brief      This API updates the tep info in db
+ *
+ * @par                This API is for package-manager installer backends
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in]  pkgid   pointer to pkgid
+ * @param[in]  tep_path        path of tep file
+ * @return     0 if success, error code(<0) if fail
+ * @pre                None
+ * @post               None
+ * @code
+static int update_tep_data(const char *pkgid, *tep_path)
+{
+       int ret = 0;
+       ret = pkgmgr_parser_update_tep_info_in_db(pkgid, tep_path);
+       if (ret < 0)
+               return -1;
+       return 0;
+}
+ * @endcode
+ */
+int pkgmgr_parser_update_tep_info_in_db(const char *pkgid, const char *tep_path);
+int pkgmgr_parser_update_tep_info_in_usr_db(const char *pkgid, const char *tep_path, uid_t uid);
+
+/**
+ * @fn int pkgmgr_parser_delete_manifest_info_from_usr_db(manifest_x *mfx, uid_t uid)
  * @fn int pkgmgr_parser_delete_manifest_info_from_db(manifest_x *mfx)
  * @brief      This API deletes the parsed manifest info from db
  *
@@ -107,6 +140,7 @@ int pkgmgr_parser_update_manifest_info_in_db(manifest_x *mfx);
  * @par Sync (or) Async : Synchronous API
  *
  * @param[in]  mfx     pointer to manifest info
+ * @param[in]  uid     the addressee user id of the instruction
  * @return     0 if success, error code(<0) if fail
  * @pre                None
  * @post               None
@@ -124,10 +158,14 @@ static int delete_manifest_data(manifest_x *mfx)
  * @endcode
  */
 int pkgmgr_parser_delete_manifest_info_from_db(manifest_x *mfx);
+int pkgmgr_parser_delete_manifest_info_from_usr_db(manifest_x *mfx, uid_t uid);
 
 int pkgmgr_parser_update_preload_info_in_db();
-int pkgmgr_parser_check_and_create_db();
-int pkgmgr_parser_initialize_db();
+int pkgmgr_parser_update_preload_info_in_usr_db(uid_t uid);
+
+int pkgmgr_parser_create_and_initialize_db(uid_t uid);
+
+
 /** @} */
 #ifdef __cplusplus
 }