[libsoup] SoupConnection: Modernsize type delcaration



commit 3c5f710b2c3b35bcf4ab731d3590ce487872c6e7
Author: Patrick Griffis <pgriffis igalia com>
Date:   Tue Mar 10 20:16:50 2020 -0700

    SoupConnection: Modernsize type delcaration

 libsoup/soup-connection.h | 20 ++++----------------
 1 file 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]