telepathy-glib: TpBaseConnection: seal struct fields

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


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

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon May  7 14:11:44 2012 +0100

TpBaseConnection: seal struct fields

---

 telepathy-glib/base-connection.c |   24 ++++--------------------
 telepathy-glib/base-connection.h |   10 +++++-----
 2 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index ffd7328..d5fe296 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -179,29 +179,13 @@
 
 /**
  * TpBaseConnection:
- * @parent: Fields shared by the superclass.
- * @bus_name: A D-Bus well-known bus name, owned by the connection manager
- *  process and associated with this connection. Set by
- *  tp_base_connection_register; should be considered read-only by subclasses.
- * @object_path: The object-path of this connection. Set by
- *  tp_base_connection_register; should be considered read-only by subclasses.
- * @status: Connection status - may either be a valid TpConnectionStatus or
- *  TP_INTERNAL_CONNECTION_STATUS_NEW. Should be considered read-only by
- *  subclasses: use tp_base_connection_change_status() to set it.
- * @self_handle: The handle of type %TP_HANDLE_TYPE_CONTACT representing the
- *  local user. Must be set nonzero by the subclass before moving to state
- *  CONNECTED. Since 0.7.15, setting this property directly is
- *  deprecated, in favour of tp_base_connection_set_self_handle(); if this
- *  property is set directly, the connection must ensure it holds a reference
- *  to the handle. Changing this property directly having moved to state
- *  CONNECTED is very strongly discouraged, as this will prevent the
- *  SelfHandleChanged signal being emitted.
  *
  * Data structure representing a generic #TpSvcConnection implementation.
  *
- * In addition to the fields documented here, there are four gpointer fields
- * which must currently be %NULL (a meaning may be defined for these in a
- * future version of telepathy-glib), and a pointer to opaque private data.
+ * Since 0.UNRELEASED, accessing the fields of this structure is deprecated.
+ * Use tp_base_connection_get_bus_name(), tp_base_connection_get_object_path(),
+ * tp_base_connection_get_status(), tp_base_connection_get_self_handle()
+ * instead.
  */
 
 /**
diff --git a/telepathy-glib/base-connection.h b/telepathy-glib/base-connection.h
index 1078e48..8ca5877 100644
--- a/telepathy-glib/base-connection.h
+++ b/telepathy-glib/base-connection.h
@@ -57,15 +57,15 @@ typedef gchar *(*TpBaseConnectionGetUniqueConnectionNameImpl) (
     TpBaseConnection *self);
 
 struct _TpBaseConnection {
-    /*<public>*/
+    /*<private>*/
     GObject parent;
 
-    gchar *bus_name;
-    gchar *object_path;
+    gchar *_TP_SEAL (bus_name);
+    gchar *_TP_SEAL (object_path);
 
-    TpConnectionStatus status;
+    TpConnectionStatus _TP_SEAL (status);
 
-    TpHandle self_handle;
+    TpHandle _TP_SEAL (self_handle);
 
     /*<private>*/
     gpointer _future1;



More information about the telepathy-commits mailing list