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

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

 2010-05-31 19:38:00 来源:WEB开发网   
核心提示:provides data for HTTP post. // TBool CClientEngine::GetNextDataPart(TPtrC8& aDataPart) { if(iPostData) { // Provide pointer to next chunk of data (return ETru
provides data for HTTP post. // ---------------------------------------------------------------------------- TBool CClientEngine::GetNextDataPart(TPtrC8& aDataPart) { if(iPostData) { // Provide pointer to next chunk of data (return ETrue, if last chunk) // Usually only one chunk is needed, but sending big file could require // loading the file in small parts. aDataPart.Set(iPostData- >Des()); } return ETrue; } // ---------------------------------------------------------------------------- // CClientEngine::ReleaseData() // // Inherited from MHTTPDataSupplier // Called by framework. Allows us to release resources needed for previous // chunk. (e.g. free buffers) // ---------------------------------------------------------------------------- void CClientEngine::ReleaseData() { // It's safe to delete iPostData now. delete iPostData; iPostData = NULL; } // ---------------------------------------------------------------------------- // CClientEngine::Reset() // // Inherited from MHTTPDataSupplier // Called by framework to reset the data supplier. Indicates to the data // supplier that it should return to the first part of the data. // In practise an error has occured while sending data, and framework needs to // resend data. // ---------------------------------------------------------------------------- TInt CClientEngine::Reset() { // Nothing needed since iPostData still exists and contains all the data. // (If a file is used and read in small parts we should seek to beginning // of file and provide the first chunk again in GetNextDataPart() ) return KErrNone; } // ---------------------------------------------------------------------------- // CClientEngine::OverallDataSize() // // Inherited from MHTTPDataSupplier // Called by framework. We should return the expected size of data to be sent. // If it's not know we can return KErrNotFound (it's allowed and does not cause // problems, since HTTP protocol allows multipart bodys without exact content //

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

Tags:symbian 使用 http

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