telepathy-glib: TpConnectionManagerProtocol: deprecate in favour of TpProtocol

Xavier Claessens xclaesse at kemper.freedesktop.org
Mon Jun 4 06:16:04 PDT 2012


Module: telepathy-glib
Branch: master
Commit: 1fea0da192332a8856e01b62a0d6c30a420220d4
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=1fea0da192332a8856e01b62a0d6c30a420220d4

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri May  4 16:45:13 2012 +0100

TpConnectionManagerProtocol: deprecate in favour of TpProtocol

---

 telepathy-glib/connection-manager.c |   24 ++++++++++++++++++++++++
 telepathy-glib/connection-manager.h |   17 +++++++++++++++--
 telepathy-glib/protocol.c           |    6 ++++++
 3 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index 5017b7c..0b11a3b 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -213,6 +213,8 @@ enum
  * relied on.
  *
  * Since: 0.7.1
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 
 typedef enum {
@@ -348,6 +350,8 @@ tp_connection_manager_param_free (TpConnectionManagerParam *param)
  *  tp_connection_manager_protocol_free()
  *
  * Since: 0.11.3
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 TpConnectionManagerProtocol *
 tp_connection_manager_protocol_copy (const TpConnectionManagerProtocol *in)
@@ -380,6 +384,8 @@ tp_connection_manager_protocol_copy (const TpConnectionManagerProtocol *in)
  * Frees @proto, which was copied with tp_connection_manager_protocol_copy().
  *
  * Since: 0.11.3
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 void
 tp_connection_manager_protocol_free (TpConnectionManagerProtocol *proto)
@@ -407,11 +413,15 @@ G_DEFINE_BOXED_TYPE (TpConnectionManagerParam, tp_connection_manager_param,
  * The boxed type of a #TpConnectionManagerProtocol.
  *
  * Since: 0.11.3
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 G_DEFINE_BOXED_TYPE (TpConnectionManagerProtocol,
     tp_connection_manager_protocol,
     tp_connection_manager_protocol_copy, tp_connection_manager_protocol_free)
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 typedef struct {
     TpConnectionManager *cm;
@@ -2200,6 +2210,8 @@ tp_connection_manager_dup_protocol_names (TpConnectionManager *self)
  *
  * Returns: (transfer none): a structure representing the protocol
  * Since: 0.7.26
+ *
+ * Deprecated: 0.UNRELEASED, use tp_connection_manager_get_protocol_object()
  */
 const TpConnectionManagerProtocol *
 tp_connection_manager_get_protocol (TpConnectionManager *self,
@@ -2315,13 +2327,17 @@ tp_connection_manager_has_protocol (TpConnectionManager *self,
  *
  * Returns: %TRUE if @protocol supports the parameter @param.
  * Since: 0.7.26
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 gboolean
 tp_connection_manager_protocol_has_param (
     const TpConnectionManagerProtocol *protocol,
     const gchar *param)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   return (tp_connection_manager_protocol_get_param (protocol, param) != NULL);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /**
@@ -2334,6 +2350,8 @@ tp_connection_manager_protocol_has_param (
  * Returns: a structure representing the parameter @param, or %NULL if not
  *          supported
  * Since: 0.7.26
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 const TpConnectionManagerParam *
 tp_connection_manager_protocol_get_param (
@@ -2366,12 +2384,16 @@ tp_connection_manager_protocol_get_param (
  *
  * Returns: %TRUE if @protocol supports the parameter "register"
  * Since: 0.7.26
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 gboolean
 tp_connection_manager_protocol_can_register (
     const TpConnectionManagerProtocol *protocol)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   return tp_connection_manager_protocol_has_param (protocol, "register");
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /**
@@ -2385,6 +2407,8 @@ tp_connection_manager_protocol_can_register (
  *
  * Returns: (array zero-terminated=1) (transfer full): a #GStrv of protocol names
  * Since: 0.7.26
+ *
+ * Deprecated: 0.UNRELEASED, use #TpProtocol objects instead
  */
 gchar **
 tp_connection_manager_protocol_dup_param_names (
diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h
index eac21fe..7590031 100644
--- a/telepathy-glib/connection-manager.h
+++ b/telepathy-glib/connection-manager.h
@@ -156,24 +156,32 @@ gchar **tp_connection_manager_dup_protocol_names (TpConnectionManager *self)
   G_GNUC_WARN_UNUSED_RESULT;
 gboolean tp_connection_manager_has_protocol (TpConnectionManager *self,
     const gchar *protocol);
-const TpConnectionManagerProtocol *tp_connection_manager_get_protocol (
-    TpConnectionManager *self, const gchar *protocol);
 TpProtocol *tp_connection_manager_get_protocol_object (
     TpConnectionManager *self, const gchar *protocol);
 _TP_AVAILABLE_IN_0_18
 GList *tp_connection_manager_dup_protocols (TpConnectionManager *self)
   G_GNUC_WARN_UNUSED_RESULT;
 
+#ifndef TP_DISABLE_DEPRECATED
+_TP_DEPRECATED_IN_UNRELEASED_FOR (tp_connection_manager_get_protocol_object)
+const TpConnectionManagerProtocol *tp_connection_manager_get_protocol (
+    TpConnectionManager *self, const gchar *protocol);
+
+_TP_DEPRECATED_IN_UNRELEASED_FOR (tp_protocol_dup_param_names)
 gchar **tp_connection_manager_protocol_dup_param_names (
     const TpConnectionManagerProtocol *protocol)
   G_GNUC_WARN_UNUSED_RESULT;
+_TP_DEPRECATED_IN_UNRELEASED_FOR (tp_protocol_has_param)
 gboolean tp_connection_manager_protocol_has_param (
     const TpConnectionManagerProtocol *protocol,
     const gchar *param);
+_TP_DEPRECATED_IN_UNRELEASED_FOR (tp_protocol_dup_param)
 const TpConnectionManagerParam *tp_connection_manager_protocol_get_param (
     const TpConnectionManagerProtocol *protocol, const gchar *param);
+_TP_DEPRECATED_IN_UNRELEASED_FOR (tp_protocol_can_register)
 gboolean tp_connection_manager_protocol_can_register (
     const TpConnectionManagerProtocol *protocol);
+#endif
 
 const gchar *tp_connection_manager_param_get_name (
     const TpConnectionManagerParam *param);
@@ -203,9 +211,14 @@ GQuark tp_connection_manager_get_feature_quark_core (void) G_GNUC_CONST;
 TpConnectionManagerParam *tp_connection_manager_param_copy (
     const TpConnectionManagerParam *in);
 void tp_connection_manager_param_free (TpConnectionManagerParam *param);
+
+#ifndef TP_DISABLE_DEPRECATED
+_TP_DEPRECATED_IN_UNRELEASED
 TpConnectionManagerProtocol *tp_connection_manager_protocol_copy (
     const TpConnectionManagerProtocol *in);
+_TP_DEPRECATED_IN_UNRELEASED
 void tp_connection_manager_protocol_free (TpConnectionManagerProtocol *proto);
+#endif
 
 G_END_DECLS
 
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index 98167a1..ce23bf1 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -921,8 +921,10 @@ const TpConnectionManagerParam *tp_protocol_get_param (TpProtocol *self,
     const gchar *param)
 {
   g_return_val_if_fail (TP_IS_PROTOCOL (self), FALSE);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   return tp_connection_manager_protocol_get_param (
       &self->priv->protocol_struct, param);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /* FIXME: in Telepathy 1.0, rename to tp_protocol_get_param */
@@ -944,9 +946,11 @@ tp_protocol_dup_param (TpProtocol *self,
 {
   g_return_val_if_fail (TP_IS_PROTOCOL (self), NULL);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   return tp_connection_manager_param_copy (
       tp_connection_manager_protocol_get_param (
         &self->priv->protocol_struct, param));
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /**
@@ -984,8 +988,10 @@ GStrv
 tp_protocol_dup_param_names (TpProtocol *self)
 {
   g_return_val_if_fail (TP_IS_PROTOCOL (self), NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   return tp_connection_manager_protocol_dup_param_names (
       &self->priv->protocol_struct);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /**



More information about the telepathy-commits mailing list