blob: acf28acb41a932cdc1760a290d4e4fbc4d996ad6 [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001#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
7extern "C" {
8#endif
9typedef struct{
10 int32_t token;
11 int32_t request;
12 RIL_Errno e;
13}lynqBase;
14typedef enum {
15 SUCCESS = 0,
16 ERROR = 1,
17}RIL_Errcode;
18
19typedef 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
25extern user_cb *s_Env;
26
27
28/*
29struct 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);
35typedef void (*requestResponse)(int32_t token,RIL_Errcode e,char *response);
36typedef void (*unsolicitedResponse)(int unsolResponse,char *response,int responselen);
37//void lynqRegisterRequestResponse(requestResponse cb);
38void lynqRegisterUnsolicitedResponse(user_cb * cb);
39void registerOnUnsolicitedResponse(user_cb* cb);
40
41int getRequestData(char **data, int lenth);
42int lynq_waitToRcvCmd(char **data, int lenth);
43void lynq_ril_init();
44void lynq_ril_deinit(void);
45
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif