?? gatewayproxyprotocol.h
字號:
/////////////////////////////////////////////////////////////////////
// Project : GatewayProxy
// File: BaseWnd.h
// SMS and http protocol module of this project
// 2005/03/27
/////////////////////////////////////////////////////////////////////
#ifndef GATEWAYPROXY_PROTOCOL_H_
#define GATEWAYPROXY_PROTOCOL_H_
//---------------- Inculde ------------------
#include "AEE.h"
//-------------------------------------------
//---------------- Define -------------------
#define GATEWAYPROXY_VERSION 0x0001
#define PROTOCOL_CLSID_LEN 8
#define PROTOCOL_IMSI_LEN 15
#define PROTOCOL_APPNAME_LEN 20
#define PROTOCOL_POLICYTEXT_LEN 30
#define PROTOCOL_SEPARATOR ':'
//ErrorCode=1%ClassID=1100&BillingCount=2%BillingPolicy=2:普通包月1元&6:按次計費1元
/*
ErrorCode定義
0-有定購關系
1-無定購關系
10-查詢參數不正確
100-業務不存在
200-其它錯誤
*/
#define CODE_ORDER_POLICY 0
#define CODE_ALL_POLICY 1
#define CODE_PARAM_ERROR 10
#define CODE_NONE_POLICY 100
#define CODE_ERROR 200
#define UNKNOW_ERRORCODE 0xFFFF;
#define CODE_ORDER_EXIST 0
#define CODE_ORDER_SUCCESS 1
#define CODE_ORDER_FAIL 200
#define PROTOCOL_ERRORCODE_START "ErrorCode="
#define PROTOCOL_ERRORMSG_START "ErrorMsg="
#define PROTOCOL_BILLINGPOLICY_START "BillingPolicy="
#define PROTOCOL_BILLINGCOUNT_START "BillingCount="
#define PROTOCOL_PRODUCTCOUNT_START "ProductCount="
#define PROTOCOL_CATALOGCOUNT_START "CatalogCount="
#define PROTOCOL_CATALOGID_START "CatID="
#define PROTOCOL_CLASSID_START "ClassID="
#define PROTOCOL_BILLINGPOLICY_SEPARATOR1 '%'
#define PROTOCOL_BILLINGPOLICY_SEPARATOR2 '&'
#define PROTOCOL_TYPE_MIN 100
#define PROTOCOL_TYPE_ORDERNOTIFY 401 //定購通知
#define PROTOCOL_TYPE_CHARGENOTIFY 402 //續費提示通知
#define PROTOCOL_TYPE_MAN 499
#define POLICY_MONTH 0x0001 //包月
#define POLICY_QUARTER 0x0002 //包季
#define POLICY_YEAR 0x0003 //包年
#define POLICY_TIMES 0x0004 //計次
#define POLICY_TIME 0x0005 //時長
#define POLICY_FLUX 0x0006 //流量
#define POLICY_FOREVER 0xFFFF //永久
#define INFO_RENEW 0x0F//續定標記
#define INFO_CANCEL 0xF0//退定標記
//-------------------------------------------
typedef struct
{
// Action type
uint16 wType;
// CLASSID field
AEECLSID clsApp;
// IMSI field
char szIMSI[PROTOCOL_IMSI_LEN+1];
// Text field (reserve)
//char szText[PROTOCOL_SMSTEXT_LEN+1];
}SMSInfo;
//Billing Policy資費策略
typedef struct
{
//Policy ID
uint32 cls;
//Plicy string
AECHAR wszName[PROTOCOL_APPNAME_LEN + 1];
//定購關系
AECHAR wszPolicy[PROTOCOL_POLICYTEXT_LEN + 1];
//是否能退定續定標記
boolean isCancel;
boolean isRenew;
}AppInfo;
typedef struct
{
//Policy ID
uint16 wId;
//Plicy string
AECHAR wszPolicy[PROTOCOL_POLICYTEXT_LEN + 1];
//是否可續定
boolean bIsRenewable;
}BillingPolicy;
boolean PROTOCOL_SMSDecode(char *pszText, SMSInfo *pInfo);
BillingPolicy *PROTOCOL_BillPolicyDecode(char *pszText, uint16 &nCount, uint16 &nErrorCode);
AppInfo *PROTOCOL_AppDownloadDecode(char *pszText, uint16 &nCount, uint16 &nErrorCode);
AppInfo *PROTOCOL_ServiceDecode(char *pszText, uint16 &nCount, uint16 &nErrorCode);
uint16 PROTOCOL_ResultDecode(char *pszText/*, AECHAR *&pResultMsg*/);
uint32 PROTOCOL_HEXSTRToUINT32(const char *pszText);
uint16 PROTOCOL_BillInfoDecode(char *pszText);
#endif /* #ifndef GATEWAYPROXY_PROTOCOL_H_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -