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

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

 2010-05-31 19:38:00 来源:WEB开发网   
核心提示:length in header). // TInt CClientEngine::OverallDataSize() { if(iPostData) return iPostData- >Length(); else return KErrNotFound ; } // // CClientEngine::
length in header). // ---------------------------------------------------------------------------- TInt CClientEngine::OverallDataSize() { if(iPostData) return iPostData- >Length(); else return KErrNotFound ; } // ---------------------------------------------------------------------------- // CClientEngine::GetCredentialsL() // // Inherited from MHTTPAuthenticationCallback // Called by framework when we requested authenticated page and framework // needs to know username and password. // ---------------------------------------------------------------------------- TBool CClientEngine::GetCredentialsL(const TUriC8& aURI, RString aRealm, RStringF aAuthenticationType, RString& aUsername, RString& aPassword) { // aURI, aReal and aAuthenticationType are informational only. We only need // to set aUsername and aPassword and return ETrue, if aUsername and // aPassword are provided by user. // Informational only TBuf< KURIBufferSize > authType; TBuf< KURIBufferSize > uri; TBuf< KDefaultBufferSize > authText; authType.Copy(aAuthenticationType.DesC()); uri.Copy(aURI.UriDes()); _LIT(KAuthRequired, "%S requires %S authentication."); authText.Format(KAuthRequired, &uri, &authType); _LIT(KAuthNote, "Authentication required."); CEikonEnv::Static()- >InfoWinL(KAuthNote, authText); // Query user name and password TBuf< KDefaultBufferSize > userName; TBuf< KDefaultBufferSize > password; CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL(userName, password); if (!dlg- >ExecuteLD(R_DIALOG_USER_PASSWORD_QUERY)) return EFalse; // No credentials given; must return EFalse // Set aUsername and aPassword TBuf8< KDefaultBufferSize > temp; temp.Copy(userName); TRAPD(err, aUsername = aRealm.Pool().OpenStringL(temp)); if (!err) { temp.Copy(password); TRAP(err, aPassword = aRealm.Pool().OpenStringL(temp)); if (!err) return ETrue; } // Return ETrue if user has given credentials (username and password), //

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

Tags:symbian 使用 http

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