Do not leak internals of SpiceGtkSession in our headers. This makes also the class final, which let us extend more easily without fear of breaking ABI. Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> --- src/spice-gtk-session-priv.h | 13 +++++++++++++ src/spice-gtk-session.h | 33 --------------------------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/src/spice-gtk-session-priv.h b/src/spice-gtk-session-priv.h index b2b6206..d7fe313 100644 --- a/src/spice-gtk-session-priv.h +++ b/src/spice-gtk-session-priv.h @@ -22,6 +22,19 @@ G_BEGIN_DECLS +typedef struct _SpiceGtkSessionPrivate SpiceGtkSessionPrivate; + +struct _SpiceGtkSession +{ + GObject parent; + SpiceGtkSessionPrivate *priv; +}; + +struct _SpiceGtkSessionClass +{ + GObjectClass parent_class; +}; + void spice_gtk_session_request_auto_usbredir(SpiceGtkSession *self, gboolean state); gboolean spice_gtk_session_get_read_only(SpiceGtkSession *self); diff --git a/src/spice-gtk-session.h b/src/spice-gtk-session.h index 9a45d85..b04f4fc 100644 --- a/src/spice-gtk-session.h +++ b/src/spice-gtk-session.h @@ -35,39 +35,6 @@ G_BEGIN_DECLS typedef struct _SpiceGtkSession SpiceGtkSession; typedef struct _SpiceGtkSessionClass SpiceGtkSessionClass; -typedef struct _SpiceGtkSessionPrivate SpiceGtkSessionPrivate; - -/** - * SpiceGtkSession: - * - * The #SpiceGtkSession struct is opaque and should not be accessed directly. - */ -struct _SpiceGtkSession -{ - GObject parent; - SpiceGtkSessionPrivate *priv; - /* Do not add fields to this struct */ -}; - -/** - * SpiceGtkSessionClass: - * @parent_class: Parent class. - * - * Class structure for #SpiceGtkSession. - */ -struct _SpiceGtkSessionClass -{ - GObjectClass parent_class; - - /* signals */ - - /*< private >*/ - /* - * If adding fields to this struct, remove corresponding - * amount of padding to avoid changing overall struct size - */ - gchar _spice_reserved[SPICE_RESERVED_PADDING]; -}; GType spice_gtk_session_get_type(void); -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel