1 #ifndef __UQMI_COMMANDS_H
2 #define __UQMI_COMMANDS_H
5 #include "commands-wds.h"
6 #include "commands-dms.h"
7 #include "commands-nas.h"
8 #include "commands-wms.h"
20 struct uqmi_cmd_handler {
24 enum qmi_cmd_result (*prepare)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg);
25 void (*cb)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg);
29 const struct uqmi_cmd_handler *handler;
33 #define __uqmi_commands \
34 __uqmi_command(version, get-versions, no, QMI_SERVICE_CTL), \
35 __uqmi_command(set_client_id, set-client-id, required, CMD_TYPE_OPTION), \
36 __uqmi_command(get_client_id, get-client-id, required, QMI_SERVICE_CTL), \
37 __uqmi_wds_commands, \
38 __uqmi_dms_commands, \
39 __uqmi_nas_commands, \
42 #define __uqmi_command(_name, _optname, _arg, _option) __UQMI_COMMAND_##_name
49 extern bool single_line;
50 extern const struct uqmi_cmd_handler uqmi_cmd_handler[];
51 void uqmi_add_command(char *arg, int longidx);
52 bool uqmi_run_commands(struct qmi_dev *qmi);
53 int uqmi_add_error(const char *msg);