void URL_DataStorage::StartLoadingTvDocument() { loading = OP_NEW(URL_Tv_LoadHandler, (url, g_main_message_handler)); // We need this to be able to continue in the next stage (url_ds.cpp) if (!loading) //OOM { SetAttribute(URL::KLoadStatus,URL_LOADING_FAILURE); SetAttribute(URL::KHeaderLoaded,TRUE); SetAttribute(URL::KReloading,FALSE); SetAttribute(URL::KResumeSupported,FALSE); SetAttribute(URL::KReloadSameTarget,FALSE); BroadcastMessage(MSG_URL_LOADING_FAILED, url->GetID(), URL_ERRSTR(SI, ERR_COMM_INTERNAL_ERROR), MH_LIST_ALL); //g_memory_manager->RaiseCondition(OpStatus::ERR_NO_MEMORY); return; } SetAttribute(URL::KMIME_ForceContentType, "image/atvef"); SetAttributeL(URL::KMIME_Type, "image/atvef"); SetAttributeL(URL::KContentType, URL_TV_CONTENT); // Broadcast that header has loaded... BroadcastMessage(MSG_HEADER_LOADED, url->GetID(), url->GetIsFollowed() ? 0 : 1, MH_LIST_ALL); // Broadcast that data has been loaded. BroadcastMessage(MSG_URL_DATA_LOADED, url->GetID(), 0,MH_LIST_ALL); UnsetListCallbacks(); mh_list->Clean(); url->SetIsFollowed(TRUE); SetAttribute(URL::KHeaderLoaded, TRUE); SetAttribute(URL::KLoadStatus,URL_LOADED); }
void URL_DataStorage::Authenticate(AuthElm *auth_elm) { if(!auth_elm || !mh_list || mh_list->IsEmpty()) return; if((auth_elm->GetScheme() & AUTH_SCHEME_HTTP_PROXY) == 0 && (url->GetAttribute(URL::KUserName).CStr() || url->GetAttribute(URL::KPassWord).CStr())) { if(url->GetAttribute(URL::KUserName).Compare(auth_elm->GetUser()) != 0) { if((auth_elm->GetScheme() & AUTH_SCHEME_FTP) != 0) { FailAuthenticate(AUTH_GENERAL_FAILURE); return; } // redirect to non-username URL OpString8 temp_url; url->GetAttribute(URL::KName_With_Fragment_Escaped, temp_url); URL redirect_url = urlManager->GetURL(temp_url); TRAPD(op_err, SetAttributeL(URL::KMovedToURL, redirect_url)); if(OpStatus::IsSuccess(op_err)) ExecuteRedirect_Stage2(); HandleFinished(); return; } } if(loading) loading->Authenticate(auth_elm); }
EXPORT_C void CSyGeneratorBase::SetAttributeL(const TDesC& aName, const TDesC& aValue) { SetAttributeL(KEmptyPrefix, aName, aValue); }