📄 httpengine.h
字号:
/*
============================================================================
Name : HttpEngine.h
Author :
Version : 1.0
Copyright : Your copyright notice
Description : CHttpEngine declaration
============================================================================
*/
#ifndef HTTPENGINE_H
#define HTTPENGINE_H
// INCLUDES
#include <e32std.h>
#include <e32base.h>
// CLASS DECLARATION
#include <http/rhttptransaction.h>
#include <http/mhttptransactioncallback.h>
#include <http/mhttpsessioneventcallback.h>
#include <http/rhttpsession.h>
#include <ES_SOCK.h>
class MDisplayObser;
/**
* CHttpEngine
*
*/
class CHttpEngine : public CBase, private MHTTPTransactionCallback,
protected MHTTPSessionEventCallback
{
public:
void SetObser(MDisplayObser* aObser);
void ConnectL(const TDesC& aUrl);
public:
// Constructors and destructor
/**
* Destructor.
*/
~CHttpEngine();
/**
* Two-phased constructor.
*/
static CHttpEngine* NewL();
/**
* Two-phased constructor.
*/
static CHttpEngine* NewLC();
private:
/**
* Constructor for performing 1st stage construction
*/
CHttpEngine();
/**
* EPOC default constructor for performing 2nd stage construction
*/
void ConstructL();
private:
virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction,
const THTTPEvent& aEvent);
private:
virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent);
virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent);
private:
RSocketServ iSocketServ;
RConnection iConnection;
RHTTPSession iSession;
RHTTPTransaction iTrans;
MDisplayObser* iObser;
TBool iHaveStart;
};
#endif // HTTPENGINE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -