📄 iapconnectengine.h
字号:
/*
* ============================================================================
* Name : CIAPConnectEngine from IAPConnectEngine.h
* Part of : IAPConnect
* Created : 07.11.2002
* Description:
* Declares Engine class for the application.
* Version : 1.0
* Copyright:
* ============================================================================
*/
#ifndef IAPCONNECTENGINE_H
#define IAPCONNECTENGINE_H
// INCLUDES
#include <e32base.h>
#include <nifman.h>
#include "IAPConnectStateObserver.h"
// FORWARD DECLARATIONS;
class CIntConnectionInitiator;
class CIAPConnectWaitDialog;
class CTextResolver;
// CONSTANTS
const TUint32 KUndefinedIAPid = 0x00;
// CLASS DECLARATION
/**
* CIAPConnectEngine Controls the internet connection initiation and shutdown
*/
class CIAPConnectEngine : public CActive
{
public:
enum TNifTimerState
{
ETimerEnabled,
ETimerDisabled
};
// Createa a CIAPConnectEngine object
static CIAPConnectEngine* NewL(MIAPConnectStateObserver* aObserver);
// Creates a CIAPConnectEngine object and puts the pointer in to
// the Cleanup Stack
static CIAPConnectEngine* NewLC(MIAPConnectStateObserver* aObserver);
// Destructor
~CIAPConnectEngine();
// Creates a connection to IAP
void ConnectL( TBool aRetry = EFalse );
// Releases the connection
void ReleaseL();
// Terminates any active connection
void TerminateConnectionL();
// Sets connection preferences
void SetConnectionPreferences(TInt aBearer, TBool aDialog, TUint32 aIapId=KUndefinedIAPid);
protected: // from CActive
// Respond to events
void RunL();
// Cancels any outstanding requests
void DoCancel();
private:
// Constructor
CIAPConnectEngine(MIAPConnectStateObserver* aObserver);
// Second phase constructor
void ConstructL();
// Shows information note
//void PrintNoteL(const TDesC& aNoteText);
// Shows error message
void PrintErrorL(const TDesC& aErrorText, TInt aErrorCode);
// Shows termination query dialog and returns true/false
TInt ShowQueryDialogL();
// Checks if there is an active connection
TInt IsDisconnected(TUint32& aIap);
private:
RNif iNif;
TInt iState;
TInt iNifTimerState;
CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref iPref;
// Owns
CIntConnectionInitiator* iConnect;
CIAPConnectWaitDialog* iWaitDialog;
CTextResolver* iTextResolver;
MIAPConnectStateObserver* iObserver;
public:
TUint32 iIapId;
};
#endif // IAPCONNECTENGINE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -