[gnome-online-accounts/wip/rishi/port-to-g-declare: 2/7] lastfm: Use G_DECLARE_FINAL_TYPE



commit 89efb6598544cdc296f8f8ef09c864c119f07792
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Dec 5 18:31:54 2019 +0100

    lastfm: Use G_DECLARE_FINAL_TYPE
    
    https://gitlab.gnome.org/GNOME/gnome-online-accounts/merge_requests/40

 src/goabackend/goalastfmprovider.c | 8 --------
 src/goabackend/goalastfmprovider.h | 9 +++------
 2 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index f4596187..cb9a6f26 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -26,7 +26,6 @@
 #include "goaprovider.h"
 #include "goaprovider-priv.h"
 #include "goaoauth2provider.h"
-#include "goaoauth2provider-priv.h"
 #include "goalastfmprovider.h"
 #include "goarestproxy.h"
 #include "goautils.h"
@@ -36,13 +35,6 @@ struct _GoaLastfmProvider
   GoaOAuth2Provider parent_instance;
 };
 
-typedef struct _GoaLastfmProviderClass GoaLastfmProviderClass;
-
-struct _GoaLastfmProviderClass
-{
-  GoaOAuth2ProviderClass parent_class;
-};
-
 G_DEFINE_TYPE_WITH_CODE (GoaLastfmProvider, goa_lastfm_provider, GOA_TYPE_OAUTH2_PROVIDER,
                          goa_provider_ensure_extension_points_registered ();
                          g_io_extension_point_implement (GOA_PROVIDER_EXTENSION_POINT_NAME,
diff --git a/src/goabackend/goalastfmprovider.h b/src/goabackend/goalastfmprovider.h
index 2b1df914..5d622106 100644
--- a/src/goabackend/goalastfmprovider.h
+++ b/src/goabackend/goalastfmprovider.h
@@ -25,15 +25,12 @@
 
 #include <glib-object.h>
 
+#include "goaoauth2provider-priv.h"
+
 G_BEGIN_DECLS
 
 #define GOA_TYPE_LASTFM_PROVIDER   (goa_lastfm_provider_get_type ())
-#define GOA_LASTFM_PROVIDER(o)     (G_TYPE_CHECK_INSTANCE_CAST ((o), GOA_TYPE_LASTFM_PROVIDER, 
GoaLastfmProvider))
-#define GOA_IS_LASTFM_PROVIDER(o)  (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOA_TYPE_LASTFM_PROVIDER))
-
-typedef struct _GoaLastfmProvider GoaLastfmProvider;
-
-GType goa_lastfm_provider_get_type (void) G_GNUC_CONST;
+G_DECLARE_FINAL_TYPE (GoaLastfmProvider, goa_lastfm_provider, GOA, LASTFM_PROVIDER, GoaOAuth2Provider);
 
 G_END_DECLS
 


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