b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <unistd.h> |
| 4 | #include <errno.h> |
| 5 | #include <sys/socket.h> |
| 6 | #include <sys/un.h> |
| 7 | #include <netinet/in.h> |
| 8 | #include <pthread.h> |
| 9 | #include <sys/epoll.h> |
| 10 | #include <fcntl.h> |
| 11 | #include <signal.h> |
| 12 | |
| 13 | #include "mbtk_type.h" |
| 14 | #include "mbtk_ril.h" |
| 15 | #include "atchannel.h" |
| 16 | #include "at_tok.h" |
| 17 | #include "mbtk_utils.h" |
| 18 | #include "ril_info.h" |
| 19 | |
b.liu | 7ca612c | 2025-04-25 09:23:36 +0800 | [diff] [blame^] | 20 | void ril_rsp_pack_send(mbtk_sim_type_enum sim_id, ATPortType_enum port, int fd, int ril_id, int msg_index, const void* data, int data_len); |
| 21 | ATPortId_enum portType_2_portId(mbtk_sim_type_enum sim_id, ATPortType_enum port); |
b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 22 | |
| 23 | //void net_list_free(void *data); |
| 24 | // Return MBTK_INFO_ERR_SUCCESS,will call pack_error_send() to send RSP. |
| 25 | // Otherwise, do not call pack_error_send(). |
| 26 | mbtk_ril_err_enum pb_pack_req_process(sock_cli_info_t* cli_info, ril_msg_pack_info_t* pack) |
| 27 | { |
| 28 | mbtk_ril_err_enum err = MBTK_RIL_ERR_SUCCESS; |
b.liu | 62240ee | 2024-11-07 17:52:45 +0800 | [diff] [blame] | 29 | // int cme_err = MBTK_RIL_ERR_CME_NON; |
b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 30 | switch(pack->msg_id) |
| 31 | { |
| 32 | case RIL_MSG_ID_PB_STATE: |
| 33 | { |
| 34 | if(pack->data_len == 0 || pack->data == NULL) |
| 35 | { |
| 36 | err = MBTK_RIL_ERR_UNSUPPORTED; |
| 37 | } |
| 38 | else // Set |
| 39 | { |
| 40 | |
| 41 | } |
| 42 | break; |
| 43 | } |
| 44 | default: |
| 45 | { |
| 46 | err = MBTK_RIL_ERR_REQ_UNKNOWN; |
| 47 | LOG("Unknown request : %s", id2str(pack->msg_id)); |
| 48 | break; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | return err; |
| 53 | } |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |