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
@@ -24,12 +24,12 @@
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_firmware_init (MMIfaceModemFirmwareInterface *iface);
static void iface_modem_location_init (MMIfaceModemLocation *iface);
static void iface_modem_location_init (MMIfaceModemLocationInterface *iface);
static void iface_modem_time_init (MMIfaceModemTime *iface);
static void shared_quectel_init (MMSharedQuectel *iface);
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModemLocation *iface_modem_location_parent;
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModemLocationInterface *iface_modem_location_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimQuectel, mm_broadband_modem_mbim_quectel, MM_TYPE_BROADBAND_MODEM_MBIM, 0,
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)
@@ -88,7 +88,7 @@ iface_modem_firmware_init (MMIfaceModemFirmwareInterface *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);
@@ -113,7 +113,7 @@ peek_parent_modem_interface (MMSharedQuectel *self)
return iface_modem_parent;
}
static MMIfaceModemLocation *
static MMIfaceModemLocationInterface *
peek_parent_modem_location_interface (MMSharedQuectel *self)
{
return iface_modem_location_parent;
@@ -27,13 +27,13 @@
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_firmware_init (MMIfaceModemFirmwareInterface *iface);
static void iface_modem_location_init (MMIfaceModemLocation *iface);
static void iface_modem_location_init (MMIfaceModemLocationInterface *iface);
static void iface_modem_time_init (MMIfaceModemTime *iface);
static void iface_modem_3gpp_profile_manager_init (MMIfaceModem3gppProfileManagerInterface *iface);
static void shared_quectel_init (MMSharedQuectel *iface);
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModemLocation *iface_modem_location_parent;
static MMIfaceModemLocationInterface *iface_modem_location_parent;
static MMIfaceModem3gppProfileManagerInterface *iface_modem_3gpp_profile_manager_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemQmiQuectel, mm_broadband_modem_qmi_quectel, MM_TYPE_BROADBAND_MODEM_QMI, 0,
@@ -170,7 +170,7 @@ iface_modem_firmware_init (MMIfaceModemFirmwareInterface *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);
@@ -201,7 +201,7 @@ peek_parent_modem_interface (MMSharedQuectel *self)
return iface_modem_parent;
}
static MMIfaceModemLocation *
static MMIfaceModemLocationInterface *
peek_parent_modem_location_interface (MMSharedQuectel *self)
{
return iface_modem_location_parent;
@@ -24,12 +24,12 @@
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_firmware_init (MMIfaceModemFirmwareInterface *iface);
static void iface_modem_location_init (MMIfaceModemLocation *iface);
static void iface_modem_location_init (MMIfaceModemLocationInterface *iface);
static void iface_modem_time_init (MMIfaceModemTime *iface);
static void shared_quectel_init (MMSharedQuectel *iface);
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModemLocation *iface_modem_location_parent;
static MMIfaceModemInterface *iface_modem_parent;
static MMIfaceModemLocationInterface *iface_modem_location_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemQuectel, mm_broadband_modem_quectel, MM_TYPE_BROADBAND_MODEM, 0,
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)
@@ -85,7 +85,7 @@ iface_modem_firmware_init (MMIfaceModemFirmwareInterface *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);
@@ -116,7 +116,7 @@ peek_parent_modem_interface (MMSharedQuectel *self)
return iface_modem_parent;
}
static MMIfaceModemLocation *
static MMIfaceModemLocationInterface *
peek_parent_modem_location_interface (MMSharedQuectel *self)
{
return iface_modem_location_parent;
+9 -9
View File
@@ -48,15 +48,15 @@ typedef enum {
} FeatureSupport;
typedef struct {
MMBroadbandModemClass *broadband_modem_class_parent;
MMIfaceModemInterface *iface_modem_parent;
MMIfaceModemLocation *iface_modem_location_parent;
MMModemLocationSource provided_sources;
MMModemLocationSource enabled_sources;
FeatureSupport qgps_supported;
GRegex *qgpsurc_regex;
GRegex *qlwurc_regex;
GRegex *rdy_regex;
MMBroadbandModemClass *broadband_modem_class_parent;
MMIfaceModemInterface *iface_modem_parent;
MMIfaceModemLocationInterface *iface_modem_location_parent;
MMModemLocationSource provided_sources;
MMModemLocationSource enabled_sources;
FeatureSupport qgps_supported;
GRegex *qgpsurc_regex;
GRegex *qlwurc_regex;
GRegex *rdy_regex;
} Private;
static void
+3 -3
View File
@@ -37,9 +37,9 @@ typedef struct _MMSharedQuectel MMSharedQuectel;
struct _MMSharedQuectel {
GTypeInterface g_iface;
MMBroadbandModemClass * (* peek_parent_broadband_modem_class) (MMSharedQuectel *self);
MMIfaceModemInterface * (* peek_parent_modem_interface) (MMSharedQuectel *self);
MMIfaceModemLocation * (* peek_parent_modem_location_interface) (MMSharedQuectel *self);
MMBroadbandModemClass * (* peek_parent_broadband_modem_class) (MMSharedQuectel *self);
MMIfaceModemInterface * (* peek_parent_modem_interface) (MMSharedQuectel *self);
MMIfaceModemLocationInterface * (* peek_parent_modem_location_interface) (MMSharedQuectel *self);
};
GType mm_shared_quectel_get_type (void);