Rework db insertion code
[platform/core/appfw/pkgmgr-info.git] / include / pkgmgrinfo_type.h
index 4bb96b9..b46e24e 100644 (file)
@@ -137,6 +137,27 @@ enum {
  */
 #define        PMINFO_PKGINFO_INSTALL_LOCATION_EXTERNAL        "LOCATION_EXTERNAL"
 
+/**
+ * @brief Value to be used when get/set update information
+ */
+#define PMINFO_UPDATEINFO_TYPE_FORCE   "force"
+
+/**
+ * @brief Value to be used when get/set update information
+ */
+#define PMINFO_UPDATEINFO_TYPE_OPTIONAL        "optional"
+
+/**
+ * @brief Value to be used when get/set update information
+ */
+#define PMINFO_UPDATEINFO_TYPE_NONE    "none"
+
+typedef enum {
+       PMINFO_UPDATEINFO_NONE = 0,             /**<No update info exists*/
+       PMINFO_UPDATEINFO_FORCE,                /**<Don't launch application if it's not updated*/
+       PMINFO_UPDATEINFO_OPTIONAL              /**<Update exists but not force user to update it*/
+} pkgmgrinfo_updateinfo_update_type;
+
 typedef enum {
        PMINFO_HWACCELERATION_OFF = 0,          /**< Don't use hardware acceleration*/
        PMINFO_HWACCELERATION_ON = 1,           /**< Use hardware acceleration*/
@@ -176,6 +197,11 @@ typedef void *pkgmgrinfo_certinfo_h;
 typedef void *pkgmgrinfo_pkginfo_filter_h;
 
 /**
+ * @brief A handle to get/set package update information
+ */
+typedef void *pkgmgrinfo_updateinfo_h;
+
+/**
  * @brief A handle to filter application information
  */
 typedef void *pkgmgrinfo_appinfo_filter_h;
@@ -196,6 +222,21 @@ typedef void *pkgmgrinfo_appcontrol_h;
 typedef void pkgmgrinfo_client;
 
 /**
+ * @fn int (*pkgmgrinfo_foreach_updateinfo_cb) (const pkgmgrinfo_updateinfo_h handle, void *user_data)
+ *
+ * @brief Specifies the type of function passed to pkgmgrinfo_updateinfo_foreach_updateinfo()
+ *
+ * @param[in] handle the package update info handle
+ * @param[in] user_data user data passed to pkgmgrinfo_foreach_pkg_update info()
+ *
+ * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
+ *
+ * @see  pkgmgrinfo_updateinfo_foreach_updateinfo()
+ */
+typedef int (*pkgmgrinfo_foreach_updateinfo_cb) (const pkgmgrinfo_updateinfo_h handle,
+                                                       void *user_data);
+
+/**
  * @fn int (*pkgmgrinfo_pkg_list_cb) (const pkgmgrinfo_pkginfo_h handle, void *user_data)
  *
  * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_get_list(), pkgmgrinfo_pkginfo_filter_foreach_pkginfo()