📄 smgpapi.h
字号:
#ifndef TSSX_SMGP_H
#define TSSX_SMGP_H
#define INVALID_LEN 4
#define INVALID_FEECODE 5
#define MSG_TOOLONG 6
#define INVALID_SERVICEID 7
#define MSG_TOOFAST 8
#define INVALID_ICP 10
#define INVALID_MSGFORMAT 11
#define INVALID_FEETYPE 12
#define INVALID_VALIDTIME 13
#define INVALID_ATIME 14
#define INVALID_CHARGETERMID 15
#define INVALID_DESTTERMID 16
#define INVALID_DESTTERMIDFILE 17
#define INVALID_MSGFILE 18
#define INVALID_MSGCONTENT 19
#define CONNECTGATEWAYERROR 20
#define LONGINERROR 21
#define RECVPKTERROR 22
#define SENDQUEUEFULL 23
#define OUTOFSYSTEM 24
#define SYSTEMERROR 99
#define ERROR_SOCKET_CREATE -100
#define ERROR_CONNECT -101
#define ERROR_SOCKET_WRITE -102
#define ERROR_SOCKET_READ -103
#define ERROR_ICP_ID -104
#define ERROR_AUTH -105
#define ERROR_MSG_LEN -106
#define ERROR_FEE_CODE -107
#define ERROR_SERVICE_ID -108
#define ERROR_FLOW_CONTROL -109
#define ERROR_SOCKET_CLOSE -110
/*
struct DeliverResp
{
char msgid[11];
int msgformat;
char srctermid[22];
int isreply;
int msglen;
char msgcontent[253];
char desttermid[22];
char recvtime[15];
};
*/
struct deliver{
char msgid[10];
unsigned char isreport;
unsigned char msgformat;
char recvtime[14];
char srctermid[21];
char desttermid[21];
unsigned char msglength;
char msgcontent[252];
};
struct SendBatchResp
{
char msgid[11];
int errorcode;
char phonenum[22];
};
int InitSMGPAPI (char inifile[100]);
int login (int type);
int SMGPSendSingle (int needreply,int msglevel,char serviceid[11],int msgformat,char feetype[3],
char feecode[7],char validtime[18],char attime[18],char chargetermid[22],
char desttermid[22],char replypath[22],int msglen,char *msgcontent,
char msgid[11],int *errorcode);
int SMGPSendBatch (int needreply,int msglevel,char serviceid[11],int msgformat,char feetype[3],
char feecode[7],char validtime[18],char attime[18],char chargetermid[22],
char desttermidfile[100],char msgfile[100],char msgidfile[100]);
int GetSendBatchResp (char msgidfile[100],int pos,struct SendBatchResp *sendbatchresp);
int SMGPDeliver(int Ntimeout,struct deliver *deli);
int SMGPActiveTest(int *errcode);
int logout();
int sendactivetestresp();
int sendexitresp();
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -