diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2024-05-06 11:20:23 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2024-05-06 13:45:39 +0000 |
commit | 18a084940a6caa583a727e1f42760c1090994ca3 (patch) | |
tree | 94ebaddcbffdb6ee16f67e244f6692a4230a156a /src/plugins/option/mm-shared-option.c | |
parent | 5a9634773b5c512122172da7ddab0ccdcfc9e47d (diff) |
shared-option: use G_DECLARE|DEFINE_INTERFACE() macros
Diffstat (limited to 'src/plugins/option/mm-shared-option.c')
-rw-r--r-- | src/plugins/option/mm-shared-option.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/plugins/option/mm-shared-option.c b/src/plugins/option/mm-shared-option.c index a06888a1..3c17e8a8 100644 --- a/src/plugins/option/mm-shared-option.c +++ b/src/plugins/option/mm-shared-option.c @@ -28,6 +28,8 @@ #include "mm-sim-option.h" #include "mm-shared-option.h" +G_DEFINE_INTERFACE (MMSharedOption, mm_shared_option, MM_TYPE_IFACE_MODEM) + /*****************************************************************************/ /* Create SIM (Modem inteface) */ @@ -53,25 +55,6 @@ mm_shared_option_create_sim (MMIfaceModem *self, /*****************************************************************************/ static void -shared_option_init (gpointer g_iface) -{ -} - -GType -mm_shared_option_get_type (void) +mm_shared_option_default_init (MMSharedOptionInterface *iface) { - static GType shared_option_type = 0; - - if (!G_UNLIKELY (shared_option_type)) { - static const GTypeInfo info = { - sizeof (MMSharedOption), /* class_size */ - shared_option_init, /* base_init */ - NULL, /* base_finalize */ - }; - - shared_option_type = g_type_register_static (G_TYPE_INTERFACE, "MMSharedOption", &info, 0); - g_type_interface_add_prerequisite (shared_option_type, MM_TYPE_IFACE_MODEM); - } - - return shared_option_type; } |