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 | b171c9a | 2024-11-12 19:23:29 +0800 | [diff] [blame^] | 20 | void ril_rsp_pack_send(ATPortType_enum port, int fd, int ril_id, int msg_index, const void* data, int data_len); |
b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 21 | |
| 22 | //void net_list_free(void *data); |
| 23 | // Return MBTK_INFO_ERR_SUCCESS,will call pack_error_send() to send RSP. |
| 24 | // Otherwise, do not call pack_error_send(). |
| 25 | mbtk_ril_err_enum pb_pack_req_process(sock_cli_info_t* cli_info, ril_msg_pack_info_t* pack) |
| 26 | { |
| 27 | mbtk_ril_err_enum err = MBTK_RIL_ERR_SUCCESS; |
b.liu | 62240ee | 2024-11-07 17:52:45 +0800 | [diff] [blame] | 28 | // int cme_err = MBTK_RIL_ERR_CME_NON; |
b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 29 | switch(pack->msg_id) |
| 30 | { |
| 31 | case RIL_MSG_ID_PB_STATE: |
| 32 | { |
| 33 | if(pack->data_len == 0 || pack->data == NULL) |
| 34 | { |
| 35 | err = MBTK_RIL_ERR_UNSUPPORTED; |
| 36 | } |
| 37 | else // Set |
| 38 | { |
| 39 | |
| 40 | } |
| 41 | break; |
| 42 | } |
| 43 | default: |
| 44 | { |
| 45 | err = MBTK_RIL_ERR_REQ_UNKNOWN; |
| 46 | LOG("Unknown request : %s", id2str(pack->msg_id)); |
| 47 | break; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | return err; |
| 52 | } |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |