From f262af4bc8454c93df8dcf3cc320b24d5b6d9e9b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 22 Feb 2012 16:49:46 +0000 Subject: [PATCH 4/6] TP_NUM_DBUS_ERRORS, TP_NUM_CONTACT_FEATURES: add NUM_TP_CONTACT_FEATURES and NUM_TP_DBUS_ERRORS aren't introspectable. --- docs/reference/telepathy-glib-sections.txt | 2 ++ telepathy-glib/contact.c | 11 ++++++++++- telepathy-glib/contact.h | 3 ++- telepathy-glib/proxy.c | 11 ++++++++++- telepathy-glib/proxy.h | 3 ++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt index 57881d9..41793a6 100644 --- a/docs/reference/telepathy-glib-sections.txt +++ b/docs/reference/telepathy-glib-sections.txt @@ -3590,6 +3590,7 @@ tp_proxy_dbus_error_to_gerror TP_DBUS_ERRORS TpDBusError NUM_TP_DBUS_ERRORS +TP_NUM_DBUS_ERRORS TP_TYPE_DBUS_ERROR tp_dbus_error_get_type @@ -4872,6 +4873,7 @@ TpContact TpContactFeature TP_CONTACT_FEATURE_INVALID NUM_TP_CONTACT_FEATURES +TP_NUM_CONTACT_FEATURES TP_TYPE_CONTACT_FEATURE TpConnectionContactsByHandleCb tp_connection_dup_contact_if_possible diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c index 7575cbf..77836b0 100644 --- a/telepathy-glib/contact.c +++ b/telepathy-glib/contact.c @@ -128,11 +128,20 @@ struct _TpContact { */ /** - * NUM_TP_CONTACT_FEATURES: (skip) + * TP_NUM_CONTACT_FEATURES: * * 1 higher than the highest #TpContactFeature supported by this version of * telepathy-glib. * + * Since: 0.UNRELEASED + */ + +/** + * NUM_TP_CONTACT_FEATURES: (skip) + * + * 1 higher than the highest #TpContactFeature supported by this version of + * telepathy-glib. Use %TP_NUM_CONTACT_FEATURES in new code. + * * Since: 0.7.18 */ diff --git a/telepathy-glib/contact.h b/telepathy-glib/contact.h index cacb136..1a91a2d 100644 --- a/telepathy-glib/contact.h +++ b/telepathy-glib/contact.h @@ -67,7 +67,8 @@ typedef enum { TP_CONTACT_FEATURE_CONTACT_GROUPS, TP_CONTACT_FEATURE_CONTACT_BLOCKING, } TpContactFeature; -#define NUM_TP_CONTACT_FEATURES (TP_CONTACT_FEATURE_CONTACT_BLOCKING + 1) +#define TP_NUM_CONTACT_FEATURES (TP_CONTACT_FEATURE_CONTACT_BLOCKING + 1) +#define NUM_TP_CONTACT_FEATURES TP_NUM_CONTACT_FEATURES #define TP_CONTACT_FEATURE_INVALID ((TpContactFeature) -1) /* Basic functionality, always available */ diff --git a/telepathy-glib/proxy.c b/telepathy-glib/proxy.c index 4f74efd..34c27ed 100644 --- a/telepathy-glib/proxy.c +++ b/telepathy-glib/proxy.c @@ -109,12 +109,21 @@ tp_dbus_errors_quark (void) /** * NUM_TP_DBUS_ERRORS: (skip) * - * 1 more than the highest valid #TpDBusError at the time of compilation + * 1 more than the highest valid #TpDBusError at the time of compilation. + * In new code, use %TP_NUM_DBUS_ERRORS instead. * * Since: 0.7.1 */ /** + * TP_NUM_DBUS_ERRORS: + * + * 1 more than the highest valid #TpDBusError at the time of compilation + * + * Since: 0.UNRELEASED + */ + +/** * TP_TYPE_DBUS_ERROR: * * The #GEnumClass type of a #TpDBusError. diff --git a/telepathy-glib/proxy.h b/telepathy-glib/proxy.h index c170c4a..ed47bdb 100644 --- a/telepathy-glib/proxy.h +++ b/telepathy-glib/proxy.h @@ -55,7 +55,8 @@ typedef enum { TP_DBUS_ERROR_CANCELLED = 9, TP_DBUS_ERROR_INCONSISTENT = 10, } TpDBusError; -#define NUM_TP_DBUS_ERRORS (TP_DBUS_ERROR_INCONSISTENT + 1) +#define TP_NUM_DBUS_ERRORS (TP_DBUS_ERROR_INCONSISTENT + 1) +#define NUM_TP_DBUS_ERRORS TP_NUM_DBUS_ERRORS struct _TpProxy { /**/ -- 1.7.9.1