aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-port-at.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2024-04-18 09:48:36 +0000
committerAleksander Morgado <aleksandermj@chromium.org>2024-05-06 13:27:04 +0000
commit9aab129759ce9f9c713b88049a0fb32b43b0adf9 (patch)
treec17d4404fd9d2f0d04d4afe1b00f0e9bf92ffb4d /src/mm-iface-port-at.h
parent1e26e16168d4815a48ab77610e1c282dfc345567 (diff)
iface-port-at: use G_DECLARE|DEFINE_INTERFACE() macros
Diffstat (limited to 'src/mm-iface-port-at.h')
-rw-r--r--src/mm-iface-port-at.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mm-iface-port-at.h b/src/mm-iface-port-at.h
index afcc86dc..e360af17 100644
--- a/src/mm-iface-port-at.h
+++ b/src/mm-iface-port-at.h
@@ -22,14 +22,12 @@
#define _LIBMM_INSIDE_MM
#include <libmm-glib.h>
-#define MM_TYPE_IFACE_PORT_AT (mm_iface_port_at_get_type ())
-#define MM_IFACE_PORT_AT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_IFACE_PORT_AT, MMIfacePortAt))
-#define MM_IS_IFACE_PORT_AT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_PORT_AT))
-#define MM_IFACE_PORT_AT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_PORT_AT, MMIfacePortAt))
+#include "mm-port.h"
-typedef struct _MMIfacePortAt MMIfacePortAt;
+#define MM_TYPE_IFACE_PORT_AT mm_iface_port_at_get_type ()
+G_DECLARE_INTERFACE (MMIfacePortAt, mm_iface_port_at, MM, IFACE_PORT_AT, MMPort)
-struct _MMIfacePortAt {
+struct _MMIfacePortAtInterface {
GTypeInterface g_iface;
gboolean (* check_support) (MMIfacePortAt *self,
@@ -49,9 +47,6 @@ struct _MMIfacePortAt {
GError **error);
};
-GType mm_iface_port_at_get_type (void);
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfacePortAt, g_object_unref)
-
gboolean mm_iface_port_at_check_support (MMIfacePortAt *self,
gboolean *out_supported,
GError **error);