summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2010-07-07 15:57:37 -0400
committerDavid Zeuthen <davidz@redhat.com>2010-07-07 15:57:37 -0400
commit2d2a321a4b5943d408cabe54e3da48360ae7e4ac (patch)
tree5b86edde1713204d1dc73467f5ae1ba988f22fd0 /gio
parent62a1ccf526e7b23ac39cdf7251eac5706eef3f57 (diff)
downloadglib-2d2a321a4b5943d408cabe54e3da48360ae7e4ac.tar.gz
GDBus: Hide class structures for classes we don't want to be subclassed
E.g. move these C structures out of public header files and into their respective C files. Also nuke padding since this is no longer needed. This leaves only GDBusProxy as an extendable type. Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'gio')
-rw-r--r--gio/gdbusauth.h4
-rw-r--r--gio/gdbusauthmechanism.h4
-rw-r--r--gio/gdbusauthmechanismanon.h4
-rw-r--r--gio/gdbusauthmechanismexternal.h4
-rw-r--r--gio/gdbusauthmechanismsha1.h4
-rw-r--r--gio/gdbusauthobserver.c21
-rw-r--r--gio/gdbusauthobserver.h27
-rw-r--r--gio/gdbusconnection.c20
-rw-r--r--gio/gdbusconnection.h24
-rw-r--r--gio/gdbusmessage.c14
-rw-r--r--gio/gdbusmessage.h17
-rw-r--r--gio/gdbusmethodinvocation.c13
-rw-r--r--gio/gdbusmethodinvocation.h17
-rw-r--r--gio/gdbusserver.c19
-rw-r--r--gio/gdbusserver.h23
15 files changed, 87 insertions, 128 deletions
diff --git a/gio/gdbusauth.h b/gio/gdbusauth.h
index b1ebe06e6..039565932 100644
--- a/gio/gdbusauth.h
+++ b/gio/gdbusauth.h
@@ -46,10 +46,6 @@ struct _GDBusAuthClass
{
/*< private >*/
GObjectClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[16];
};
struct _GDBusAuth
diff --git a/gio/gdbusauthmechanism.h b/gio/gdbusauthmechanism.h
index 3ad610bec..44829c0e5 100644
--- a/gio/gdbusauthmechanism.h
+++ b/gio/gdbusauthmechanism.h
@@ -100,10 +100,6 @@ struct _GDBusAuthMechanismClass
gchar *(*client_data_send) (GDBusAuthMechanism *mechanism,
gsize *out_data_len);
void (*client_shutdown) (GDBusAuthMechanism *mechanism);
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[16];
};
struct _GDBusAuthMechanism
diff --git a/gio/gdbusauthmechanismanon.h b/gio/gdbusauthmechanismanon.h
index 92d11b96a..744044e10 100644
--- a/gio/gdbusauthmechanismanon.h
+++ b/gio/gdbusauthmechanismanon.h
@@ -47,10 +47,6 @@ struct _GDBusAuthMechanismAnonClass
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[16];
};
struct _GDBusAuthMechanismAnon
diff --git a/gio/gdbusauthmechanismexternal.h b/gio/gdbusauthmechanismexternal.h
index 7c086f9b9..ca4513654 100644
--- a/gio/gdbusauthmechanismexternal.h
+++ b/gio/gdbusauthmechanismexternal.h
@@ -47,10 +47,6 @@ struct _GDBusAuthMechanismExternalClass
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[16];
};
struct _GDBusAuthMechanismExternal
diff --git a/gio/gdbusauthmechanismsha1.h b/gio/gdbusauthmechanismsha1.h
index 5b0cbf9a4..6a70afa4a 100644
--- a/gio/gdbusauthmechanismsha1.h
+++ b/gio/gdbusauthmechanismsha1.h
@@ -47,10 +47,6 @@ struct _GDBusAuthMechanismSha1Class
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[16];
};
struct _GDBusAuthMechanismSha1
diff --git a/gio/gdbusauthobserver.c b/gio/gdbusauthobserver.c
index e21eabd6d..450bf2220 100644
--- a/gio/gdbusauthobserver.c
+++ b/gio/gdbusauthobserver.c
@@ -100,6 +100,27 @@
* </programlisting></example>
*/
+/**
+ * GDBusAuthObserverClass:
+ * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
+ *
+ * Class structure for #GDBusAuthObserverClass.
+ *
+ * Since: 2.26
+ */
+struct _GDBusAuthObserverClass
+{
+ /*< private >*/
+ GObjectClass parent_class;
+
+ /*< public >*/
+
+ /* Signals */
+ gboolean (*authorize_authenticated_peer) (GDBusAuthObserver *observer,
+ GIOStream *stream,
+ GCredentials *credentials);
+};
+
struct _GDBusAuthObserverPrivate
{
gint foo;
diff --git a/gio/gdbusauthobserver.h b/gio/gdbusauthobserver.h
index 4ea3a98b6..1489aac81 100644
--- a/gio/gdbusauthobserver.h
+++ b/gio/gdbusauthobserver.h
@@ -41,33 +41,6 @@ G_BEGIN_DECLS
typedef struct _GDBusAuthObserverClass GDBusAuthObserverClass;
typedef struct _GDBusAuthObserverPrivate GDBusAuthObserverPrivate;
-
-/**
- * GDBusAuthObserverClass:
- * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
- *
- * Class structure for #GDBusAuthObserverClass.
- *
- * Since: 2.26
- */
-struct _GDBusAuthObserverClass
-{
- /*< private >*/
- GObjectClass parent_class;
-
- /*< public >*/
-
- /* Signals */
- gboolean (*authorize_authenticated_peer) (GDBusAuthObserver *observer,
- GIOStream *stream,
- GCredentials *credentials);
-
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[32];
-};
-
/**
* GDBusAuthObserver:
*
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 1fa49c617..211f306a1 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -157,6 +157,26 @@
/* ---------------------------------------------------------------------------------------------------- */
+/**
+ * GDBusConnectionClass:
+ * @closed: Signal class handler for the #GDBusConnection::closed signal.
+ *
+ * Class structure for #GDBusConnection.
+ *
+ * Since: 2.26
+ */
+struct _GDBusConnectionClass
+{
+ /*< private >*/
+ GObjectClass parent_class;
+
+ /*< public >*/
+ /* Signals */
+ void (*closed) (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error);
+};
+
G_LOCK_DEFINE_STATIC (message_bus_lock);
static GDBusConnection *the_session_bus = NULL;
diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h
index f422ccc2b..f6d36b838 100644
--- a/gio/gdbusconnection.h
+++ b/gio/gdbusconnection.h
@@ -56,30 +56,6 @@ struct _GDBusConnection
GDBusConnectionPrivate *priv;
};
-/**
- * GDBusConnectionClass:
- * @closed: Signal class handler for the #GDBusConnection::closed signal.
- *
- * Class structure for #GDBusConnection.
- *
- * Since: 2.26
- */
-struct _GDBusConnectionClass
-{
- /*< private >*/
- GObjectClass parent_class;
-
- /*< public >*/
- /* Signals */
- void (*closed) (GDBusConnection *connection,
- gboolean remote_peer_vanished,
- GError *error);
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[64];
-};
-
GType g_dbus_connection_get_type (void) G_GNUC_CONST;
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 37c14d630..58a149fca 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -63,6 +63,20 @@
* on a #GDBusConnection.
*/
+
+/**
+ * GDBusMessageClass:
+ *
+ * Class structure for #GDBusMessage.
+ *
+ * Since: 2.26
+ */
+struct _GDBusMessageClass
+{
+ /*< private >*/
+ GObjectClass parent_class;
+};
+
struct _GDBusMessagePrivate
{
GDBusMessageType type;
diff --git a/gio/gdbusmessage.h b/gio/gdbusmessage.h
index 6c350062d..ec56a2b16 100644
--- a/gio/gdbusmessage.h
+++ b/gio/gdbusmessage.h
@@ -42,23 +42,6 @@ typedef struct _GDBusMessageClass GDBusMessageClass;
typedef struct _GDBusMessagePrivate GDBusMessagePrivate;
/**
- * GDBusMessageClass:
- *
- * Class structure for #GDBusMessage.
- *
- * Since: 2.26
- */
-struct _GDBusMessageClass
-{
- /*< private >*/
- GObjectClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[32];
-};
-
-/**
* GDBusMessage:
*
* The #GDBusMessage structure contains only private data and should
diff --git a/gio/gdbusmethodinvocation.c b/gio/gdbusmethodinvocation.c
index de6233f90..335800c48 100644
--- a/gio/gdbusmethodinvocation.c
+++ b/gio/gdbusmethodinvocation.c
@@ -49,6 +49,19 @@
* #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
*/
+/**
+ * GDBusMethodInvocationClass:
+ *
+ * Class structure for #GDBusMethodInvocation.
+ *
+ * Since: 2.26
+ */
+struct _GDBusMethodInvocationClass
+{
+ /*< private >*/
+ GObjectClass parent_class;
+};
+
struct _GDBusMethodInvocationPrivate
{
/* construct-only properties */
diff --git a/gio/gdbusmethodinvocation.h b/gio/gdbusmethodinvocation.h
index 1eeee322c..5f6ba097e 100644
--- a/gio/gdbusmethodinvocation.h
+++ b/gio/gdbusmethodinvocation.h
@@ -56,23 +56,6 @@ struct _GDBusMethodInvocation
GDBusMethodInvocationPrivate *priv;
};
-/**
- * GDBusMethodInvocationClass:
- *
- * Class structure for #GDBusMethodInvocation.
- *
- * Since: 2.26
- */
-struct _GDBusMethodInvocationClass
-{
- /*< private >*/
- GObjectClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[32];
-};
-
GType g_dbus_method_invocation_get_type (void) G_GNUC_CONST;
GDBusMethodInvocation *g_dbus_method_invocation_new (const gchar *sender,
const gchar *object_path,
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index 5195ba06a..b4bfb4da5 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -69,6 +69,25 @@
* <example id="gdbus-peer-to-peer"><title>D-Bus peer-to-peer example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-peer.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
*/
+/**
+ * GDBusServerClass:
+ * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
+ *
+ * Class structure for #GDBusServer.
+ *
+ * Since: 2.26
+ */
+struct _GDBusServerClass
+{
+ /*< private >*/
+ GObjectClass parent_class;
+
+ /*< public >*/
+ /* Signals */
+ void (*new_connection) (GDBusServer *server,
+ GDBusConnection *connection);
+};
+
struct _GDBusServerPrivate
{
GDBusServerFlags flags;
diff --git a/gio/gdbusserver.h b/gio/gdbusserver.h
index ce4030d01..3b2b4d879 100644
--- a/gio/gdbusserver.h
+++ b/gio/gdbusserver.h
@@ -56,29 +56,6 @@ struct _GDBusServer
GDBusServerPrivate *priv;
};
-/**
- * GDBusServerClass:
- * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
- *
- * Class structure for #GDBusServer.
- *
- * Since: 2.26
- */
-struct _GDBusServerClass
-{
- /*< private >*/
- GObjectClass parent_class;
-
- /*< public >*/
- /* Signals */
- void (*new_connection) (GDBusServer *server,
- GDBusConnection *connection);
-
- /*< private >*/
- /* Padding for future expansion */
- gpointer padding[16];
-};
-
GType g_dbus_server_get_type (void) G_GNUC_CONST;
GDBusServer *g_dbus_server_new_sync (const gchar *address,
GDBusServerFlags flags,