summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2020-03-10 20:16:50 -0700
committerPatrick Griffis <pgriffis@igalia.com>2020-09-19 15:41:24 -0700
commit3c5f710b2c3b35bcf4ab731d3590ce487872c6e7 (patch)
treebafdc75785859c76314d92ce1dd8dc4517cfca18
parent2193534ebb64875e11f021ae57b51ba398f1df15 (diff)
downloadlibsoup-3c5f710b2c3b35bcf4ab731d3590ce487872c6e7.tar.gz
SoupConnection: Modernsize type delcaration
-rw-r--r--libsoup/soup-connection.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/libsoup/soup-connection.h b/libsoup/soup-connection.h
index f1a8f376..19888f1f 100644
--- a/libsoup/soup-connection.h
+++ b/libsoup/soup-connection.h
@@ -12,27 +12,15 @@
G_BEGIN_DECLS
-#define SOUP_TYPE_CONNECTION (soup_connection_get_type ())
-#define SOUP_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_CONNECTION, SoupConnection))
-#define SOUP_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_CONNECTION, SoupConnectionClass))
-#define SOUP_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_CONNECTION))
-#define SOUP_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_CONNECTION))
-#define SOUP_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_CONNECTION, SoupConnectionClass))
+#define SOUP_TYPE_CONNECTION (soup_connection_get_type ())
+G_DECLARE_DERIVABLE_TYPE (SoupConnection, soup_connection, SOUP, CONNECTION, GObject)
-struct _SoupConnection {
- GObject parent;
-
-};
-
-typedef struct {
+struct _SoupConnectionClass {
GObjectClass parent_class;
/* signals */
void (*disconnected) (SoupConnection *);
-
-} SoupConnectionClass;
-
-GType soup_connection_get_type (void);
+};
typedef enum {
SOUP_CONNECTION_NEW,