symbian 使用http get post方式获取网页信息
2010-05-31 19:38:00 来源:WEB开发网核心提示:#include < HttpStringConstants.h > #include < httpRHTTPTransaction.h > #include < httpRHTTPSession.h > #include < httpRHTTPHeaders.h > #
#include < HttpStringConstants.h > #include < httpRHTTPTransaction.h
> #include < httpRHTTPSession.h > #include < httpRHTTPHeaders.h
> #include < HTTPClientExample.rsg > #include < COMMDB.H >
//Communications database #include < CDBPREFTABLE.H > //Connection
Preferences table #include < CommDbConnPref.h > #include "Client.pan"
#include "Client.hrh" #include "ClientEngine.h" // Used user agent for requests
_LIT8(KUserAgent, "SimpleClient 1.0"); // This client accepts all content types.
// (change to e.g. "text/plain" for plain text only) _LIT8(KAccept, "*/*");
const TInt KStatustextBufferSize = 32; const TInt KInfotextBufferSize = 64;
const TInt KURIBufferSize = 128; const TInt KDefaultBufferSize = 256; //
---------------------------------------------------------------------------- //
CClientEngine::NewL() // // Creates instance of CClientEngine. //
----------------------------------------------------------------------------
CClientEngine* CClientEngine::NewL(MClientObserver& aObserver) {
CClientEngine* self = CClientEngine::NewLC(aObserver); CleanupStack::Pop(self);
return self; } //
---------------------------------------------------------------------------- //
CClientEngine::NewLC() // // Creates instance of CClientEngine. //
----------------------------------------------------------------------------
CClientEngine* CClientEngine::NewLC(MClientObserver& aObserver) {
CClientEngine* self = new (ELeave) CClientEngine(aObserver);
CleanupStack::PushL(self); self- >ConstructL(); return self; } //
---------------------------------------------------------------------------- //
CClientEngine::CClientEngine() // // First phase constructor. //
----------------------------------------------------------------------------
CClientEngine::CClientEngine(MClientObserver& aObserver) :
iObserver(aObserver), iPostData(NULL), iRunning(EFalse) { } //
---------------------------------------------------------------------------- //
更多精彩
赞助商链接