aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-02-24 10:18:39 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-03-10 12:58:12 +0100
commitb3fb87cdf6ceb1593a27807b7f00f17ca489e23d (patch)
treedeb7591b9e31548ce8de46421b6db5d2fcf60d88 /src/mm-base-modem.h
parent897e48709d1f5238f5165a5e5ed42937b0784c80 (diff)
base-modem: new method to wait for an explicit link port
When new link ports are created, the QmiDevice link management methods try to make sure that the port exists in the system by the time the link addition method returns, but that doesn't guarantee that the port has also been notified by the kernel to ModemManager (e.g. via udev or via kernel events). This new method allows to do a explicit wait for a given port link; if we already have it it will return right away, and otherwise we'll wait for it to be notified via the "link port grabbed" signal.
Diffstat (limited to 'src/mm-base-modem.h')
-rw-r--r--src/mm-base-modem.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-base-modem.h b/src/mm-base-modem.h
index 19fa8eb9..776e3c9c 100644
--- a/src/mm-base-modem.h
+++ b/src/mm-base-modem.h
@@ -133,6 +133,16 @@ gboolean mm_base_modem_release_link_port (MMBaseModem *self,
const gchar *name,
GError **error);
+void mm_base_modem_wait_link_port (MMBaseModem *self,
+ const gchar *subsystem,
+ const gchar *name,
+ guint timeout_ms,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+MMPort *mm_base_modem_wait_link_port_finish (MMBaseModem *self,
+ GAsyncResult *res,
+ GError **error);
+
gboolean mm_base_modem_has_at_port (MMBaseModem *self);
gboolean mm_base_modem_organize_ports (MMBaseModem *self,