intel: inherit GNSS location support from the shared XMM interface
We're not going to implement all XMM shared operations from the shared utils, as the newer Intel modems support the new operations in the Microsoft MBIM Extensions. Just inherit the GNSS management capabilities.
This commit is contained in:
@@ -900,6 +900,7 @@ endif
|
||||
|
||||
libmm_plugin_intel_la_CPPFLAGS = \
|
||||
$(PLUGIN_COMMON_COMPILER_FLAGS) \
|
||||
$(XMM_COMMON_COMPILER_FLAGS) \
|
||||
-DMM_MODULE_NAME=\"intel\" \
|
||||
$(NULL)
|
||||
libmm_plugin_intel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
|
||||
|
||||
@@ -27,8 +27,17 @@
|
||||
#include <libmm-glib.h>
|
||||
|
||||
#include "mm-broadband-modem-mbim-intel.h"
|
||||
#include "mm-iface-modem-location.h"
|
||||
#include "mm-shared-xmm.h"
|
||||
|
||||
G_DEFINE_TYPE (MMBroadbandModemMbimIntel, mm_broadband_modem_mbim_intel, MM_TYPE_BROADBAND_MODEM_MBIM)
|
||||
static void iface_modem_location_init (MMIfaceModemLocation *iface);
|
||||
static void shared_xmm_init (MMSharedXmm *iface);
|
||||
|
||||
static MMIfaceModemLocation *iface_modem_location_parent;
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimIntel, mm_broadband_modem_mbim_intel, MM_TYPE_BROADBAND_MODEM_MBIM, 0,
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_LOCATION, iface_modem_location_init)
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_SHARED_XMM, shared_xmm_init))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -62,7 +71,46 @@ mm_broadband_modem_mbim_intel_init (MMBroadbandModemMbimIntel *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
iface_modem_location_init (MMIfaceModemLocation *iface)
|
||||
{
|
||||
iface_modem_location_parent = g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->load_capabilities = mm_shared_xmm_location_load_capabilities;
|
||||
iface->load_capabilities_finish = mm_shared_xmm_location_load_capabilities_finish;
|
||||
iface->enable_location_gathering = mm_shared_xmm_enable_location_gathering;
|
||||
iface->enable_location_gathering_finish = mm_shared_xmm_enable_location_gathering_finish;
|
||||
iface->disable_location_gathering = mm_shared_xmm_disable_location_gathering;
|
||||
iface->disable_location_gathering_finish = mm_shared_xmm_disable_location_gathering_finish;
|
||||
iface->load_supl_server = mm_shared_xmm_location_load_supl_server;
|
||||
iface->load_supl_server_finish = mm_shared_xmm_location_load_supl_server_finish;
|
||||
iface->set_supl_server = mm_shared_xmm_location_set_supl_server;
|
||||
iface->set_supl_server_finish = mm_shared_xmm_location_set_supl_server_finish;
|
||||
}
|
||||
|
||||
static MMBroadbandModemClass *
|
||||
peek_parent_broadband_modem_class (MMSharedXmm *self)
|
||||
{
|
||||
return MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_mbim_intel_parent_class);
|
||||
}
|
||||
|
||||
static MMIfaceModemLocation *
|
||||
peek_parent_location_interface (MMSharedXmm *self)
|
||||
{
|
||||
return iface_modem_location_parent;
|
||||
}
|
||||
|
||||
static void
|
||||
shared_xmm_init (MMSharedXmm *iface)
|
||||
{
|
||||
iface->peek_parent_broadband_modem_class = peek_parent_broadband_modem_class;
|
||||
iface->peek_parent_location_interface = peek_parent_location_interface;
|
||||
}
|
||||
|
||||
static void
|
||||
mm_broadband_modem_mbim_intel_class_init (MMBroadbandModemMbimIntelClass *klass)
|
||||
{
|
||||
MMBroadbandModemClass *broadband_modem_class = MM_BROADBAND_MODEM_CLASS (klass);
|
||||
|
||||
broadband_modem_class->setup_ports = mm_shared_xmm_setup_ports;
|
||||
}
|
||||
|
||||
+1
-1
@@ -470,7 +470,7 @@ if plugins_options['intel']
|
||||
|
||||
plugins += {'plugin-intel': {
|
||||
'plugin': true,
|
||||
'module': {'sources': sources, 'include_directories': plugins_incs, 'c_args': common_c_args},
|
||||
'module': {'sources': sources, 'include_directories': plugins_incs + [xmm_inc], 'c_args': common_c_args},
|
||||
}}
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user