Amit Pundir | 33109f7 | 2020-02-07 22:26:08 +0530 | [diff] [blame] | 1 | #include <errno.h> |
| 2 | #include <string.h> |
| 3 | #include "servreg_loc.h" |
| 4 | |
| 5 | struct qmi_elem_info servreg_loc_qmi_result_ei[] = { |
| 6 | { |
| 7 | .data_type = QMI_UNSIGNED_2_BYTE, |
| 8 | .elem_len = 1, |
| 9 | .elem_size = sizeof(uint16_t), |
| 10 | .offset = offsetof(struct servreg_loc_qmi_result, result), |
| 11 | }, |
| 12 | { |
| 13 | .data_type = QMI_UNSIGNED_2_BYTE, |
| 14 | .elem_len = 1, |
| 15 | .elem_size = sizeof(uint16_t), |
| 16 | .offset = offsetof(struct servreg_loc_qmi_result, error), |
| 17 | }, |
| 18 | {} |
| 19 | }; |
| 20 | |
| 21 | struct qmi_elem_info servreg_loc_domain_list_entry_ei[] = { |
| 22 | { |
| 23 | .data_type = QMI_STRING, |
| 24 | .elem_len = 256, |
| 25 | .elem_size = sizeof(char), |
| 26 | .offset = offsetof(struct servreg_loc_domain_list_entry, name) |
| 27 | }, |
| 28 | { |
| 29 | .data_type = QMI_UNSIGNED_4_BYTE, |
| 30 | .elem_len = 1, |
| 31 | .elem_size = sizeof(uint32_t), |
| 32 | .offset = offsetof(struct servreg_loc_domain_list_entry, instance_id), |
| 33 | }, |
| 34 | { |
| 35 | .data_type = QMI_UNSIGNED_1_BYTE, |
| 36 | .elem_len = 1, |
| 37 | .elem_size = sizeof(uint8_t), |
| 38 | .offset = offsetof(struct servreg_loc_domain_list_entry, service_data_valid), |
| 39 | }, |
| 40 | { |
| 41 | .data_type = QMI_UNSIGNED_4_BYTE, |
| 42 | .elem_len = 1, |
| 43 | .elem_size = sizeof(uint32_t), |
| 44 | .offset = offsetof(struct servreg_loc_domain_list_entry, service_data), |
| 45 | }, |
| 46 | {} |
| 47 | }; |
| 48 | |
| 49 | struct qmi_elem_info servreg_loc_get_domain_list_req_ei[] = { |
| 50 | { |
| 51 | .data_type = QMI_STRING, |
| 52 | .elem_len = 256, |
| 53 | .elem_size = sizeof(char), |
| 54 | .array_type = VAR_LEN_ARRAY, |
| 55 | .tlv_type = 1, |
| 56 | .offset = offsetof(struct servreg_loc_get_domain_list_req, name) |
| 57 | }, |
| 58 | { |
| 59 | .data_type = QMI_OPT_FLAG, |
| 60 | .elem_len = 1, |
| 61 | .elem_size = sizeof(bool), |
| 62 | .tlv_type = 16, |
| 63 | .offset = offsetof(struct servreg_loc_get_domain_list_req, offset_valid), |
| 64 | }, |
| 65 | { |
| 66 | .data_type = QMI_UNSIGNED_4_BYTE, |
| 67 | .elem_len = 1, |
| 68 | .elem_size = sizeof(uint32_t), |
| 69 | .tlv_type = 16, |
| 70 | .offset = offsetof(struct servreg_loc_get_domain_list_req, offset), |
| 71 | }, |
| 72 | {} |
| 73 | }; |
| 74 | |
| 75 | struct qmi_elem_info servreg_loc_get_domain_list_resp_ei[] = { |
| 76 | { |
| 77 | .data_type = QMI_STRUCT, |
| 78 | .elem_len = 1, |
| 79 | .elem_size = sizeof(struct servreg_loc_qmi_result), |
| 80 | .tlv_type = 2, |
| 81 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, result), |
| 82 | .ei_array = servreg_loc_qmi_result_ei, |
| 83 | }, |
| 84 | { |
| 85 | .data_type = QMI_OPT_FLAG, |
| 86 | .elem_len = 1, |
| 87 | .elem_size = sizeof(bool), |
| 88 | .tlv_type = 16, |
| 89 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, total_domains_valid), |
| 90 | }, |
| 91 | { |
| 92 | .data_type = QMI_UNSIGNED_2_BYTE, |
| 93 | .elem_len = 1, |
| 94 | .elem_size = sizeof(uint16_t), |
| 95 | .tlv_type = 16, |
| 96 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, total_domains), |
| 97 | }, |
| 98 | { |
| 99 | .data_type = QMI_OPT_FLAG, |
| 100 | .elem_len = 1, |
| 101 | .elem_size = sizeof(bool), |
| 102 | .tlv_type = 17, |
| 103 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, db_revision_valid), |
| 104 | }, |
| 105 | { |
| 106 | .data_type = QMI_UNSIGNED_2_BYTE, |
| 107 | .elem_len = 1, |
| 108 | .elem_size = sizeof(uint16_t), |
| 109 | .tlv_type = 17, |
| 110 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, db_revision), |
| 111 | }, |
| 112 | { |
| 113 | .data_type = QMI_OPT_FLAG, |
| 114 | .elem_len = 1, |
| 115 | .elem_size = sizeof(bool), |
| 116 | .tlv_type = 18, |
| 117 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, domain_list_valid), |
| 118 | }, |
| 119 | { |
| 120 | .data_type = QMI_DATA_LEN, |
| 121 | .elem_len = 1, |
| 122 | .elem_size = sizeof(uint8_t), |
| 123 | .tlv_type = 18, |
| 124 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, domain_list_len), |
| 125 | }, |
| 126 | { |
| 127 | .data_type = QMI_STRUCT, |
| 128 | .elem_len = 255, |
| 129 | .elem_size = sizeof(struct servreg_loc_domain_list_entry), |
| 130 | .array_type = VAR_LEN_ARRAY, |
| 131 | .tlv_type = 18, |
| 132 | .offset = offsetof(struct servreg_loc_get_domain_list_resp, domain_list), |
| 133 | .ei_array = servreg_loc_domain_list_entry_ei, |
| 134 | }, |
| 135 | {} |
| 136 | }; |
| 137 | |
| 138 | struct qmi_elem_info servreg_loc_pfr_req_ei[] = { |
| 139 | { |
| 140 | .data_type = QMI_STRING, |
| 141 | .elem_len = 256, |
| 142 | .elem_size = sizeof(char), |
| 143 | .array_type = VAR_LEN_ARRAY, |
| 144 | .tlv_type = 1, |
| 145 | .offset = offsetof(struct servreg_loc_pfr_req, service) |
| 146 | }, |
| 147 | { |
| 148 | .data_type = QMI_STRING, |
| 149 | .elem_len = 256, |
| 150 | .elem_size = sizeof(char), |
| 151 | .array_type = VAR_LEN_ARRAY, |
| 152 | .tlv_type = 2, |
| 153 | .offset = offsetof(struct servreg_loc_pfr_req, reason) |
| 154 | }, |
| 155 | {} |
| 156 | }; |
| 157 | |
| 158 | struct qmi_elem_info servreg_loc_pfr_resp_ei[] = { |
| 159 | { |
| 160 | .data_type = QMI_STRUCT, |
| 161 | .elem_len = 1, |
| 162 | .elem_size = sizeof(struct servreg_loc_qmi_result), |
| 163 | .tlv_type = 2, |
| 164 | .offset = offsetof(struct servreg_loc_pfr_resp, result), |
| 165 | .ei_array = servreg_loc_qmi_result_ei, |
| 166 | }, |
| 167 | {} |
| 168 | }; |
| 169 | |