summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2020-03-10 20:16:50 -0700
committerPatrick Griffis <pgriffis@igalia.com>2020-08-24 12:04:54 -0700
commit4e9ecffe608fd790292844159b82ab61b261bf64 (patch)
tree3744c592da9641b5c6dc04996b3619f37cacb065
parent7cf1d800401ebba66b43a23236763dbcb7b68ef5 (diff)
downloadlibsoup-4e9ecffe608fd790292844159b82ab61b261bf64.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,