iface-modem-location: use G_DECLARE|DEFINE_INTERFACE() macros

This commit is contained in:
Aleksander Morgado
2024-05-06 13:45:38 +00:00
parent e535c90f5f
commit aa94b21e0a
31 changed files with 241 additions and 265 deletions
@@ -28,12 +28,12 @@
#include "mm-broadband-modem-qmi-simtech.h"
#include "mm-shared-simtech.h"
static void iface_modem_location_init (MMIfaceModemLocation *iface);
static void iface_modem_voice_init (MMIfaceModemVoice *iface);
static void shared_simtech_init (MMSharedSimtech *iface);
static void iface_modem_location_init (MMIfaceModemLocationInterface *iface);
static void iface_modem_voice_init (MMIfaceModemVoice *iface);
static void shared_simtech_init (MMSharedSimtech *iface);
static MMIfaceModemLocation *iface_modem_location_parent;
static MMIfaceModemVoice *iface_modem_voice_parent;
static MMIfaceModemLocationInterface *iface_modem_location_parent;
static MMIfaceModemVoice *iface_modem_voice_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemQmiSimtech, mm_broadband_modem_qmi_simtech, MM_TYPE_BROADBAND_MODEM_QMI, 0,
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_LOCATION, iface_modem_location_init)
@@ -71,7 +71,7 @@ mm_broadband_modem_qmi_simtech_init (MMBroadbandModemQmiSimtech *self)
}
static void
iface_modem_location_init (MMIfaceModemLocation *iface)
iface_modem_location_init (MMIfaceModemLocationInterface *iface)
{
iface_modem_location_parent = g_type_interface_peek_parent (iface);
@@ -83,7 +83,7 @@ iface_modem_location_init (MMIfaceModemLocation *iface)
iface->disable_location_gathering_finish = mm_shared_simtech_disable_location_gathering_finish;
}
static MMIfaceModemLocation *
static MMIfaceModemLocationInterface *
peek_parent_location_interface (MMSharedSimtech *self)
{
return iface_modem_location_parent;
@@ -37,16 +37,16 @@
#include "mm-shared-simtech.h"
#include "mm-broadband-modem-simtech.h"
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_3gpp_init (MMIfaceModem3gppInterface *iface);
static void iface_modem_location_init (MMIfaceModemLocation *iface);
static void iface_modem_voice_init (MMIfaceModemVoice *iface);
static void shared_simtech_init (MMSharedSimtech *iface);
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_3gpp_init (MMIfaceModem3gppInterface *iface);
static void iface_modem_location_init (MMIfaceModemLocationInterface *iface);
static void iface_modem_voice_init (MMIfaceModemVoice *iface);
static void shared_simtech_init (MMSharedSimtech *iface);
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModem3gppInterface *iface_modem_3gpp_parent;
static MMIfaceModemLocation *iface_modem_location_parent;
static MMIfaceModemVoice *iface_modem_voice_parent;
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModem3gppInterface *iface_modem_3gpp_parent;
static MMIfaceModemLocationInterface *iface_modem_location_parent;
static MMIfaceModemVoice *iface_modem_voice_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemSimtech, mm_broadband_modem_simtech, MM_TYPE_BROADBAND_MODEM, 0,
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)
@@ -1476,7 +1476,7 @@ iface_modem_3gpp_init (MMIfaceModem3gppInterface *iface)
}
static void
iface_modem_location_init (MMIfaceModemLocation *iface)
iface_modem_location_init (MMIfaceModemLocationInterface *iface)
{
iface_modem_location_parent = g_type_interface_peek_parent (iface);
@@ -1488,7 +1488,7 @@ iface_modem_location_init (MMIfaceModemLocation *iface)
iface->disable_location_gathering_finish = mm_shared_simtech_disable_location_gathering_finish;
}
static MMIfaceModemLocation *
static MMIfaceModemLocationInterface *
peek_parent_location_interface (MMSharedSimtech *self)
{
return iface_modem_location_parent;
+4 -4
View File
@@ -44,10 +44,10 @@ typedef enum {
typedef struct {
/* location */
MMIfaceModemLocation *iface_modem_location_parent;
MMModemLocationSource supported_sources;
MMModemLocationSource enabled_sources;
FeatureSupport cgps_support;
MMIfaceModemLocationInterface *iface_modem_location_parent;
MMModemLocationSource supported_sources;
MMModemLocationSource enabled_sources;
FeatureSupport cgps_support;
/* voice */
MMIfaceModemVoice *iface_modem_voice_parent;
FeatureSupport cpcmreg_support;
+1 -1
View File
@@ -38,7 +38,7 @@ struct _MMSharedSimtech {
GTypeInterface g_iface;
/* Peek location interface of the parent class of the object */
MMIfaceModemLocation * (* peek_parent_location_interface) (MMSharedSimtech *self);
MMIfaceModemLocationInterface * (* peek_parent_location_interface) (MMSharedSimtech *self);
/* Peek voice interface of the parent class of the object */
MMIfaceModemVoice * (* peek_parent_voice_interface) (MMSharedSimtech *self);