mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
gfileinfo: Deprecate g_file_info_{get,set}_modification_time()
They use the deprecated GTimeVal type, which is not year 2038 safe, so have to be deprecated. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1438
This commit is contained in:
parent
d166a55c64
commit
4faf4fcfaa
@ -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:
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user