[glib: 3/5] gbookmarkfile: Deprecate GBookmarkFile APIs which use time_t
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/5] gbookmarkfile: Deprecate GBookmarkFile APIs which use time_t
- Date: Thu, 28 May 2020 15:41:32 +0000 (UTC)
commit 6147cae1c67f41b1103920884ebe5596187fb95d
Author: Philip Withnall <withnall endlessm com>
Date: Thu May 28 10:51:03 2020 +0100
gbookmarkfile: Deprecate GBookmarkFile APIs which use time_t
They use the `time_t` type, which is not year 2038 safe on 32-bit
systems, so have to be deprecated.
Signed-off-by: Philip Withnall <withnall endlessm com>
Fixes: #1931
glib/gbookmarkfile.c | 16 ++++++++++++++++
glib/gbookmarkfile.h | 16 ++++++++--------
2 files changed, 24 insertions(+), 8 deletions(-)
---
diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c
index dd15c8816..5b612127a 100644
--- a/glib/gbookmarkfile.c
+++ b/glib/gbookmarkfile.c
@@ -2507,6 +2507,8 @@ g_bookmark_file_get_is_private (GBookmarkFile *bookmark,
* If no bookmark for @uri is found then it is created.
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_set_added_date_time() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
void
g_bookmark_file_set_added (GBookmarkFile *bookmark,
@@ -2568,6 +2570,8 @@ g_bookmark_file_set_added_date_time (GBookmarkFile *bookmark,
* Returns: a timestamp
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_get_added_date_time() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
time_t
g_bookmark_file_get_added (GBookmarkFile *bookmark,
@@ -2633,6 +2637,8 @@ g_bookmark_file_get_added_date_time (GBookmarkFile *bookmark,
* g_bookmark_file_set_visited_date_time().
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_set_modified_date_time() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
void
g_bookmark_file_set_modified (GBookmarkFile *bookmark,
@@ -2697,6 +2703,8 @@ g_bookmark_file_set_modified_date_time (GBookmarkFile *bookmark,
* Returns: a timestamp
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_get_modified_date_time() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
time_t
g_bookmark_file_get_modified (GBookmarkFile *bookmark,
@@ -2763,6 +2771,8 @@ g_bookmark_file_get_modified_date_time (GBookmarkFile *bookmark,
* does not affect the "modified" time.
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_set_visited_date_time() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
void
g_bookmark_file_set_visited (GBookmarkFile *bookmark,
@@ -2828,6 +2838,8 @@ g_bookmark_file_set_visited_date_time (GBookmarkFile *bookmark,
* Returns: a timestamp.
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_get_visited_date_time() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
time_t
g_bookmark_file_get_visited (GBookmarkFile *bookmark,
@@ -3374,6 +3386,8 @@ g_bookmark_file_has_application (GBookmarkFile *bookmark,
* changed.
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_set_application_info() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
gboolean
g_bookmark_file_set_app_info (GBookmarkFile *bookmark,
@@ -3606,6 +3620,8 @@ expand_exec_line (const gchar *exec_fmt,
* Returns: %TRUE on success.
*
* Since: 2.12
+ * Deprecated: 2.66: Use g_bookmark_file_get_application_info() instead, as
+ * `time_t` is deprecated due to the year 2038 problem.
*/
gboolean
g_bookmark_file_get_app_info (GBookmarkFile *bookmark,
diff --git a/glib/gbookmarkfile.h b/glib/gbookmarkfile.h
index ba584f4f4..e9cfbf12b 100644
--- a/glib/gbookmarkfile.h
+++ b/glib/gbookmarkfile.h
@@ -163,7 +163,7 @@ gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark,
const gchar *uri,
gsize *length,
GError **error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_application_info)
gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark,
const gchar *uri,
const gchar *name,
@@ -179,7 +179,7 @@ gboolean g_bookmark_file_set_application_info (GBookmarkFile *bookmark,
int count,
GDateTime *stamp,
GError **error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_application_info)
gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark,
const gchar *uri,
const gchar *name,
@@ -214,7 +214,7 @@ gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark,
gchar **href,
gchar **mime_type,
GError **error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_added_date_time)
void g_bookmark_file_set_added (GBookmarkFile *bookmark,
const gchar *uri,
time_t added);
@@ -222,7 +222,7 @@ GLIB_AVAILABLE_IN_2_66
void g_bookmark_file_set_added_date_time (GBookmarkFile *bookmark,
const char *uri,
GDateTime *added);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_added_date_time)
time_t g_bookmark_file_get_added (GBookmarkFile *bookmark,
const gchar *uri,
GError **error);
@@ -230,7 +230,7 @@ GLIB_AVAILABLE_IN_2_66
GDateTime *g_bookmark_file_get_added_date_time (GBookmarkFile *bookmark,
const char *uri,
GError **error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_modified_date_time)
void g_bookmark_file_set_modified (GBookmarkFile *bookmark,
const gchar *uri,
time_t modified);
@@ -238,7 +238,7 @@ GLIB_AVAILABLE_IN_2_66
void g_bookmark_file_set_modified_date_time (GBookmarkFile *bookmark,
const char *uri,
GDateTime *modified);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_modified_date_time)
time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark,
const gchar *uri,
GError **error);
@@ -246,7 +246,7 @@ GLIB_AVAILABLE_IN_2_66
GDateTime *g_bookmark_file_get_modified_date_time (GBookmarkFile *bookmark,
const char *uri,
GError **error);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_set_visited_date_time)
void g_bookmark_file_set_visited (GBookmarkFile *bookmark,
const gchar *uri,
time_t visited);
@@ -254,7 +254,7 @@ GLIB_AVAILABLE_IN_2_66
void g_bookmark_file_set_visited_date_time (GBookmarkFile *bookmark,
const char *uri,
GDateTime *visited);
-GLIB_AVAILABLE_IN_ALL
+GLIB_DEPRECATED_IN_2_66_FOR(g_bookmark_file_get_visited_date_time)
time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark,
const gchar *uri,
GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]