int package_info_get_main_app_id(package_info_h package_info, char **main_app_id);
/**
+ * @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 3.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);
+
+/**
* @}
*/
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;