symbian 使用http get post方式获取网页信息
2010-05-31 19:38:00 来源:WEB开发网343. _LIT(KRunError, "MHFRunError: %d");
344. text.Format(KRunError, aError);
345. iObserver.ClientEvent(text);
346. return KErrNone;
347. }
348.
349. // ----------------------------------------------------------------------------
350. // CClientEngine::GetNextDataPart()
351. //
352. // Inherited from MHTTPDataSupplier
353. // Called by framework when next part of the body is needed. In this
354. // this provides data for HTTP post.
355. // ----------------------------------------------------------------------------
356. TBool CClientEngine::GetNextDataPart(TPtrC8& aDataPart)
357. {
358. if(iPostData)
359. {
360. // Provide pointer to next chunk of data (return ETrue, if last chunk)
361. // Usually only one chunk is needed, but sending big file could require
362. // loading the file in small parts.
363. aDataPart.Set(iPostData- >Des());
364. }
365. return ETrue;
366. }
367.
368. // ----------------------------------------------------------------------------
369. // CClientEngine::ReleaseData()
370. //
371. // Inherited from MHTTPDataSupplier
372. // Called by framework. Allows us to release resources needed for previous
373. // chunk. (e.g. free buffers)
374. // ----------------------------------------------------------------------------
375. void CClientEngine::ReleaseData()
376. {
377. // It's safe to delete iPostData now.
378. delete iPostData;
379. iPostData = NULL;
380. }
381. // ----------------------------------------------------------------------------
382. // CClientEngine::Reset()
更多精彩
赞助商链接