[glib] Annotate API introduced for 2.30 with GLIB_AVAILABLE_IN_2_30



commit a9637126465fba06c1fc73cc70eb5f683ad4e4b3
Author: Colin Walters <walters verbum org>
Date:   Fri May 25 08:42:50 2012 -0400

    Annotate API introduced for 2.30 with GLIB_AVAILABLE_IN_2_30
    
    I didn't do this comprehensively, since there's a lot of it, mainly
    due to the GDBus object manager stuff, but anyone trying to use
    that would fail fast due to lack of the gdbus code generator.
    
    My main goal was to get API additions to existing classes like
    g_data_input_stream_read_line_utf8(), as well as the lower level new
    API like glib-unix.h.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676816

 gio/gaction.h          |    1 +
 gio/gdatainputstream.h |    2 ++
 gio/gdbusconnection.h  |    3 +++
 glib/gatomic.h         |    4 ++++
 glib/gfileutils.h      |    3 +++
 glib/ghash.h           |    1 +
 glib/ghmac.h           |    9 +++++++++
 glib/glib-unix.h       |    6 ++++++
 glib/gunicode.h        |    1 +
 glib/gutils.h          |    2 ++
 glib/gvariant.h        |    2 ++
 gobject/glib-types.h   |    4 ++++
 12 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/gio/gaction.h b/gio/gaction.h
index 69e6a9a..0a4e8c3 100644
--- a/gio/gaction.h
+++ b/gio/gaction.h
@@ -58,6 +58,7 @@ struct _GActionInterface
                                                  GVariant *parameter);
 };
 
+GLIB_AVAILABLE_IN_2_30
 GType                   g_action_get_type                               (void) G_GNUC_CONST;
 
 const gchar *           g_action_get_name                               (GAction            *action);
diff --git a/gio/gdatainputstream.h b/gio/gdatainputstream.h
index 9a38dff..0f205c6 100644
--- a/gio/gdatainputstream.h
+++ b/gio/gdatainputstream.h
@@ -102,6 +102,7 @@ char *                 g_data_input_stream_read_line            (GDataInputStrea
                                                                  gsize                   *length,
                                                                  GCancellable            *cancellable,
                                                                  GError                 **error);
+GLIB_AVAILABLE_IN_2_30
 char *                 g_data_input_stream_read_line_utf8       (GDataInputStream        *stream,
 								 gsize                   *length,
 								 GCancellable            *cancellable,
@@ -115,6 +116,7 @@ char *                 g_data_input_stream_read_line_finish     (GDataInputStrea
                                                                  GAsyncResult            *result,
                                                                  gsize                   *length,
                                                                  GError                 **error);
+GLIB_AVAILABLE_IN_2_30
 char *                 g_data_input_stream_read_line_finish_utf8(GDataInputStream        *stream,
                                                                  GAsyncResult            *result,
                                                                  gsize                   *length,
diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h
index ac131dc..9b164d5 100644
--- a/gio/gdbusconnection.h
+++ b/gio/gdbusconnection.h
@@ -181,6 +181,7 @@ GVariant *g_dbus_connection_call_sync                         (GDBusConnection
                                                                gint                timeout_msec,
                                                                GCancellable       *cancellable,
                                                                GError            **error);
+GLIB_AVAILABLE_IN_2_30
 void      g_dbus_connection_call_with_unix_fd_list            (GDBusConnection    *connection,
                                                                const gchar        *bus_name,
                                                                const gchar        *object_path,
@@ -194,10 +195,12 @@ void      g_dbus_connection_call_with_unix_fd_list            (GDBusConnection
                                                                GCancellable       *cancellable,
                                                                GAsyncReadyCallback callback,
                                                                gpointer            user_data);
+GLIB_AVAILABLE_IN_2_30
 GVariant *g_dbus_connection_call_with_unix_fd_list_finish     (GDBusConnection    *connection,
                                                                GUnixFDList       **out_fd_list,
                                                                GAsyncResult       *res,
                                                                GError            **error);
+GLIB_AVAILABLE_IN_2_30
 GVariant *g_dbus_connection_call_with_unix_fd_list_sync       (GDBusConnection    *connection,
                                                                const gchar        *bus_name,
                                                                const gchar        *object_path,
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 5403f28..8b52e0b 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -40,8 +40,10 @@ gboolean                g_atomic_int_compare_and_exchange     (volatile gint  *a
                                                                gint            newval);
 gint                    g_atomic_int_add                      (volatile gint  *atomic,
                                                                gint            val);
+GLIB_AVAILABLE_IN_2_30
 guint                   g_atomic_int_and                      (volatile guint *atomic,
                                                                guint           val);
+GLIB_AVAILABLE_IN_2_30
 guint                   g_atomic_int_or                       (volatile guint *atomic,
                                                                guint           val);
 guint                   g_atomic_int_xor                      (volatile guint *atomic,
@@ -55,8 +57,10 @@ gboolean                g_atomic_pointer_compare_and_exchange (volatile void  *a
                                                                gpointer        newval);
 gssize                  g_atomic_pointer_add                  (volatile void  *atomic,
                                                                gssize          val);
+GLIB_AVAILABLE_IN_2_30
 gsize                   g_atomic_pointer_and                  (volatile void  *atomic,
                                                                gsize           val);
+GLIB_AVAILABLE_IN_2_30
 gsize                   g_atomic_pointer_or                   (volatile void  *atomic,
                                                                gsize           val);
 gsize                   g_atomic_pointer_xor                  (volatile void  *atomic,
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index f591461..7c2eb1d 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -100,7 +100,9 @@ gchar   *g_file_read_link    (const gchar  *filename,
                               GError      **error);
 
 /* Wrapper / workalike for mkdtemp() */
+GLIB_AVAILABLE_IN_2_30
 gchar   *g_mkdtemp            (gchar        *tmpl);
+GLIB_AVAILABLE_IN_2_30
 gchar   *g_mkdtemp_full       (gchar        *tmpl,
                                gint          mode);
 
@@ -114,6 +116,7 @@ gint     g_mkstemp_full       (gchar        *tmpl,
 gint     g_file_open_tmp      (const gchar  *tmpl,
                                gchar       **name_used,
                                GError      **error);
+GLIB_AVAILABLE_IN_2_30
 gchar   *g_dir_make_tmp       (const gchar  *tmpl,
                                GError      **error);
 
diff --git a/glib/ghash.h b/glib/ghash.h
index b369989..3eb8912 100644
--- a/glib/ghash.h
+++ b/glib/ghash.h
@@ -107,6 +107,7 @@ gboolean    g_hash_table_iter_next         (GHashTableIter *iter,
                                             gpointer       *value);
 GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter);
 void        g_hash_table_iter_remove       (GHashTableIter *iter);
+GLIB_AVAILABLE_IN_2_30
 void        g_hash_table_iter_replace      (GHashTableIter *iter,
                                             gpointer        value);
 void        g_hash_table_iter_steal        (GHashTableIter *iter);
diff --git a/glib/ghmac.h b/glib/ghmac.h
index e9b57de..d03d71f 100644
--- a/glib/ghmac.h
+++ b/glib/ghmac.h
@@ -41,25 +41,34 @@ G_BEGIN_DECLS
  */
 typedef struct _GHmac       GHmac;
 
+GLIB_AVAILABLE_IN_2_30
 GHmac *               g_hmac_new                    (GChecksumType  digest_type,
                                                      const guchar  *key,
                                                      gsize          key_len);
+GLIB_AVAILABLE_IN_2_30
 GHmac *               g_hmac_copy                   (const GHmac   *hmac);
+GLIB_AVAILABLE_IN_2_30
 GHmac *               g_hmac_ref                    (GHmac         *hmac);
+GLIB_AVAILABLE_IN_2_30
 void                  g_hmac_unref                  (GHmac         *hmac);
+GLIB_AVAILABLE_IN_2_30
 void                  g_hmac_update                 (GHmac         *hmac,
                                                      const guchar  *data,
                                                      gssize         length);
+GLIB_AVAILABLE_IN_2_30
 const gchar *         g_hmac_get_string             (GHmac         *hmac);
+GLIB_AVAILABLE_IN_2_30
 void                  g_hmac_get_digest             (GHmac         *hmac,
                                                      guint8        *buffer,
                                                      gsize         *digest_len);
 
+GLIB_AVAILABLE_IN_2_30
 gchar                *g_compute_hmac_for_data       (GChecksumType  digest_type,
                                                      const guchar  *key,
                                                      gsize          key_len,
                                                      const guchar  *data,
                                                      gsize          length);
+GLIB_AVAILABLE_IN_2_30
 gchar                *g_compute_hmac_for_string     (GChecksumType  digest_type,
                                                      const guchar  *key,
                                                      gsize          key_len,
diff --git a/glib/glib-unix.h b/glib/glib-unix.h
index 0b3bec1..c04f66f 100644
--- a/glib/glib-unix.h
+++ b/glib/glib-unix.h
@@ -57,24 +57,30 @@ G_BEGIN_DECLS
  */
 #define G_UNIX_ERROR (g_unix_error_quark())
 
+GLIB_AVAILABLE_IN_2_30
 GQuark g_unix_error_quark (void);
 
+GLIB_AVAILABLE_IN_2_30
 gboolean g_unix_open_pipe (gint    *fds,
                            gint     flags,
                            GError **error);
 
+GLIB_AVAILABLE_IN_2_30
 gboolean g_unix_set_fd_nonblocking (gint       fd,
                                     gboolean   nonblock,
                                     GError   **error);
 
+GLIB_AVAILABLE_IN_2_30
 GSource *g_unix_signal_source_new  (gint signum);
 
+GLIB_AVAILABLE_IN_2_30
 guint    g_unix_signal_add_full    (gint           priority,
                                     gint           signum,
                                     GSourceFunc    handler,
                                     gpointer       user_data,
                                     GDestroyNotify notify);
 
+GLIB_AVAILABLE_IN_2_30
 guint    g_unix_signal_add         (gint        signum,
                                     GSourceFunc handler,
                                     gpointer    user_data);
diff --git a/glib/gunicode.h b/glib/gunicode.h
index 83b4941..aafe933 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -628,6 +628,7 @@ gchar*   g_utf8_find_prev_char    (const gchar *str,
 glong    g_utf8_strlen            (const gchar *p,
                                    gssize       max) G_GNUC_PURE;
 
+GLIB_AVAILABLE_IN_2_30
 gchar   *g_utf8_substring         (const gchar *str,
                                    glong        start_pos,
                                    glong        end_pos) G_GNUC_MALLOC;
diff --git a/glib/gutils.h b/glib/gutils.h
index 1dd5e56..213a39f 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -207,8 +207,10 @@ typedef enum
   G_FORMAT_SIZE_IEC_UNITS   = 1 << 1
 } GFormatSizeFlags;
 
+GLIB_AVAILABLE_IN_2_30
 gchar *g_format_size_full   (guint64          size,
                              GFormatSizeFlags flags);
+GLIB_AVAILABLE_IN_2_30
 gchar *g_format_size        (guint64          size);
 
 GLIB_DEPRECATED_FOR(g_format_size)
diff --git a/glib/gvariant.h b/glib/gvariant.h
index 9abcc0b..d0cd857 100644
--- a/glib/gvariant.h
+++ b/glib/gvariant.h
@@ -86,6 +86,7 @@ gboolean                        g_variant_is_signature                  (const g
 GVariant *                      g_variant_new_variant                   (GVariant             *value);
 GVariant *                      g_variant_new_strv                      (const gchar * const  *strv,
                                                                          gssize                length);
+GLIB_AVAILABLE_IN_2_30
 GVariant *                      g_variant_new_objv                      (const gchar * const  *strv,
                                                                          gssize                length);
 GVariant *                      g_variant_new_bytestring                (const gchar          *string);
@@ -114,6 +115,7 @@ const gchar **                  g_variant_get_strv                      (GVarian
                                                                          gsize                *length);
 gchar **                        g_variant_dup_strv                      (GVariant             *value,
                                                                          gsize                *length);
+GLIB_AVAILABLE_IN_2_30
 const gchar **                  g_variant_get_objv                      (GVariant             *value,
                                                                          gsize                *length);
 gchar **                        g_variant_dup_objv                      (GVariant             *value,
diff --git a/gobject/glib-types.h b/gobject/glib-types.h
index 9ff9f60..e262534 100644
--- a/gobject/glib-types.h
+++ b/gobject/glib-types.h
@@ -237,6 +237,7 @@ GType   g_ptr_array_get_type       (void) G_GNUC_CONST;
 GType   g_bytes_get_type           (void) G_GNUC_CONST;
 GType   g_variant_type_get_gtype   (void) G_GNUC_CONST;
 GType   g_regex_get_type           (void) G_GNUC_CONST;
+GLIB_AVAILABLE_IN_2_30
 GType   g_match_info_get_type      (void) G_GNUC_CONST;
 GType   g_error_get_type           (void) G_GNUC_CONST;
 GType   g_date_time_get_type       (void) G_GNUC_CONST;
@@ -244,8 +245,11 @@ GType   g_io_channel_get_type      (void) G_GNUC_CONST;
 GType   g_io_condition_get_type    (void) G_GNUC_CONST;
 GType   g_variant_builder_get_type (void) G_GNUC_CONST;
 GType   g_key_file_get_type        (void) G_GNUC_CONST;
+GLIB_AVAILABLE_IN_2_30
 GType   g_main_loop_get_type       (void) G_GNUC_CONST;
+GLIB_AVAILABLE_IN_2_30
 GType   g_main_context_get_type    (void) G_GNUC_CONST;
+GLIB_AVAILABLE_IN_2_30
 GType   g_source_get_type          (void) G_GNUC_CONST;
 
 GLIB_DEPRECATED_FOR('G_TYPE_VARIANT')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]