blob: eef3412e4a78ce5e615b2d7c295393cf826a5c30 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/*=============================================================================
2# FileName: lynq_sms.h
3# Desc: about sms api
4# Author: zhouqunchao
5# Version:
6# LastChange: 2020-07-29
7# History:
8
9=============================================================================*/
10
11#ifndef YLNQ_SMS_H
12#define YLNQ_SMS_H 1
13#include <sys/types.h>
14#include "lib_tele.h"
15#ifdef __cplusplus
16extern "C" {
17#endif
18#define MIN_MSM_PARAM_NUM 4
19#define MIN_IMS_MSM_PARAM_NUM 6
20#define MIN_WRITE_MSM_PARAM_NUM 5
21#define MSG_MAX_LEN 256
22typedef struct {
23 char *telephonyNumber;
24 char *charset;
25 char *msg;
26 char *smsc;
27} SmsSendData;
28typedef struct{
29lynqBase base;
30RIL_SMS_Response smsResp;
31}smsResponse;
32typedef struct {
33 char *telephonyNumber;
34 char *charset;
35 char *msg;
36 char *retryNum;
37 char *messageRef;
38 char *smsc;
39} SmsImsSendData;
40
41typedef struct {
42 int smsStatus; //UnRead\Read\UnSent\Sent
43 char *recPhonNum;
44 char *charset;
45 char *msg;
46 char *smsc;
47} SmsInfo;
48
49typedef struct{
50lynqBase base;
51int msgStoreIndex;
52}messageStoreInfo;
53
54typedef struct{
55lynqBase base;
56char *smsc;
57}smscCbInfo;
58typedef struct
59{
60 int index;// the index of sms in memory,0-100.
61 int status;//read:0,unread:1
62 int smslen;//the length of sms,the maximum length shall not exceed the length specified in 3GGP protocol(160/70)
63 char message[MSG_MAX_LEN];//sms content
64 RIL_SOCKET_ID soc_id;
65 char teleNum[50];//telephony number
66 int numLen;
67}storeMessageInfo;
68int lynq_send_sms(const char *telephonyNumber, const int charset,const char *msg, const char *smsc, smsResponse* smsResp);
69int lynq_Ims_send_sms(const char *telephonyNumber, const int charset,const char *msg, const char*retryNum,const char *messageRef, const char *smsc,smsResponse *smsResp);
70int lynq_write_sms_to_sim(const int smsStatus,const char *recPhonNum,const int charset,const char *msg,const char *smsc,messageStoreInfo *msgstroeInfo);
71int lynq_report_sms_memory_status(const int status,lynqBase *base);
72int lynq_delet_sms_on_sim(const int index,lynqBase *base);
73int lynq_get_smsc_address(smscCbInfo *smscInfo);
74int lynq_set_smsc_address(const char* serviceNumber,lynqBase *base);
75void lynq_recive_new_sms_cb(RIL_SOCKET_ID soc_id,char * num, char * smsc, char * msg, int charset);
76int lynq_store_sms_to_memory(RIL_SOCKET_ID soc_id,const int status,char * num,const char* sms,lynqBase *base);
77int lynq_get_sms_from_memory(const int index, storeMessageInfo* sms,lynqBase *base);
78int lynq_delete_message_from_memory(const int index,lynqBase *base);
79
80#ifdef __cplusplus
81}
82#endif
83#endif