Amit Pundir | 33109f7 | 2020-02-07 22:26:08 +0530 | [diff] [blame] | 1 | #ifndef __QMI_SERVREG_LOC_H__ |
| 2 | #define __QMI_SERVREG_LOC_H__ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | #include <stdbool.h> |
| 6 | |
| 7 | #include "libqrtr.h" |
| 8 | |
| 9 | #define SERVREG_QMI_SERVICE 64 |
| 10 | #define SERVREG_QMI_VERSION 257 |
| 11 | #define SERVREG_QMI_INSTANCE 0 |
| 12 | #define QMI_RESULT_SUCCESS 0 |
| 13 | #define QMI_RESULT_FAILURE 1 |
| 14 | #define QMI_ERR_NONE 0 |
| 15 | #define QMI_ERR_INTERNAL 1 |
| 16 | #define QMI_ERR_MALFORMED_MSG 2 |
| 17 | #define SERVREG_LOC_GET_DOMAIN_LIST 33 |
| 18 | #define SERVREG_LOC_PFR 36 |
| 19 | |
| 20 | struct servreg_loc_qmi_result { |
| 21 | uint16_t result; |
| 22 | uint16_t error; |
| 23 | }; |
| 24 | |
| 25 | struct servreg_loc_domain_list_entry { |
| 26 | uint32_t name_len; |
| 27 | char name[256]; |
| 28 | uint32_t instance_id; |
| 29 | uint8_t service_data_valid; |
| 30 | uint32_t service_data; |
| 31 | }; |
| 32 | |
| 33 | struct servreg_loc_get_domain_list_req { |
| 34 | uint32_t name_len; |
| 35 | char name[256]; |
| 36 | bool offset_valid; |
| 37 | uint32_t offset; |
| 38 | }; |
| 39 | |
| 40 | struct servreg_loc_get_domain_list_resp { |
| 41 | struct servreg_loc_qmi_result result; |
| 42 | bool total_domains_valid; |
| 43 | uint16_t total_domains; |
| 44 | bool db_revision_valid; |
| 45 | uint16_t db_revision; |
| 46 | bool domain_list_valid; |
| 47 | uint32_t domain_list_len; |
| 48 | struct servreg_loc_domain_list_entry domain_list[255]; |
| 49 | }; |
| 50 | |
| 51 | struct servreg_loc_pfr_req { |
| 52 | uint32_t service_len; |
| 53 | char service[256]; |
| 54 | uint32_t reason_len; |
| 55 | char reason[256]; |
| 56 | }; |
| 57 | |
| 58 | struct servreg_loc_pfr_resp { |
| 59 | struct servreg_loc_qmi_result result; |
| 60 | }; |
| 61 | |
| 62 | extern struct qmi_elem_info servreg_loc_get_domain_list_req_ei[]; |
| 63 | extern struct qmi_elem_info servreg_loc_get_domain_list_resp_ei[]; |
| 64 | extern struct qmi_elem_info servreg_loc_pfr_req_ei[]; |
| 65 | extern struct qmi_elem_info servreg_loc_pfr_resp_ei[]; |
| 66 | |
| 67 | #endif |