aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port-qmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-port-qmi.h')
-rw-r--r--src/mm-port-qmi.h49
1 files changed, 27 insertions, 22 deletions
diff --git a/src/mm-port-qmi.h b/src/mm-port-qmi.h
index 793e3b1a..dbeff1bd 100644
--- a/src/mm-port-qmi.h
+++ b/src/mm-port-qmi.h
@@ -91,30 +91,35 @@ void mm_port_qmi_set_net_driver (MMPortQmi *self,
typedef enum {
MM_PORT_QMI_FLAG_DEFAULT = 0,
- MM_PORT_QMI_FLAG_WDS_IPV4 = 100,
- MM_PORT_QMI_FLAG_WDS_IPV6 = 101
+ MM_PORT_QMI_FLAG_WDS_IPV4 = 1,
+ MM_PORT_QMI_FLAG_WDS_IPV6 = 2,
} MMPortQmiFlag;
-void mm_port_qmi_allocate_client (MMPortQmi *self,
- QmiService service,
- MMPortQmiFlag flag,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean mm_port_qmi_allocate_client_finish (MMPortQmi *self,
- GAsyncResult *res,
- GError **error);
-
-void mm_port_qmi_release_client (MMPortQmi *self,
- QmiService service,
- MMPortQmiFlag flag);
-
-QmiClient *mm_port_qmi_peek_client (MMPortQmi *self,
- QmiService service,
- MMPortQmiFlag flag);
-QmiClient *mm_port_qmi_get_client (MMPortQmi *self,
- QmiService service,
- MMPortQmiFlag flag);
+/* When using the WDS service, we may not only want to have explicit different
+ * clients for IPv4 or IPv6, but also for different mux ids as well, so that
+ * different bearer objects never attempt to use the same WDS clients. */
+#define MM_PORT_QMI_FLAG_WITH_MUX_ID(flag, mux_id) ((mux_id << 8) | (flag & 0xFF))
+
+void mm_port_qmi_allocate_client (MMPortQmi *self,
+ QmiService service,
+ guint flag,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_port_qmi_allocate_client_finish (MMPortQmi *self,
+ GAsyncResult *res,
+ GError **error);
+
+void mm_port_qmi_release_client (MMPortQmi *self,
+ QmiService service,
+ guint flag);
+
+QmiClient *mm_port_qmi_peek_client (MMPortQmi *self,
+ QmiService service,
+ guint flag);
+QmiClient *mm_port_qmi_get_client (MMPortQmi *self,
+ QmiService service,
+ guint flag);
QmiDevice *mm_port_qmi_peek_device (MMPortQmi *self);