?? appsviewer.h
字號:
/////////////////////////////////////////////////////////////////////
// Project : AppsViewer
// File: AppsViewer.h
// 2005/07/26
/////////////////////////////////////////////////////////////////////
#if !defined(AFX_GATEWAYPROXYAPP_H__765E6B4A_5A8E_4342_A28A_41B6E441B775__INCLUDED_)
#define AFX_GATEWAYPROXYAPP_H__765E6B4A_5A8E_4342_A28A_41B6E441B775__INCLUDED_
//===========系統(tǒng)生成,請勿修改,開始========
#include "AEEModGen.h" // Module interface definitions
#include "AEEAppGen.h" // Applet interface definitions
//包含GameApi里面的類,需要在Tools->Options...->Directories->Include Files中設(shè)置GameApi的路徑
#include "Shell.h"
#include "Display.h"
//===========系統(tǒng)生成,請勿修改,結(jié)束========
//---------------- Inculde ------------------
#include "Web.h"
#include "Tapi.h"
#include "BaseWnd.h"
#include "GatewayProxyProtocol.h"
#include "GatewayProxyWeb.h"
//-------------------------------------------
//---------------- Define -------------------
#define GATEWAYPROXY_MAX_WND 7
#define EVT_APP_WEBSUCCEED EVT_USER + 10 //WEB操作成功
#define EVT_APP_WEBERROR EVT_USER + 11 //WEB操作失敗
#define EVT_APP_TOGETSUBSCRIPTION EVT_USER + 12 //檢測定購關(guān)系
#define APP_NAME_MAXLEN 20
#define APP_TYPE_DOWNLOADED 0X01 // 已下載
#define APP_TYPE_ALL 0X02 //所有
//-------------------------------------------
typedef struct
{
uint32 dwClsID; // CLSID of current applet
AECHAR wszAppName[APP_NAME_MAXLEN + 1]; // Application name
char szIMSI[PROTOCOL_IMSI_LEN+1]; // The IMSI of order SIM
JulianType dateExpire; // The expire date of current order
uint16 wBillingType; // The type of billing
}ORDER_INFO;
class CAppsViewer
{
//===========系統(tǒng)生成,請勿修改,開始========
public:
static boolean HandleEvent(IApplet * pIApplet, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
return ((CAppsViewer *)pIApplet)->OnEvent(eCode, wParam, dwParam);
}
static boolean InitAppData(IApplet * pIApplet)
{
return ((CAppsViewer *)pIApplet)->OnInitData();
}
static void FreeAppData(IApplet * pIApplet)
{
((CAppsViewer *)pIApplet)->OnFreeData();
}
/*
static void TempCB(CAppManager *p)
{
p->OnTempCB();
}
*/
//Web連接完成
void OnWebEnd(AEEEvent evt, uint16 wParam = NULL, uint32 dwParam = NULL);
protected:
//初始化應(yīng)用程序數(shù)據(jù)
boolean OnInitData();
//釋放應(yīng)用程序資源
void OnFreeData();
//處理應(yīng)用程序消息,事件
boolean OnEvent(AEEEvent evt, uint16 wParam, uint32 dwParam);
// Handle EVT_APP_START event
boolean OnAppStart(/*uint16 wParam, uint32 dwParam*/);
// Handle EVT_KEY(AVK_CLR) event
boolean OnClrKeyEvent();
// Handle EVT_COMMAND event
boolean OnCommand(uint16 wParam, uint32 dwParam);
// Insert a window to list and suspend previous window, show current window
void InsertWindow(CBaseWnd *pWnd, uint16 wState);
// Create base window and add two softkeys
CBaseWnd *CreateBaseWnd(uint16 wType, uint16 wSoftkey1, uint16 wSoftkey2);
// Create static base window and then set text and add two softkeys
CBaseWnd *CreateStaticBaseWnd(uint16 wSoftkey1, uint16 wSoftkey2, AECHAR *pwszText, AECHAR *pwszTitle = NULL);
//
boolean CreatePolicyOption(uint16 nPolicyId);
//
boolean CreatePolicyRenew(uint32 classId, boolean isCancel, boolean isRenew, AECHAR *pTitle);
//
boolean CreateConfirmWnd(AECHAR *pwszText);
// void OnWebResp(char *pszText);
//Data restore and save
protected:
//int ReadOrderInfo();
//int WriteOrderInfo();
//boolean IsOrderAvaible();
boolean ShowMessageWnd(uint16 nLeft, uint16 nRight, uint16 nMessageId, uint16 nState);
boolean OnMainMenu(uint16 wParam);
boolean StartGetAppsInfo(uint16 nType);
boolean StartGetSubscription(uint32 dwParam);
boolean StartGetService(uint16 nCatalogID);
boolean StartOrder(uint16 nPolicyID, uint16 isRenew);
boolean StartRenew(uint32 clsID);
boolean StartCancel(uint32 clsID);
//boolean StartTargetApp();
//
//數(shù)據(jù)定義
protected:
AEEApplet m_applet;
CShell *m_pShell;
CDisplay *m_pDisplay;
//===========系統(tǒng)生成,請勿修改,結(jié)束========
//...在此添加您自己的代碼
//Array of windows
CBaseWnd *m_arpWnd[GATEWAYPROXY_MAX_WND];
//Array of each window’s state
uint16 m_arwState[GATEWAYPROXY_MAX_WND];
//Index to indicate which item of window’s array is active now
uint16 m_wIndex;
//This Applet is suspended or not
boolean m_bSuspended;
//IMSI of current handset, get from SMS
char m_szIMSI[PROTOCOL_IMSI_LEN+1];
//Pointor of WebAction
CGatewayProxyWeb *m_pWebAction;
//Pointor of WebUtil
CWebUtil *m_pWebUtil;
//server url
char *m_pSvrUrl;
boolean m_bConnectionAction;
//資費策略
BillingPolicy *m_pBillingPolicys;
uint16 m_nPolicysCount;
//應(yīng)用數(shù)
AppInfo *m_pAppInfos;
uint16 m_nAppsCount;
uint32 m_clsCPApp;
uint16 m_nViewType;
//定購信息
uint16 m_nPolicyIndex;
uint16 m_nIsRenew;
};
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -