[rhythmbox/wip/hadess/cleanups: 47/49] mtpdevice: Use G_DECLARE_FINAL_TYPE()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/cleanups: 47/49] mtpdevice: Use G_DECLARE_FINAL_TYPE()
- Date: Mon, 15 Nov 2021 11:04:17 +0000 (UTC)
commit 510167a1313b8084d4176e574c9214e96da97968
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 3 13:57:33 2021 +0100
mtpdevice: Use G_DECLARE_FINAL_TYPE()
plugins/mtpdevice/rb-mtp-plugin.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plugins/mtpdevice/rb-mtp-plugin.c b/plugins/mtpdevice/rb-mtp-plugin.c
index 7e1d7fc82..525bd15da 100644
--- a/plugins/mtpdevice/rb-mtp-plugin.c
+++ b/plugins/mtpdevice/rb-mtp-plugin.c
@@ -56,26 +56,22 @@
#define RB_TYPE_MTP_PLUGIN (rb_mtp_plugin_get_type ())
-#define RB_MTP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_MTP_PLUGIN, RBMtpPlugin))
-#define RB_MTP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_IPOD_PLUGIN, RBMtpPluginClass))
-#define RB_IS_MTP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_MTP_PLUGIN))
-#define RB_IS_MTP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_MTP_PLUGIN))
-#define RB_MTP_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_MTP_PLUGIN,
RBMtpPluginClass))
+G_DECLARE_FINAL_TYPE (RBMtpPlugin, rb_mtp_plugin, RB, MTP_PLUGIN, PeasExtensionBase)
-typedef struct
+struct _RBMtpPlugin
{
PeasExtensionBase parent;
guint create_device_source_id;
GList *mtp_sources;
-} RBMtpPlugin;
+};
-typedef struct
+struct _RBMtpPluginClass
{
PeasExtensionBaseClass parent_class;
-} RBMtpPluginClass;
+};
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]