Commit 2d2a321a authored by David Zeuthen's avatar David Zeuthen

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: default avatarDavid Zeuthen <davidz@redhat.com>
parent 62a1ccf5
......@@ -2272,7 +2272,6 @@ g_dbus_is_interface_name
<FILE>gdbusauthobserver</FILE>
<TITLE>GDBusAuthObserver</TITLE>
GDBusAuthObserver
GDBusAuthObserverClass
g_dbus_auth_observer_new
g_dbus_auth_observer_authorize_authenticated_peer
<SUBSECTION Standard>
......@@ -2291,7 +2290,6 @@ g_dbus_auth_observer_get_type
<FILE>gdbusserver</FILE>
<TITLE>GDBusServer</TITLE>
GDBusServer
GDBusServerClass
GDBusServerFlags
g_dbus_server_new_sync
g_dbus_server_start
......@@ -2315,11 +2313,10 @@ g_dbus_server_get_type
<SECTION>
<FILE>gdbusmessage</FILE>
<TITLE>GDBusMessage</TITLE>
GDBusMessage
GDBusMessageType
GDBusMessageFlags
GDBusMessageHeaderField
GDBusMessage
GDBusMessageClass
g_dbus_message_new
g_dbus_message_new_signal
g_dbus_message_new_method_call
......@@ -2384,7 +2381,6 @@ g_bus_get
g_bus_get_finish
g_bus_get_sync
GDBusConnection
GDBusConnectionClass
GDBusConnectionFlags
g_dbus_connection_new
g_dbus_connection_new_finish
......@@ -2393,7 +2389,6 @@ g_dbus_connection_new_for_address
g_dbus_connection_new_for_address_finish
g_dbus_connection_new_for_address_sync
g_dbus_connection_start_message_processing
GDBusCapabilityFlags
g_dbus_connection_close
g_dbus_connection_is_closed
g_dbus_connection_flush
......@@ -2404,6 +2399,7 @@ g_dbus_connection_set_exit_on_close
g_dbus_connection_get_stream
g_dbus_connection_get_guid
g_dbus_connection_get_unique_name
GDBusCapabilityFlags
g_dbus_connection_get_capabilities
g_dbus_connection_get_peer_credentials
GDBusCallFlags
......@@ -2450,7 +2446,6 @@ g_dbus_connection_get_type
<FILE>gdbusmethodinvocation</FILE>
<TITLE>GDBusMethodInvocation</TITLE>
GDBusMethodInvocation
GDBusMethodInvocationClass
g_dbus_method_invocation_new
g_dbus_method_invocation_get_sender
g_dbus_method_invocation_get_object_path
......
......@@ -46,10 +46,6 @@ struct _GDBusAuthClass
{
/*< private >*/
GObjectClass parent_class;
/*< private >*/
/* Padding for future expansion */
gpointer padding[16];
};
struct _GDBusAuth
......
......@@ -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
......
......@@ -47,10 +47,6 @@ struct _GDBusAuthMechanismAnonClass
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
/*< private >*/
/* Padding for future expansion */
gpointer padding[16];
};
struct _GDBusAuthMechanismAnon
......
......@@ -47,10 +47,6 @@ struct _GDBusAuthMechanismExternalClass
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
/*< private >*/
/* Padding for future expansion */
gpointer padding[16];
};
struct _GDBusAuthMechanismExternal
......
......@@ -47,10 +47,6 @@ struct _GDBusAuthMechanismSha1Class
{
/*< private >*/
GDBusAuthMechanismClass parent_class;
/*< private >*/
/* Padding for future expansion */
gpointer padding[16];
};
struct _GDBusAuthMechanismSha1
......
......@@ -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;
......
......@@ -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:
*
......
......@@ -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;
......
......@@ -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;
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -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;
......
......@@ -41,23 +41,6 @@ G_BEGIN_DECLS
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:
*
......
......@@ -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 */
......
......@@ -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,
......
......@@ -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;
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment