Imported Upstream version 2.61.2
[platform/upstream/glib.git] / glib / gdate.h
index ff4b8c1..3bc07bf 100644 (file)
@@ -4,7 +4,7 @@
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
  * Pennington <hp@pobox.com>
  */
 
-typedef gint32  GTime;
+typedef gint32  GTime GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
 typedef guint16 GDateYear;
 typedef guint8  GDateDay;   /* day of the month */
 typedef struct _GDate GDate;
@@ -127,6 +127,8 @@ GLIB_AVAILABLE_IN_ALL
 GDate*       g_date_new_julian            (guint32      julian_day);
 GLIB_AVAILABLE_IN_ALL
 void         g_date_free                  (GDate       *date);
+GLIB_AVAILABLE_IN_2_56
+GDate*       g_date_copy                  (const GDate *date);
 
 /* check g_date_valid() after doing an operation that might fail, like
  * _parse.  Almost all g_date operations are undefined on invalid
@@ -193,14 +195,14 @@ void         g_date_set_parse             (GDate       *date,
 GLIB_AVAILABLE_IN_ALL
 void         g_date_set_time_t            (GDate       *date,
                                           time_t       timet);
-GLIB_AVAILABLE_IN_ALL
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GLIB_DEPRECATED_IN_2_62_FOR(g_date_set_time_t)
 void         g_date_set_time_val          (GDate       *date,
                                           GTimeVal    *timeval);
-#ifndef G_DISABLE_DEPRECATED
 GLIB_DEPRECATED_FOR(g_date_set_time_t)
 void         g_date_set_time              (GDate       *date,
                                            GTime        time_);
-#endif
+G_GNUC_END_IGNORE_DEPRECATIONS
 GLIB_AVAILABLE_IN_ALL
 void         g_date_set_month             (GDate       *date,
                                            GDateMonth   month);
@@ -288,21 +290,17 @@ gsize        g_date_strftime              (gchar       *s,
                                            const gchar *format,
                                            const GDate *date);
 
-#ifndef G_DISABLE_DEPRECATED
-
-#define g_date_weekday                         g_date_get_weekday
-#define g_date_month                   g_date_get_month
-#define g_date_year                    g_date_get_year
-#define g_date_day                     g_date_get_day
-#define g_date_julian                  g_date_get_julian
-#define g_date_day_of_year             g_date_get_day_of_year
-#define g_date_monday_week_of_year     g_date_get_monday_week_of_year
-#define g_date_sunday_week_of_year     g_date_get_sunday_week_of_year
-#define g_date_days_in_month           g_date_get_days_in_month
-#define g_date_monday_weeks_in_year    g_date_get_monday_weeks_in_year
-#define g_date_sunday_weeks_in_year    g_date_get_sunday_weeks_in_year
-
-#endif /* G_DISABLE_DEPRECATED */
+#define g_date_weekday                         g_date_get_weekday GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_weekday)
+#define g_date_month                   g_date_get_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_month)
+#define g_date_year                    g_date_get_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_year)
+#define g_date_day                     g_date_get_day GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day)
+#define g_date_julian                  g_date_get_julian GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_julian)
+#define g_date_day_of_year             g_date_get_day_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day_of_year)
+#define g_date_monday_week_of_year     g_date_get_monday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_week_of_year)
+#define g_date_sunday_week_of_year     g_date_get_sunday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_week_of_year)
+#define g_date_days_in_month           g_date_get_days_in_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_days_in_month)
+#define g_date_monday_weeks_in_year    g_date_get_monday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_weeks_in_year)
+#define g_date_sunday_weeks_in_year    g_date_get_sunday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_weeks_in_year)
 
 G_END_DECLS