*/
int package_info_is_accessible(package_info_h package_info, bool *accessible);
+/**
+ * @brief Gets the installed time for the given package.
+ * @details If the package was updated, the @a installed_time represents updated time.
+ * So, the meaning of 'installed time' corresponds with 'last modified time'.
+ * @since_tizen 4.0
+ * @param[in] package_info The package information
+ * @param[out] installed_time The integer value of time_t type for installed time
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred
+ */
+int package_info_get_installed_time(package_info_h package_info, int *installed_time);
/**
* @brief Clones the package information handle.
*/
int package_info_clone(package_info_h *clone, package_info_h package_info);
-
/**
* @brief Gets the package information for the given package
* @since_tizen 2.3
return PACKAGE_MANAGER_ERROR_NONE;
}
+API int package_info_get_installed_time(package_info_h package_info, int *installed_time)
+{
+ int ret;
+ int time_value;
+
+ if (package_info == NULL || installed_time == NULL)
+ return package_manager_error(PACKAGE_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+
+ ret = pkgmgrinfo_pkginfo_get_installed_time(package_info->pkgmgr_pkginfo, &time_value);
+ if (ret < 0)
+ return package_manager_error(PACKAGE_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+
+ *installed_time = time_value;
+
+ return PACKAGE_MANAGER_ERROR_NONE;
+}
+
API int package_info_clone(package_info_h *clone, package_info_h package_info)
{
int retval;