telepathy-glib: TpConnectionManager: seal struct fields and do not document them

Xavier Claessens xclaesse at kemper.freedesktop.org
Mon Jun 4 04:55:03 PDT 2012


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

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

TpConnectionManager: seal struct fields and do not document them

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17112

---

 telepathy-glib/connection-manager.c |   26 +++++++-------------------
 telepathy-glib/connection-manager.h |   14 +++++++-------
 2 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index a4c2d61..8c5627f 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -159,21 +159,6 @@ enum
 
 /**
  * TpConnectionManager:
- * @parent: The parent class instance
- * @name: The identifier of the connection manager (e.g. "gabble").
- *  Should be considered read-only
- * @protocols: If info_source > %TP_CM_INFO_SOURCE_NONE, a %NULL-terminated
- *  array of pointers to #TpConnectionManagerProtocol structures; otherwise
- *  %NULL. Should be considered read-only
- * @running: %TRUE if the CM is currently known to be running. Should be
- *  considered read-only
- * @always_introspect: %TRUE if the CM will be introspected automatically.
- *  Should be considered read-only: use the
- *  #TpConnectionManager:always-introspect property if you want to change it
- * @info_source: The source of @protocols, or %TP_CM_INFO_SOURCE_NONE
- *  if no info has been discovered yet
- * @reserved_flags: Reserved for future use
- * @priv: Pointer to opaque private data
  *
  * A proxy object for a Telepathy connection manager.
  *
@@ -187,10 +172,13 @@ enum
  * %TP_CONNECTION_MANAGER_FEATURE_CORE is prepared. Use
  * tp_proxy_prepare_async() to wait for this to happen.
  *
- * Note that the @protocols may be freed and reallocated (based on new
- * information) whenever the main loop is entered. Since 0.11.3, each protocol
- * struct can be copied with tp_connection_manager_protocol_copy() if a
- * private copy is needed.
+ * Since 0.UNRELEASED, accessing the fields of this struct is deprecated,
+ * and they are no longer documented here.
+ * Use the accessors tp_connection_manager_get_name(),
+ * tp_connection_manager_is_running(),
+ * tp_connection_manager_dup_protocols(),
+ * tp_connection_manager_get_info_source()
+ * and the #TpConnectionManager:always-introspect property instead.
  *
  * Since: 0.7.1
  */
diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h
index 0e48a39..efc1566 100644
--- a/telepathy-glib/connection-manager.h
+++ b/telepathy-glib/connection-manager.h
@@ -80,18 +80,18 @@ typedef enum
 } TpCMInfoSource;
 
 struct _TpConnectionManager {
-    /*<public>*/
+    /*<private>*/
     TpProxy parent;
 
-    const gchar *name;
-    const TpConnectionManagerProtocol * const *protocols;
+    const gchar *_TP_SEAL (name);
+    const TpConnectionManagerProtocol * const *_TP_SEAL (protocols);
 
     /* These are really booleans, but gboolean is signed. Thanks, GLib */
-    unsigned int running:1;
-    unsigned int always_introspect:1;
+    unsigned int _TP_SEAL (running):1;
+    unsigned int _TP_SEAL (always_introspect):1;
     /* TpCMInfoSource, but can't rely on enums being unsigned */
-    unsigned int info_source:2;
-    guint reserved_flags:28;
+    unsigned int _TP_SEAL (info_source):2;
+    guint _TP_SEAL (reserved_flags):28;
 
     TpConnectionManagerPrivate *priv;
 };



More information about the telepathy-commits mailing list