Separation of decoding User Data Header from decoding 7 bit message
[project/uqmi.git] / uqmi.h
diff --git a/uqmi.h b/uqmi.h
index a404da5..ea2a140 100644 (file)
--- a/uqmi.h
+++ b/uqmi.h
@@ -1,8 +1,11 @@
 #ifndef __UQMI_H
 #define __UQMI_H
 
+#include <stdbool.h>
+
 #include <libubox/uloop.h>
 #include <libubox/ustream.h>
+
 #include "qmi-message.h"
 
 #ifdef DEBUG_PACKET
@@ -31,7 +34,8 @@ static inline void dump_packet(const char *prefix, void *ptr, int len)
     __qmi_service(QMI_SERVICE_RMTFS), \
     __qmi_service(QMI_SERVICE_CAT), \
     __qmi_service(QMI_SERVICE_RMS), \
-    __qmi_service(QMI_SERVICE_OMA)
+    __qmi_service(QMI_SERVICE_OMA), \
+    __qmi_service(QMI_SERVICE_WDA)
 
 #define __qmi_service(_n) __##_n
 enum {
@@ -59,6 +63,7 @@ struct qmi_dev {
 
        uint32_t service_connected;
        uint32_t service_keep_cid;
+       uint32_t service_release_cid;
 
        uint8_t ctl_tid;
 };
@@ -70,11 +75,13 @@ struct qmi_request {
 
        bool *complete;
        bool pending;
+       bool no_error_cb;
        uint8_t service;
        uint16_t tid;
        int ret;
 };
 
+extern bool cancel_all_requests;
 int qmi_device_open(struct qmi_dev *qmi, const char *path);
 void qmi_device_close(struct qmi_dev *qmi);
 
@@ -89,6 +96,8 @@ static inline bool qmi_request_pending(struct qmi_request *req)
 
 int qmi_service_connect(struct qmi_dev *qmi, QmiService svc, int client_id);
 int qmi_service_get_client_id(struct qmi_dev *qmi, QmiService svc);
+int qmi_service_release_client_id(struct qmi_dev *qmi, QmiService svc);
 QmiService qmi_service_get_by_name(const char *str);
+const char *qmi_get_error_str(int code);
 
 #endif