Add mbtk_ril V2 (Default close)
Change-Id: Iaa5921fd74aeeb394771110f0cec7aa7742dc83a
diff --git a/mbtk/mbtk_rild_v2/inc/ril_info.h b/mbtk/mbtk_rild_v2/inc/ril_info.h
new file mode 100755
index 0000000..896a73c
--- /dev/null
+++ b/mbtk/mbtk_rild_v2/inc/ril_info.h
@@ -0,0 +1,124 @@
+/*
+* ril_info.h
+*
+* MBTK Ril information header.
+*
+* Author : lb
+* Date : 2024/8/6 10:53:08
+*/
+#ifndef _RIL_INFO_H
+#define _RIL_INFO_H
+#include <stdio.h>
+
+#include "mbtk_type.h"
+#include "mbtk_ril_api.h"
+#include "mbtk_log.h"
+#include "atchannel.h"
+#include "at_tok.h"
+#include "mbtk_list.h"
+#include "mbtk_device.h"
+#include "mbtk_queue.h"
+
+#define SOCK_CLIENT_MAX 100
+#define EPOLL_LISTEN_MAX 100
+#define IND_REGISTER_MAX 10
+#define PACK_PROCESS_QUEUE_MAX 20
+
+#define MBTK_APN_PROP "persist.mbtk.apn"
+#define MBTK_DEF_ROUTE_CID "persist.mbtk.def_route_cid"
+
+typedef struct
+{
+ int fd;
+
+ uint32 ind_num;
+ uint16 ind_register[IND_REGISTER_MAX];
+} sock_cli_info_t;
+
+typedef struct
+{
+ sock_cli_info_t *cli_info;
+ void* pack; // Refro to : ril_msg_pack_info_t
+} ril_msg_queue_info_t;
+
+typedef struct {
+ mbtk_radio_state_enum radio_state;
+ mbtk_sim_state_enum sim_state;
+ int sock_listen_fd;
+ int epoll_fd;
+ bool at_process;
+
+ list_node_t *sock_client_list; // Refor to : sock_cli_info_t
+ mbtk_queue_node_t msg_queue; // Refor to : ril_msg_queue_info_t
+ pthread_cond_t msg_cond;
+ pthread_mutex_t msg_mutex;
+} ril_info_t;
+
+typedef struct {
+ bool band_set_success;
+ mbtk_modem_band_area_enum band_area;
+ mbtk_band_info_t band_support;
+} ril_band_info_t;
+
+typedef enum {
+ RIL_URC_MSG_RADIO_STATE,
+ RIL_URC_MSG_CGEV,
+ RIL_URC_MSG_NET_CS_REG_STATE,
+ RIL_URC_MSG_NET_PS_REG_STATE,
+ RIL_URC_MSG_CALL_STATE,
+ RIL_URC_MSG_SIM_STATE,
+ RIL_URC_MSG_PDP_STATE,
+ RIL_URC_MSG_SMS_STATE,
+ RIL_URC_MSG_SET_BAND,
+ RIL_URC_MSG_GET_SIM_STATE, //check sim status
+ RIL_URC_MSG_NET_STATE_LOG // Save Network state into file.
+} ril_urc_msg_id_enum;
+
+/*
+0: unknown
+1: available
+2: current
+3: forbidden
+*/
+typedef enum
+{
+ MBTK_NET_AVIL_STATE_UNKNOWN = 0,
+ MBTK_NET_AVIL_STATE_AVAILABLE,
+ MBTK_NET_AVIL_STATE_CURRENT,
+ MBTK_NET_AVIL_STATE_FORBIDDEN
+} mbtk_net_avil_state_enum;
+
+typedef enum {
+ RIL_DATA_CALL_STATE_STOP,
+ RIL_DATA_CALL_STATE_STARTED,
+ RIL_DATA_CALL_STATE_STARTING, // Data dialing in progress
+ RIL_DATA_CALL_STATE_STOPPING // Ending data dialing
+} ril_data_call_state_enum;
+
+typedef struct {
+ ril_urc_msg_id_enum msg;
+
+ void *data;
+ int data_len;
+} ril_urc_msg_info_t;
+
+typedef struct {
+ mbtk_ril_cid_enum cid_for_def_route;
+
+ int num;
+ mbtk_apn_info_t apns[MBTK_APN_CID_MAX];
+} ril_apn_info_array_t;
+
+extern ril_info_t ril_info;
+
+
+mbtk_radio_state_enum ril_radio_state_get();
+mbtk_ril_err_enum ril_radio_state_set(mbtk_radio_state_enum state, bool reset);
+
+mbtk_sim_state_enum ril_sim_state_get();
+
+void apn_auto_conf_from_prop();
+
+bool is_ipv4(const char *ip);
+
+#endif /* _RIL_INFO_H */