core: use the kernel device object in the port object and the plugin interface

The mm_base_modem_grab_port() now receives a MMKernelDevice directly from the
plugin, which is then stored in the MMPort corresponding to the port.

This means that we have direct access to e.g. all properties set by udev rules
everywhere, and we don't need additional GUdevClient objects (e.g. like the one
used in the Huawei plugin to detect NDISDUP support during runtime).

For virtual ports (e.g. generated during unit tests), we have a new 'generic'
kernel device object which just provides the values from the kernel device
properties given during its creation.
This commit is contained in:
Aleksander Morgado
2016-09-28 20:34:48 +02:00
parent c4a584416a
commit ae9ede926a
27 changed files with 482 additions and 144 deletions

View File

@@ -24,6 +24,7 @@ mmtty_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/kerneldevice \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
@@ -33,7 +34,6 @@ mmtty_CPPFLAGS = \
mmtty_LDADD = \
$(MM_LIBS) \
$(top_builddir)/src/libhelpers.la \
$(top_builddir)/src/libport.la \
$(NULL)