WEB开发网
开发学院手机开发Symbian 开发 symbian 使用http get post方式获取网页信息 阅读

symbian 使用http get post方式获取网页信息

 2010-05-31 19:38:00 来源:WEB开发网   
核心提示:iObserver.ClientEvent(KTransactionSuccessful);//打印在下面的框中 // Transaction can be closed now. It's not needed anymore. aTransaction.Close(); iRunning = EFalse;
iObserver.ClientEvent(KTransactionSuccessful);//打印在下面的框中 // Transaction can be closed now. It's not needed anymore. aTransaction.Close(); iRunning = EFalse; } break; case THTTPEvent::EFailed: { // Transaction completed with failure. _LIT(KTransactionFailed, "Transaction Failed"); iObserver.ClientEvent(KTransactionFailed); aTransaction.Close(); iRunning = EFalse; } break; default: // There are more events in THTTPEvent, but they are not usually // needed. However, event status smaller than zero should be handled // correctly since it's error. { TBuf< KInfotextBufferSize > text; if (aEvent.iStatus < 0) { _LIT(KErrorStr, "Error: %d"); text.Format(KErrorStr, aEvent.iStatus); // Just close the transaction on errors aTransaction.Close(); iRunning = EFalse; } else { // Other events are not errors (e.g. permanent and temporary // redirections) _LIT(KUnrecognisedEvent, "Unrecognised event: %d"); text.Format(KUnrecognisedEvent, aEvent.iStatus); } iObserver.ClientEvent(text); } break; } } // ---------------------------------------------------------------------------- // CClientEngine::MHFRunError() // // Inherited from MHTTPTransactionCallback // Called by framework when *leave* occurs in handling of transaction event. // These errors must be handled, or otherwise HTTP-CORE 6 panic is thrown. // ---------------------------------------------------------------------------- TInt CClientEngine::MHFRunError(TInt aError, RHTTPTransaction /*aTransaction*/, const THTTPEvent& /*aEvent*/) { // Just notify about the error and return KErrNone. TBuf< KInfotextBufferSize > text; _LIT(KRunError, "MHFRunError: %d"); text.Format(KRunError, aError); iObserver.ClientEvent(text); return KErrNone; } // ---------------------------------------------------------------------------- // CClientEngine::GetNextDataPart() // // Inherited from MHTTPDataSupplier // Called by framework when next part of the body is needed. In this // this

上一页  15 16 17 18 19 20 21 22 23  下一页

Tags:symbian 使用 http

编辑录入:coldstar [复制链接] [打 印]
赞助商链接