diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c index db5ba5dd7..24ae903f5 100644 --- a/gio/gfileinfo.c +++ b/gio/gfileinfo.c @@ -1753,7 +1753,11 @@ g_file_info_get_size (GFileInfo *info) * * Gets the modification time of the current @info and sets it * in @result. + * + * Deprecated: 2.62: Use g_file_info_get_modification_date_time() instead, as + * #GTimeVal is deprecated due to the year 2038 problem. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_file_info_get_modification_time (GFileInfo *info, GTimeVal *result) @@ -1775,6 +1779,7 @@ g_file_info_get_modification_time (GFileInfo *info, value = g_file_info_find_value (info, attr_mtime_usec); result->tv_usec = _g_file_attribute_value_get_uint32 (value); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_file_info_get_modification_date_time: @@ -2153,7 +2158,11 @@ g_file_info_set_size (GFileInfo *info, * * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file * info to the given time value. + * + * Deprecated: 2.62: Use g_file_info_set_modification_date_time() instead, as + * #GTimeVal is deprecated due to the year 2038 problem. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_file_info_set_modification_time (GFileInfo *info, GTimeVal *mtime) @@ -2177,6 +2186,7 @@ g_file_info_set_modification_time (GFileInfo *info, if (value) _g_file_attribute_value_set_uint32 (value, mtime->tv_usec); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_file_info_set_modification_date_time: diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h index 01dcc4f14..1629a2edb 100644 --- a/gio/gfileinfo.h +++ b/gio/gfileinfo.h @@ -1046,9 +1046,11 @@ GLIB_AVAILABLE_IN_ALL const char * g_file_info_get_content_type (GFileInfo *info); GLIB_AVAILABLE_IN_ALL goffset g_file_info_get_size (GFileInfo *info); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_file_info_get_modification_date_time) void g_file_info_get_modification_time (GFileInfo *info, - GTimeVal *result); + GTimeVal *result); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_2_62 GDateTime * g_file_info_get_modification_date_time (GFileInfo *info); GLIB_AVAILABLE_IN_ALL @@ -1095,9 +1097,11 @@ void g_file_info_set_content_type (GFileInfo *info, GLIB_AVAILABLE_IN_ALL void g_file_info_set_size (GFileInfo *info, goffset size); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_file_info_set_modification_date_time) void g_file_info_set_modification_time (GFileInfo *info, - GTimeVal *mtime); + GTimeVal *mtime); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_2_62 void g_file_info_set_modification_date_time (GFileInfo *info, GDateTime *mtime);