| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame^] | 1 | #ifndef _LIB_TEL_H_ |
| 2 | #define _LIB_TEL_H_ |
| 3 | #include <sys/types.h> |
| 4 | #include <vendor-ril/telephony/ril.h> |
| 5 | //#include <msgqril/lib_thread.h> |
| 6 | #ifdef __cplusplus |
| 7 | extern "C" { |
| 8 | #endif |
| 9 | typedef struct{ |
| 10 | int32_t token; |
| 11 | int32_t request; |
| 12 | RIL_Errno e; |
| 13 | }lynqBase; |
| 14 | typedef enum { |
| 15 | SUCCESS = 0, |
| 16 | ERROR = 1, |
| 17 | }RIL_Errcode; |
| 18 | |
| 19 | typedef struct |
| 20 | { |
| 21 | void (*recive_new_sms_cb)(RIL_SOCKET_ID soc_id,char *num, char *smsc, char *msg, int charset); |
| 22 | void (*incoming_call_cb)(RIL_SOCKET_ID soc_id,int index, char *addr, RIL_CallState state, int toa); |
| 23 | }user_cb; |
| 24 | |
| 25 | extern user_cb *s_Env; |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | struct RIL_Cb { |
| 30 | void (*requestResponse)(int32_t token,RIL_Errcode e,char*response,int responselen); |
| 31 | void (*unsolicitedResponse)(char *response,int responselen); |
| 32 | }*/ |
| 33 | |
| 34 | //typedef void (*requestResponse)(int32_t token,RIL_Errcode e,char*response,int responselen); |
| 35 | typedef void (*requestResponse)(int32_t token,RIL_Errcode e,char *response); |
| 36 | typedef void (*unsolicitedResponse)(int unsolResponse,char *response,int responselen); |
| 37 | //void lynqRegisterRequestResponse(requestResponse cb); |
| 38 | void lynqRegisterUnsolicitedResponse(user_cb * cb); |
| 39 | void registerOnUnsolicitedResponse(user_cb* cb); |
| 40 | |
| 41 | int getRequestData(char **data, int lenth); |
| 42 | int lynq_waitToRcvCmd(char **data, int lenth); |
| 43 | void lynq_ril_init(); |
| 44 | void lynq_ril_deinit(void); |
| 45 | |
| 46 | |
| 47 | #ifdef __cplusplus |
| 48 | } |
| 49 | #endif |
| 50 | |
| 51 | #endif |