aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-09-28 20:34:48 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-09-29 15:43:05 +0200
commitae9ede926a1747216b54e22398edde203ec9a03c (patch)
treec6d1c405982051497ed78fbbfc7cbb6a3f16e5e4 /src/mm-base-modem.h
parentc4a584416ab4af81b6cae653625c78f9158de1e6 (diff)
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.
Diffstat (limited to 'src/mm-base-modem.h')
-rw-r--r--src/mm-base-modem.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mm-base-modem.h b/src/mm-base-modem.h
index 71445ede..db3d54d3 100644
--- a/src/mm-base-modem.h
+++ b/src/mm-base-modem.h
@@ -30,6 +30,7 @@
#include "mm-auth.h"
#include "mm-port.h"
+#include "mm-kernel-device.h"
#include "mm-port-serial-at.h"
#include "mm-port-serial-qcdm.h"
#include "mm-port-serial-gps.h"
@@ -104,13 +105,11 @@ struct _MMBaseModemClass {
GType mm_base_modem_get_type (void);
-gboolean mm_base_modem_grab_port (MMBaseModem *self,
- const gchar *subsys,
- const gchar *name,
- const gchar *parent_path,
- MMPortType ptype,
- MMPortSerialAtFlag at_pflags,
- GError **error);
+gboolean mm_base_modem_grab_port (MMBaseModem *self,
+ MMKernelDevice *kernel_device,
+ MMPortType ptype,
+ MMPortSerialAtFlag at_pflags,
+ GError **error);
gboolean mm_base_modem_has_at_port (MMBaseModem *self);