#ifndef LYNQ_SMS_QPI_H | |
#define LYNQ_SMS_QPI_H | |
/* | |
* | |
* Data : 2022/11/29 | |
* Author : LuoJian | |
*/ | |
#include "mbtk_type.h" | |
#define TELEPHONE_NUM_MAX 16 | |
#define MSM_NUMBER_MAX 1024+1 | |
#define RES_NUM_MIN 128 | |
enum EnumDCS { | |
BIT7 = 0, // GSM ×Ö·û¼¯ | |
BIT8 = 1, // ASCII×Ö·û¼¯ | |
UCS2 = 2 // Unicode ×Ö·û¼¯ | |
}; | |
struct PDUUDH { | |
unsigned int count; // ÐÅÏ¢ÔªËØÊý¾Ý×Ö½ÚÊý | |
char IEI; // ÐÅÏ¢ÔªËØ±êʶ | |
char *IED; // ÐÅÏ¢ÔªËØÊý¾Ý | |
}; | |
// Óû§Êý¾ÝÍ· | |
struct UDHS { | |
int count; | |
struct PDUUDH *UDH; | |
}; | |
struct SMS_Struct { | |
char *SCA; // ·þÎñÖÐÐĵØÖ· | |
char *OA; // ·¢ËÍ·½µØÖ· | |
char *SCTS; // ·þÎñÖÐÐÄʱ¼ä´Á | |
struct UDHS *UDH; // Óû§Êý¾ÝÍ· | |
char *UD; // Óû§Êý¾Ý | |
bool RP; // Ó¦´ð·¾¶ | |
bool UDHI; // Óû§Êý¾ÝÍ·±êʶ | |
bool SRI; // ״̬±¨¸æÖ¸Ê¾ | |
bool MMS; // ¸ü¶àÐÅÏ¢·¢ËÍ | |
int MTI; // ÐÅÏ¢ÀàÐÍָʾ | |
char PID; // PID ÐÒé±êʶ | |
enum EnumDCS DCS; // Êý¾Ý±àÂë·½°¸ | |
bool TC; // Îı¾Ñ¹Ëõָʾ 0£º δѹËõ 1£ºÑ¹Ëõ | |
int MC; // ÏûÏ¢ÀàÐÍ -1£º ÎÞ 1£ºÒƶ¯Éè±¸ÌØ¶¨ÀàÐÍ 2£ºSIMÌØ¶¨ÀàÐÍ 3£ºÖÕ¶ËÉè±¸ÌØ¶¨ÀàÐÍ | |
}; | |
extern struct SMS_Struct PDUDecoding(const char *data); | |
#define DSC_to_msg(DSC) (DSC == 0 ? "Bit7" : (DSC == 1 ? "Bit8" : "UCS2")) | |
int lynq_init_sms(int uToken); | |
int lynq_deinit_sms(void); | |
int lynq_delete_sms(int index); | |
int lynq_wait_receive_new_sms(int *handle); | |
int lynq_send_sms(char *telephony_num, int state, char *msg); | |
int lynq_list_sms(int stat, int index, char *data); | |
int lynq_query_sms_storage_status(void); | |
void lynq_sms_state_change_cb(const void* data, int data_len); | |
int lynq_get_smsc_address(char *serviceNumber); | |
int lynq_set_smsc_address(const char* service_num); | |
#endif |