# Network API porting guide

This is a guide for converting code using the old URL class and associated API's to the new API in the network module.

## Overview

The old URL class has been divided into four parts, OpURL, OpRequest, OpResponse and OpResource.

OpURL is an immutable object representing only the resolved URL string, with convenience methods for accessing various parts. Specifically, an OpURL does not contain information about cache context, the state of a request, or response data.

OpRequest encapsulates the information that is set up prior to sending the request to the server, pertaining to different aspects of how the request should be performed and cached. Here, you also set up the listener that will get callbacks when the request progresses.

OpResponse encapsulates the information contained in the header received by the server.

OpResource represents the actual data returned by the server.

In addition, the API defines the following classes:

OpDataDescriptor is the new API's replacement for the old URL_DataDescriptor class. Here, all the fifo/streaming functionality previously provided by URL_DataDescriptor has been delegated to OpData.

OpServerName is an immutable object representing the name of a server in an OpURL.

OpBatchRequest is a meta-request for handling many OpRequests in a batch.

OpGeneratedResponse is an OpResponse generated by Opera.

Network contains various general high-level network methods that didn't fit in any of the other classes, for instance Network::SetVisited(url).

## Conversion tables

To reduce he width of the table columns below, some short-hand has been applied. Specificly, the full signature of each function has been reduced by omitting return type and parameter types, except in cases of ambiguity. Instead, the types are hinted at using suffixes. Parameters with default values are enclosed in [brackets]. The "_str" suffix may represent "const char*", "const uni_char*", "OpString[C]" and "OpString[C]8". In old code, "url" and parameters ending in "_url" are of type URL, while in new code they are of type OpURL. The parameter "val[ue]" is of generic type depending on the circumstances. Other variables might have been delcared as follows:

OpRequest *request;
OpResponse *response;
OpResource *resource;
OpDataDescriptor *dd;
OpServerName *sn;

## OpURL class

NOTE! OpURL does not support unique, context_id and follow_ref. No OpURL methods LEAVE. See the doxygen genreated documentation of OpURL and OpRequest.

Old call | New call | Note
urlManager->GetURL(url_str, [context_id]) | OpURL::Make(url_str) | context_id is applied in OpRequest::Make()
urlManager->GetURL(url_str, rel_str, [unique], [context_id]) | OpURL::Make(url_str, rel_str) | unique is achieved by request->GetLoadPolicy().SetReloadPolicy(URL_Reload_Exclusive)
urlManager->GetURL(prnt_url, url_str, [unique], [context_id]) | OpURL::Make(prnt_url, url_str) |
urlManager->GetURL(prnt_url, url_str, rel_str, [unique], [context_id]) | OpURL::Make(prnt_url, url_str, rel_str) |
url1 == url2 | url1 == url2 | Behaves differently because OpURL only represents the name of a URL
url.IsEmpty() | url.IsEmpty() |
url.GetAttribute(URL::KType, [follow_ref]) | url.GetType() | No OpURL methods support follow_ref
url.GetAttribute(URL::KRealType) | url.GetRealType() |
url.GetAttribute(URL::KProtocolName, val); | url.GetTypeName(val) |
url.GetAttribute(URL::KResolvedPort) | url.GetResolvedPort() |
url.GetAttribute(URL::KServerPort) | url.GetServerPort() |
url.SameServer(other, [include_port]) | url.IsSameServer(other, [include_port]) |
url.GetAttribute(URL::KHaveServerName) | url.HasServerName() |
url.GetAttribute(URL::KServerName, NULL) | url.GetServerName(servername_callback) |
url.GetAttribute(URL::KPath, val) | url.GetPath(val) |
url.GetAttribute(URL::KUniPath, charsetID, val) | url.GetPath(val, [FALSE], [charsetID]) |
url.GetAttribute(URL::KUniPath_Escaped, charsetID, val) | url.GetPath(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KFragment_Name, val) | url.GetFragmentName(val) |
url.GetAttribute(URL::KUniFragment_Name, val) | url.GetFragmentName(val) |
url.GetAttribute(URL::KHostName, val) | url.GetHostName(val) |
url.GetAttribute(URL::KUniHostName, val) | url.GetHostName(val) |
url.GetAttribute(URL::KUserName, val) | url.GetUsername(val) |
url.GetAttribute(URL::KPassWord, val) | url.GetPassword(val) |
url.GetAttribute(URL::KQuery, val) | url.GetQuery(val) |
url.GetAttribute(URL::KUniQuery_Escaped, val) | url.GetQuery(val) |
url.GetAttribute(URL::KHostNameAndPort_L, val) | url.GetHostNameAndPort(val) | Doesn't LEAVE
url.GetAttribute(URL::KUniHostNameAndPort_L, val) | url.GetHostNameAndPort(val) | Doesn't LEAVE
url.GetAttribute(URL::KName, val) | url.GetName(val, [FALSE]) |
url.GetAttribute(URL::KName_Escaped, val) | url.GetName(val, TRUE) |
url.GetAttribute(URL::KUniName, charsetID, val) | url.GetName(val, [FALSE], [charsetID]) |
url.GetAttribute(URL::KUniName_Escaped, charsetID, val) | url.GetName(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KName_With_Fragment, val) | url.GetNameWithFragment(val, [FALSE]) |
url.GetAttribute(URL::KName_With_Fragment_Escaped, val) | url.GetNameWithFragment(val, TRUE) |
url.GetAttribute(URL::KUniName_With_Fragment, charsetID, val) | url.GetNameWithFragment(val, [FALSE], [charsetID]) |
url.GetAttribute(URL::KUniName_With_Fragment_Escaped, charsetID, val) | url.GetNameWithFragment(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KUniName_With_Fragment, charsetID, val) | url. GetNameWithFragment(val, [FALSE], [charsetID]) |
url.GetAttribute(KUniName_With_Fragment_Escaped, charsetID, val) | url.GetNameWithFragment(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KUniPathAndQuery, charsetID, val) | url.GetPathAndQuery(val, [FALSE], [charsetID]) |
url.GetAttribute(KUniPathAndQuery_Escaped, charsetID, val) | url.GetPathAndQuery(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KPathAndQuery_L, val) | url.GetPathAndQuery(val) | Doesn't LEAVE
url.GetAttribute(URL::KUniName_For_Data, charsetID, val) | url.GetNameForData(val, [charsetID]) |
url.GetAttribute(URL::KUniPath_FollowSymlink, charsetID, val) | url.GetPathFollowSymlink(val, [FALSE], [charsetID]) |
url.GetAttribute(URL::KUniPath_FollowSymlink_Escaped, charsetID, val) | url.GetPathFollowSymlink(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KUniPath_SymlinkTarget, charsetID, val) | url.GetPathSymlinkTarget(val, [FALSE], [charsetID]) |
url.GetAttribute(URL::KUniPath_SymlinkTarget_Escaped, charsetID, val) | url.GetPathSymlinkTarget(val, TRUE, [charsetID]) |
url.GetAttribute(URL::KName_Username, val) | url.GetNameUsername(val, [FALSE], [OpURL::NoPassword]) |
url.GetAttribute(URL::KName_Username_Escaped, val) | url.GetNameUsername(val, TRUE, [OpURL::NoPassword]) |
url.GetAttribute(URL::KName_Username_Password_NOT_FOR_UI, val) | url.GetNameUsername(val, FALSE, OpURL::PasswordVisible_NOT_FOR_UI) |
url.GetAttribute(URL::KName_Username_Password_Escaped_NOT_FOR_UI, val) | url.GetNameUsername(val, TRUE, OpURL::PasswordVisible_NOT_FOR_UI) |
url.GetAttribute(URL::KName_Username_Password_Hidden, val) | url.GetNameUsername(val, FALSE, OpURL::PasswordHidden) |
url.GetAttribute(URL::KName_Username_Password_Hidden_Escaped, val) | url.GetNameUsername(val, TRUE, OpURL::PasswordHidden) |
url.GetAttribute(URL::KUniName_Username, charsetID, val) | url.GetNameUsername(val, [FALSE], [OpURL::NoPassword], [charsetID]) |
url.GetAttribute(URL::KUniName_Username_Escaped, charsetID, val) | url.GetNameUsername(val, TRUE, [OpURL::NoPassword], [charsetID]) |
url.GetAttribute(URL::KUniName_Username_Password_NOT_FOR_UI, charsetID, val) | url.GetNameUsername(val, FALSE, OpURL::PasswordVisible_NOT_FOR_UI, [charsetID]) |
url.GetAttribute(URL::KUniName_Username_Password_Escaped_NOT_FOR_UI, charsetID, val) | url.GetNameUsername(val, TRUE, OpURL::PasswordVisible_NOT_FOR_UI, [charsetID]) |
url.GetAttribute(URL::KUniName_Username_Password_Hidden, charsetID, val) | url.GetNameUsername(val, FALSE, OpURL::PasswordHidden, [charsetID]) |
url.GetAttribute(URL::KUniName_Username_Password_Hidden_Escaped, charsetID, val) | url.GetNameUsername(val, TRUE, OpURL::PasswordHidden, [charsetID]) |
url.GetAttribute(URL::KName_With_Fragment_Username, val) | url.GetNameWithFragmentUsername(val, [FALSE], [OpURL::NoPassword]) |
url.GetAttribute(URL::KName_With_Fragment_Username_Escaped, val) | url.GetNameWithFragmentUsername(val, TRUE, [OpURL::NoPassword]) |
url.GetAttribute(URL::KName_With_Fragment_Username_Password_NOT_FOR_UI, val) | url.GetNameWithFragmentUsername(val, FALSE, OpURL::PasswordVisible_NOT_FOR_UI) |
url.GetAttribute(URL::KName_With_Fragment_Username_Password_Escaped_NOT_FOR_UI, val) | url.GetNameWithFragmentUsername(val, TRUE, OpURL::PasswordVisible_NOT_FOR_UI) |
url.GetAttribute(URL::KName_With_Fragment_Username_Password_Hidden, val) | url.GetNameWithFragmentUsername(val, FALSE, OpURL::PasswordHidden) |
url.GetAttribute(URL::KName_With_Fragment_Username_Password_Hidden_Escaped, val) | url.GetNameWithFragmentUsername(val, TRUE, OpURL::PasswordHidden) |
url.GetAttribute(URL::KProtocolScheme, entry) | url.GetProtocolScheme() |
url.GetAttribute(URL::KInvalidURLKind) | url.GetInvalidURLKind() |

## OpRequest class

Old call | New call | Note
url.SetAttributeL(URL::KReferrerURL, referrer) | OpRequest::Make(request, listener, url, context_id, referrer) |
g_url_api->MakeUnique(url) | request->GetLoadPolicy().SetReloadPolicy(URL_Reload_Exclusive) |
url.SetAttribute(URL::KHTTP_Method, method) | request->SetHTTPMethod(method) |
url.GetAttribute(URL::KHTTP_Method) | request->GetHTTPMethod() |
url.SetAttribute(URL::KHTTPSpecialMethodStr, special_method) | request->SetCustomHTTPMethod(special_method) |
url.GetAttribute(URL::KHTTPSpecialMethodStr) | request->GetCustomHTTPMethod() |
url.GetContextId() | request->GetContextId() |
url.GetAttribute(URL::KUnique) | request->GetLoadPolicy().GetReloadPolicy() == URL_Reload_Exclusive |
url.SetAttribute(URL::KAddHTTPHeader, header_item) | request->AddHTTPHeader(name, value) |
url.SetAttribute(URL::KDisableProcessCookies, value) | request->SetCookiesProcessingDisabled(value) |
url.SetAttribute(URL::KLimitNetType, value) | request->SetNetTypeLimit(value) |
url.SetAttribute(URL::KRequestSendTimeoutValue, value) | request->SetMaxRequestTime(value) |
url.SetAttribute(URL::KResponseReceiveIdleTimeoutValue, value) | request->SetMaxResponseIdleTime(value) |
url.SetAttribute(URL::KHTTP_Priority, value) | request->SetHTTPPriority(value) |
url.SetAttribute(URL::KHTTP_Managed_Connection, value) | request->SetExternallyManagedConnection(value) |
url.SetAttribute(URL::KHTTP_ContentType, value) | request->SetHTTPDataContentType(value) |
url.GetAttribute(URL::KHTTP_ContentType) | request->GetHTTPDataContentType() |
url.SetAttribute(URL::KHTTPUsername, value) | request->SetHTTPUsername(value) |
url.SetAttribute(URL::KHTTPPassword, value) | request->SetHTTPPassword(value) |
url.SetAttribute(URL::KUseGenericAuthenticationHandling, TRUE) | request->UseGenericAuthenticationHandling() |
url.SetAttribute(URL::KOverrideRedirectDisabled, value) | request->SetOverrideRedirectDisabled(value) |
url.SetAttribute(URL::KSpecialRedirectRestriction, value) | request->SetLimitedRequestProcessing(value) |
server_name->SetConnectionNumRestricted(TRUE) | request->SetParallelConnectionsDisabled() |
url.GetAttribute(URL::KReferrerURL) | request->GetReferrerURL() |
url.SetAttribute(URL::KHTTPRangeStart, position) | request->SetRangeStart(position) |
url.SetAttribute(URL::KHTTPRangeEnd, position) | request->SetRangeEnd(position) |
url.SetHTTP_Data(data, TRUE, includes_headers) | request->SetHTTPData(data, [includes_headers]) |
url.SetHTTP_Data(data, new_data) | request->SetHTTPData(data, new_data) |
url.SetAttribute(URL::KHTTP_ContentUsageIndication, value) | request->SetHTTPContentUsageIndication(value) |
url.GetAttribute(URL::KHTTP_ContentUsageIndication) | request->GetHTTPContentUsageIndication() |
url.SetAttribute(URL::KFollowCORSRedirectRules, value) | request->SetFollowCORSRedirectRules(value) |
url.SetAttribute(URL::KCertificateRequested, value) | request->SetCertificateRequested(value) |
url.SetAttribute(URL::KDisableCompress, value) | request->SetDisableCompress(alue) |
url.LoadDocument(message_handler, referrer_url, load_policy) | request->GetLoadPolicy().Set... request->SendRequest() |
url.ResumeLoad(message_handler, referrer_url, load_policy) | request->GetLoadPolicy().SetReloadPolicy(URL_Resume) request->SendRequest() |
url.SetAttribute(URL::KPauseDownload, TRUE) | request->Pause() |
url.SetAttribute(URL::KPauseDownload, FALSE) | request->Continue() |
case MSG_HEADER_LOADED | OnResponseAvailable(request, response) |
case MSG_URL_DATA_LOADED | OnResponseDataLoaded(request, response) |
case MSG_URL_MOVED | OnRequestRedirected(request, response, from_url, to_url) |
case MSG_LOADING_FAILED | OnRequestFailed(request, response, locale_string)) |
case MSG_URL_LOADING_FINISHED | OnResponseFinished(request, response) |
case MSG_MULTIPART_RELOAD | OnResponseMultipartBodyLoaded(request, response, multipart_callback) |

## OpResponse class

NOTE! All attributes of OpResponse are for that specific response, as if the parameter URL::KNoRedirect was used on all calls to url.GetAttribute(). However, the OpResponse retrieved from OpRequest and in callbacks always refer to the latest redirected-to url, unless you start to navigate the redirects using request->GetFirstResponse(), response->GetRedirectedToResponse() and response->GetRedirectedFromResponse().

Old call | New call | Note
url.CopyAllHeadersL(header_list_copy) | response->CopyAllHeadersL(eader_list_copy) |
url.GetAttribute(URL::KContentType) | response->GetContentType() |
url.GetAttribute(URL::KOriginalContentType) | response->GetOriginalContentType() |
url.GetAttribute(URL::KMIME_Type) | response->GetMIMEType() |
url.GetAttribute(URL::KOriginalMIME_Type) | response->GetOriginalMIMEType() |
url.GetAttribute(URL::KMIME_Type_Was_NULL) | response->GetMIMETypeUnknown() |
url.GetAttribute(URL::KCacheInUse) | response->IsCacheInUse() |
url.GetAttribute(URL::KCachePersistent) | response->IsCachePersistent() |
url.GetAttribute(URL::KCachePolicy_NoStore) | response->HasCachePolicyNoStore() |
url.GetAttribute(URL::KCachePolicy_AlwaysVerify) | response->HasCachePolicyAlwaysVerify() |
url.GetAttribute(URL::KCachePolicy_MustRevalidate) | response->HasCachePolicyMustRevalidate() |
url.GetAttribute(URL::KVLastModified, last_modified) | response->GetLastModified() |
url.GetAttribute(URL::KHTTP_Refresh_Interval) | response->GetHTTPRefreshInterval() |
url.GetAttribute(URL::KAutodetectCharSet) | response->GetAutodetectCharSet() |
url.GetAttribute(URL::KVLocalTimeVisited, time_visited) | response->GetLocalTimeVisited() |
url.GetAttribute(URL::KVHTTP_ExpirationDate, expiration_date) | response->GetHTTPExpirationDate() |
url.GetAttribute(URL::KHTTPContentLocationURL) | response->GetHTTPContentLocationURL() |
url.GetAttribute(URL::KHTTP_EntityTag) | response->GetHTTPEntityTag() |
url.GetAttribute(URL::KFermented) | !response->IsFresh() |
url.GetAttribute(URL::KSecurityStatus) | response->GetSecurityStatus() |
url.GetAttribute(URL::KSecurityLowStatusReason) | response->GetSecurityLowReason() |
url.GetAttribute(URL::KSecurityText, value) | response->GetSecurityText(value) |
url.GetAttribute(URL::KSecurityInformationURL) | response->GetSecurityInformationURL() |
url.SetAttribute(URL::KCacheTypeStreamCache, value) | response->SetCacheTypeStreamCache(value) |
url.GetAttribute(URL::KUntrustedContent) | response->IsUntrustedContent() |
url.GetAttribute(URL::KUseProxy) | response->WasProxyUsed() |
url.GetAttribute(URL::KHTTP_Response_Code) | response->GetHTTPResponseCode() |
url.GetAttribute(URL::KHTTP_Upload_TotalBytes, value) | response->GetHTTPUploadTotalBytes() |
url.GetAttribute(URL::KIsDirectoryListing) | response->IsDirectoryListing() |
value.Set(header_name); url.GetAttribute(URL::KHTTPSpecificResponseHeaderL, value) | response->GetHeader(value, header_name) | Doesn't LEAVE
url.GetAttribute(URL::KHTTPLinkRelations, relation) | response->GetHTTPLinkRelations(relation) |
url.GetAttribute(URL::KHTTP_LastModified) | response->GetHTTPLastModified() |
url.GetAttribute(URL::KHTTPRefreshUrlName) | response->GetHTTPRefreshUrlName() |
url.GetAttribute(URL::KHTTP_Location) | response->GetHTTPLocation() |
url.GetAttribute(URL::KHTTPResponseText) | response->GetHTTPResponseText() |
url.GetAttribute(URL::KHTTPAllResponseHeadersL) | response->GetHTTPAllResponseHeaders(value) | Doesn't LEAVE
url.GetAttribute(URL::KContentLoaded_Update, value) | response->GetLoadedContentSize() |
url.GetAttribute(URL::KContentSize, value) | response->GetContentSize() |
url.GetAttribute(URL::KSuggestedFileName_L, value) | response->GetSuggestedFileName(value) | Doesn't LEAVE
url.GetAttribute(URL::KSuggestedFileNameExtension_L, value) | response->GetSuggestedFileNameExtension(value) |
url.GetAttribute(URL::KIsGenerated) | response->IsGenerated() |
url.GetAttribute(URL::KIsGeneratedByOpera) | response->IsGeneratedByOpera() |
url.GetAttribute(URL::KDrmSeparateDeliveryTimeout) | response->GetDrmSeparateDeliveryTimeout() |
url.GetAttribute(URL::KRequestedCertificate, NULL) | response->GetRequestedCertificate() |
url.GetAttribute(URL::KTurboTransferredBytes, value) | response->GetTurboTransferredBytes() |
url.GetAttribute(URL::KTurboOriginalTransferredBytes, value) | response->GetTurboOriginalTransferredBytes() |
url.GetAttribute(URL::KTurboBypassed) | response->IsTurboBypassed() |
url.GetAttribute(URL::KTurboCompressed) | response->IsTurboCompressed() |
url.GetAttribute(URL::KUsedContentDispositionAttachment) | response->IsContentDispositionAttachment() |
url.GetAttribute(URL::KMovedToURL) | response->GetRedirectedToResponse() |

## OpResource class

Old call | New call | Note
url.QuickLoad(guess_content_type) | OpResource::QuickLoad(resource, url, guess_content_type) |
url.GetAttribute(URL::KCacheType) | resource->GetCacheType() |
url.GetAttribute(URL::KResumeSupported) | resource->GetResumeSupported() |
url.SetAttribute(URL::KVLocalTimeLoaded, value) | resource->SetLocalTimeLoaded(value) |
url.GetAttribute(URL::KVLocalTimeLoaded, value) | resource->GetLocalTimeLoaded() |
url.GetAttribute(URL::KStorageId) | resource->GetResourceId() |
url.GetContextId() | resource->GetContextId() |
url.SetAttribute(URL::KHTTPPragma, value) | resource->SetHTTPPragma(value) |
url.SetAttribute(URL::KHTTPCacheControl, value) | resource->SetHTTPCacheControl(value) |
url.SetAttribute(URL::KHTTPExpires, value) | resource->SetHTTPExpires(value) |
url.SetAttribute(URL::KHTTP_EntityTag, value) | resource->SetHTTPEntityTag(value) |
url.Access(FALSE) | resource->SetAccessed() |
url.PrepareForViewing(URL::KNoRedirect, [get_raw_char_data],[get_decoded_data], [force_to_file]) | resource->PrepareForViewing([mode], [force_to_file]) |
url.GetAttribute(URL::KFilePathName_L, value) | resource->GetCacheFileFullName(value) | Doesn't LEAVE
url.GetAttribute(URL::KFileName, value) | resource->GetCacheFileBaseName(value) |
dd = url.GetDescriptor(mh, URL::KNoRedirect, [get_raw_data], [get_decoded_data], [window], [override_content_type], [override_charset_id], [get_original_content], [parent_charset_id]) | resource->GetDataDescriptor(dd, [mode], [override_content_type], [override_charset_id], [get_original_content]) |
url.SetAttribute(URL::KTrustRating, value) | resource->SetTrustRating(value) |
url.GetAttribute(URL::KTrustRating) | resource->GetTrustRating() |
url.CreateAssociatedFile(type) | resource->CreateAssociatedFile(type) |
url.OpenAssociatedFile(type) | resource->OpenAssociatedFile(type) |
url.IsExportAllowed() | resource->IsDownloadComplete() |
url.LoadToFile(file_name) | resource->SaveAsFile(file_name, listener, delete_if_error) |
url.ExportAsFileAsync(file_name, listener, 0, delete_if_error) | resource->SaveAsFile(file_name, listener, delete_if_error) |
url.ExportAsFile(file_name) | resource->SaveAsFile(file_name, listener, delete_if_error) |
url.GetSortedCoverage(segments) | resource->GetBufferedRanges(segments) |

## OpDataDescriptor class

Most fifo/streaming methods have been taken over by the OpData parameter to RetrieveData. Otherwise the API is not changed much from the old URL_DataDescriptor class. Differences:

Old call | New call | Note
dd->RetrieveDataL(more) | dd->RetrieveData(dst, retrieve_limit) | Doesn't LEAVE
dd->FinishedLoading() | dd->IsFinished() |

## OpServerName class

This API is not changed much from the old ServerName class. Differences:

Old call | New call | Note
sn->AddUrlL(url, id) | sn->AddTrustRatingUrl(url, id) | Doesn't LEAVE
sn->FindUrl(url) | sn->FindTrustRatingUrl(url) |
sn->AddRegExpL(regexp) | sn->AddTrustRatingRegExp(regexp) | Doesn't LEAVE
sn->GetFirstRegExpItem() | sn->GetFirstTrustRatingRegExp() |

## OpGeneratedResponse class

Old call | New call | Note
url.SetAttribute(URL::KIsGeneratedByOpera, value) | response->SetGeneratedByOpera(value) |
url.SetAttribute(URL::KCachePolicy_NoStore, value) | response->SetCachePolicyNoStore(value) |
url.SetAttribute(URL::KCachePolicy_AlwaysVerify, value) | response->SetCachePolicyAlwaysVerify(value) |
url.SetAttribute(URL::KCachePolicy_MustRevalidate, value) | response->SetCachePolicyMustRevalidate(value) |
url.SetAttribute(URL::KMIME_ForceContentType, value) | response->ForceMIMEContentType(value) |
url.SetAttribute(URL::KHTTPFrameOptions, value) | response->SetHTTPFrameOptions(value) |
url.WriteDocumentDataUniSprintf(format_str, ...) | response->WriteDocumentDataUniSprintf(format_str, ...) |
url.WriteDocumentImage(ctype, data, size) | response->WriteDocumentImage(ctype, data, size) |
url.WriteDocumentData(conversion, data, [len]) | response->WriteDocumentData(conversion, data_str, [len] |
url.WriteDocumentData(conversion, dd, [len]) | response->WriteDocumentData(conversion, dd, [len]) |
url.WriteDocumentDataFinished() | response->WriteDocumentDataFinished() |
url.GetAttribute(URL::KBodyCommentString, value) | response->GetBodyCommentString(value) |
url.SetAttribute(URL::KBodyCommentString, value) | response->SetBodyCommentString(value) |
url.SetAttribute(URL::KBigAttachmentIcons, value) | response->SetBigAttachmentIcons(value) |
url.SetAttribute(URL::KPreferPlaintext, value) | response->SetPreferPlaintext(value) |
url.SetAttribute(URL::KIgnoreWarnings, value) | response->SetIgnoreWarnings(value) |

## Network class

Old call | New call | Note
url.SetAttribute(URL::KIsFollowed, TRUE) | Network::SetVisited(url, context_id) |
url.GetAttribute(URL::KIsFollowed) | Network::IsVisited(url, context_id) |
g_url_api->GetServerName(name_str, [create])) | Network::GetServerName(name_str, callback, [create]) |
::ResolveUrlNameL(name_in_str, resolved_out_str, [entered_by_user]) | Network::ResolveUrlNameL(name_in_str, resolved_out_str, [entered_by_user]) |
urlManager->GetCookiesL(url_rep, version, max_version, already_have_password, already_have_authentication, have_password, have_authentication, [context_id]) | Network::GetCookiesL(url, cookies, already_have_password, already_have_authentication, have_password, have_authentication) |
urlManager->HandleSingleCookieL(url_rep, cookiearg, request, 0, context_id, NULL) | Network::HandleSingleCookieL(url, cookiearg, request) |
urlManager->CreateCookieDomain(domain_name) | Network::CreateCookieDomain(domain_name) |
urlManager->SetCookie(cookie_item) | Network::SetCookie(cookie_item) |
urlManager->BuildCookieEditorListL() | Network::BuildCookieEditorListL() |
url.PrefetchDNS() | Network::PrefetchDNS(url) |
g_url_api->PurgeData(visited_links, disk_cache, sensitive, session_cookies, cookies, certificates, memory_cache) | Network::PurgeData(visited_links, disk_cache, sensitive, session_cookies, cookies, certificates, emory_cache) |
g_url_api->SaveDataL(visited_links, disk_cache, cookies) | Network::SaveDataL(visited_links, disk_cache, ookies) |
urlManager->CheckTimeOuts() | Network::CheckTimeOuts() |
urlManager->CleanUp([ignore_downloads]) | Network::CleanUp([ignore_downloads]) |
urlManager->RestartAllConnections() | Network::RestartAllConnections() |
urlManager->StopAllLoadingURLs() | Network::StopAllLoadingURLs() |
urlManager->CloseAllConnections() | Network::CloseAllConnections() |
g_url_api->IsNetworkAvailable() | Network::IsNetworkAvailable() |
urlManager->SetPauseStartLoading(val) | Network::SetPauseStartLoading(val) |
g_url_api->RegisterUrlScheme(scheme_name, have_servername, real_type, actual_servername_flag) | Network::RegisterUrlScheme(scheme_name, [have_servername], [real_type], [actual_servername_flag]) |