ReactOS 0.4.15-dev-8348-gc1b9bb5
nsio.c File Reference
#include "mshtml_private.h"
Include dependency graph for nsio.c:

Go to the source code of this file.

Classes

struct  nsWineURI
 
struct  start_binding_task_t
 
struct  nsProtocolHandler
 

Macros

#define NS_IOSERVICE_CLASSNAME   "nsIOService"
 
#define NS_IOSERVICE_CONTRACTID   "@mozilla.org/network/io-service;1"
 
#define X(f)   case f: return #f
 

Functions

static BOOL ensure_uri (nsWineURI *This)
 
IUrinsuri_get_uri (nsWineURI *nsuri)
 
IUriget_uri_nofrag (IUri *uri)
 
static BOOL compare_ignoring_frag (IUri *uri1, IUri *uri2)
 
static HRESULT combine_url (IUri *base_uri, const WCHAR *rel_url, IUri **ret)
 
static nsresult create_nsuri (IUri *, HTMLOuterWindow *, NSContainer *, const char *, nsWineURI **)
 
static const chardebugstr_nsacstr (const nsACString *nsstr)
 
static nsresult return_wstr_nsacstr (nsACString *ret_str, const WCHAR *str, int len)
 
HRESULT nsuri_to_url (LPCWSTR nsuri, BOOL ret_empty, BSTR *ret)
 
static BOOL exec_shldocvw_67 (HTMLDocumentObj *doc, BSTR url)
 
static nsresult before_async_open (nsChannel *channel, NSContainer *container, BOOL *cancel)
 
HRESULT load_nsuri (HTMLOuterWindow *window, nsWineURI *uri, nsIInputStream *post_stream, nsChannelBSC *channelbsc, DWORD flags)
 
static void set_uri_nscontainer (nsWineURI *This, NSContainer *nscontainer)
 
static void set_uri_window (nsWineURI *This, HTMLOuterWindow *window)
 
static BOOL is_http_channel (nsChannel *This)
 
static http_header_tfind_http_header (struct list *headers, const WCHAR *name, int len)
 
static nsresult get_channel_http_header (struct list *headers, const nsACString *header_name_str, nsACString *_retval)
 
HRESULT set_http_header (struct list *headers, const WCHAR *name, int name_len, const WCHAR *value, int value_len)
 
static nsresult set_channel_http_header (struct list *headers, const nsACString *name_str, const nsACString *value_str)
 
static nsresult visit_http_headers (struct list *headers, nsIHttpHeaderVisitor *visitor)
 
static void free_http_headers (struct list *list)
 
static nsChannelimpl_from_nsIHttpChannel (nsIHttpChannel *iface)
 
static nsresult NSAPI nsChannel_QueryInterface (nsIHttpChannel *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsChannel_AddRef (nsIHttpChannel *iface)
 
static nsrefcnt NSAPI nsChannel_Release (nsIHttpChannel *iface)
 
static nsresult NSAPI nsChannel_GetName (nsIHttpChannel *iface, nsACString *aName)
 
static nsresult NSAPI nsChannel_IsPending (nsIHttpChannel *iface, cpp_bool *_retval)
 
static nsresult NSAPI nsChannel_GetStatus (nsIHttpChannel *iface, nsresult *aStatus)
 
static nsresult NSAPI nsChannel_Cancel (nsIHttpChannel *iface, nsresult aStatus)
 
static nsresult NSAPI nsChannel_Suspend (nsIHttpChannel *iface)
 
static nsresult NSAPI nsChannel_Resume (nsIHttpChannel *iface)
 
static nsresult NSAPI nsChannel_GetLoadGroup (nsIHttpChannel *iface, nsILoadGroup **aLoadGroup)
 
static nsresult NSAPI nsChannel_SetLoadGroup (nsIHttpChannel *iface, nsILoadGroup *aLoadGroup)
 
static nsresult NSAPI nsChannel_GetLoadFlags (nsIHttpChannel *iface, nsLoadFlags *aLoadFlags)
 
static nsresult NSAPI nsChannel_SetLoadFlags (nsIHttpChannel *iface, nsLoadFlags aLoadFlags)
 
static nsresult NSAPI nsChannel_GetOriginalURI (nsIHttpChannel *iface, nsIURI **aOriginalURI)
 
static nsresult NSAPI nsChannel_SetOriginalURI (nsIHttpChannel *iface, nsIURI *aOriginalURI)
 
static nsresult NSAPI nsChannel_GetURI (nsIHttpChannel *iface, nsIURI **aURI)
 
static nsresult NSAPI nsChannel_GetOwner (nsIHttpChannel *iface, nsISupports **aOwner)
 
static nsresult NSAPI nsChannel_SetOwner (nsIHttpChannel *iface, nsISupports *aOwner)
 
static nsresult NSAPI nsChannel_GetNotificationCallbacks (nsIHttpChannel *iface, nsIInterfaceRequestor **aNotificationCallbacks)
 
static nsresult NSAPI nsChannel_SetNotificationCallbacks (nsIHttpChannel *iface, nsIInterfaceRequestor *aNotificationCallbacks)
 
static nsresult NSAPI nsChannel_GetSecurityInfo (nsIHttpChannel *iface, nsISupports **aSecurityInfo)
 
static nsresult NSAPI nsChannel_GetContentType (nsIHttpChannel *iface, nsACString *aContentType)
 
static nsresult NSAPI nsChannel_SetContentType (nsIHttpChannel *iface, const nsACString *aContentType)
 
static nsresult NSAPI nsChannel_GetContentCharset (nsIHttpChannel *iface, nsACString *aContentCharset)
 
static nsresult NSAPI nsChannel_SetContentCharset (nsIHttpChannel *iface, const nsACString *aContentCharset)
 
static nsresult NSAPI nsChannel_GetContentLength (nsIHttpChannel *iface, INT64 *aContentLength)
 
static nsresult NSAPI nsChannel_SetContentLength (nsIHttpChannel *iface, INT64 aContentLength)
 
static nsresult NSAPI nsChannel_Open (nsIHttpChannel *iface, nsIInputStream **_retval)
 
static HTMLOuterWindowget_window_from_load_group (nsChannel *This)
 
static HTMLOuterWindowget_channel_window (nsChannel *This)
 
static void start_binding_proc (task_t *_task)
 
static void start_binding_task_destr (task_t *_task)
 
static nsresult async_open (nsChannel *This, HTMLOuterWindow *window, BOOL is_doc_channel, nsIStreamListener *listener, nsISupports *context)
 
static nsresult NSAPI nsChannel_AsyncOpen (nsIHttpChannel *iface, nsIStreamListener *aListener, nsISupports *aContext)
 
static nsresult NSAPI nsChannel_GetContentDisposition (nsIHttpChannel *iface, UINT32 *aContentDisposition)
 
static nsresult NSAPI nsChannel_SetContentDisposition (nsIHttpChannel *iface, UINT32 aContentDisposition)
 
static nsresult NSAPI nsChannel_GetContentDispositionFilename (nsIHttpChannel *iface, nsAString *aContentDispositionFilename)
 
static nsresult NSAPI nsChannel_SetContentDispositionFilename (nsIHttpChannel *iface, const nsAString *aContentDispositionFilename)
 
static nsresult NSAPI nsChannel_GetContentDispositionHeader (nsIHttpChannel *iface, nsACString *aContentDispositionHeader)
 
static nsresult NSAPI nsChannel_GetLoadInfo (nsIHttpChannel *iface, nsILoadInfo **aLoadInfo)
 
static nsresult NSAPI nsChannel_SetLoadInfo (nsIHttpChannel *iface, nsILoadInfo *aLoadInfo)
 
static nsresult NSAPI nsChannel_GetRequestMethod (nsIHttpChannel *iface, nsACString *aRequestMethod)
 
static nsresult NSAPI nsChannel_SetRequestMethod (nsIHttpChannel *iface, const nsACString *aRequestMethod)
 
static nsresult NSAPI nsChannel_GetReferrer (nsIHttpChannel *iface, nsIURI **aReferrer)
 
static nsresult NSAPI nsChannel_SetReferrer (nsIHttpChannel *iface, nsIURI *aReferrer)
 
static nsresult NSAPI nsChannel_GetReferrerPolicy (nsIHttpChannel *iface, UINT32 *aReferrerPolicy)
 
static nsresult NSAPI nsChannel_SetReferrerWithPolicy (nsIHttpChannel *iface, nsIURI *aReferrer, UINT32 aReferrerPolicy)
 
static nsresult NSAPI nsChannel_GetRequestHeader (nsIHttpChannel *iface, const nsACString *aHeader, nsACString *_retval)
 
static nsresult NSAPI nsChannel_SetRequestHeader (nsIHttpChannel *iface, const nsACString *aHeader, const nsACString *aValue, cpp_bool aMerge)
 
static nsresult NSAPI nsChannel_VisitRequestHeaders (nsIHttpChannel *iface, nsIHttpHeaderVisitor *aVisitor)
 
static nsresult NSAPI nsChannel_GetAllowPipelining (nsIHttpChannel *iface, cpp_bool *aAllowPipelining)
 
static nsresult NSAPI nsChannel_SetAllowPipelining (nsIHttpChannel *iface, cpp_bool aAllowPipelining)
 
static nsresult NSAPI nsChannel_GetAllowTLS (nsIHttpChannel *iface, cpp_bool *aAllowTLS)
 
static nsresult NSAPI nsChannel_SetAllowTLS (nsIHttpChannel *iface, cpp_bool aAllowTLS)
 
static nsresult NSAPI nsChannel_GetRedirectionLimit (nsIHttpChannel *iface, UINT32 *aRedirectionLimit)
 
static nsresult NSAPI nsChannel_SetRedirectionLimit (nsIHttpChannel *iface, UINT32 aRedirectionLimit)
 
static nsresult NSAPI nsChannel_GetResponseStatus (nsIHttpChannel *iface, UINT32 *aResponseStatus)
 
static nsresult NSAPI nsChannel_GetResponseStatusText (nsIHttpChannel *iface, nsACString *aResponseStatusText)
 
static nsresult NSAPI nsChannel_GetRequestSucceeded (nsIHttpChannel *iface, cpp_bool *aRequestSucceeded)
 
static nsresult NSAPI nsChannel_GetResponseHeader (nsIHttpChannel *iface, const nsACString *header, nsACString *_retval)
 
static nsresult NSAPI nsChannel_SetResponseHeader (nsIHttpChannel *iface, const nsACString *header, const nsACString *value, cpp_bool merge)
 
static nsresult NSAPI nsChannel_VisitResponseHeaders (nsIHttpChannel *iface, nsIHttpHeaderVisitor *aVisitor)
 
static nsresult NSAPI nsChannel_IsNoStoreResponse (nsIHttpChannel *iface, cpp_bool *_retval)
 
static nsresult NSAPI nsChannel_IsNoCacheResponse (nsIHttpChannel *iface, cpp_bool *_retval)
 
static nsresult NSAPI nsChannel_IsPrivateResponse (nsIHttpChannel *iface, cpp_bool *_retval)
 
static nsresult NSAPI nsChannel_RedirectTo (nsIHttpChannel *iface, nsIURI *aNewURI)
 
static nsChannelimpl_from_nsIUploadChannel (nsIUploadChannel *iface)
 
static nsresult NSAPI nsUploadChannel_QueryInterface (nsIUploadChannel *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsUploadChannel_AddRef (nsIUploadChannel *iface)
 
static nsrefcnt NSAPI nsUploadChannel_Release (nsIUploadChannel *iface)
 
static nsresult NSAPI nsUploadChannel_SetUploadStream (nsIUploadChannel *iface, nsIInputStream *aStream, const nsACString *aContentType, INT64 aContentLength)
 
static nsresult NSAPI nsUploadChannel_GetUploadStream (nsIUploadChannel *iface, nsIInputStream **aUploadStream)
 
static nsChannelimpl_from_nsIHttpChannelInternal (nsIHttpChannelInternal *iface)
 
static nsresult NSAPI nsHttpChannelInternal_QueryInterface (nsIHttpChannelInternal *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsHttpChannelInternal_AddRef (nsIHttpChannelInternal *iface)
 
static nsrefcnt NSAPI nsHttpChannelInternal_Release (nsIHttpChannelInternal *iface)
 
static nsresult NSAPI nsHttpChannelInternal_GetDocumentURI (nsIHttpChannelInternal *iface, nsIURI **aDocumentURI)
 
static nsresult NSAPI nsHttpChannelInternal_SetDocumentURI (nsIHttpChannelInternal *iface, nsIURI *aDocumentURI)
 
static nsresult NSAPI nsHttpChannelInternal_GetRequestVersion (nsIHttpChannelInternal *iface, UINT32 *major, UINT32 *minor)
 
static nsresult NSAPI nsHttpChannelInternal_GetResponseVersion (nsIHttpChannelInternal *iface, UINT32 *major, UINT32 *minor)
 
static nsresult NSAPI nsHttpChannelInternal_TakeAllSecurityMessages (nsIHttpChannelInternal *iface, void *aMessages)
 
static nsresult NSAPI nsHttpChannelInternal_SetCookie (nsIHttpChannelInternal *iface, const char *aCookieHeader)
 
static nsresult NSAPI nsHttpChannelInternal_SetupFallbackChannel (nsIHttpChannelInternal *iface, const char *aFallbackKey)
 
static nsresult NSAPI nsHttpChannelInternal_GetForceAllowThirdPartyCookie (nsIHttpChannelInternal *iface, cpp_bool *aForceThirdPartyCookie)
 
static nsresult NSAPI nsHttpChannelInternal_SetForceAllowThirdPartyCookie (nsIHttpChannelInternal *iface, cpp_bool aForceThirdPartyCookie)
 
static nsresult NSAPI nsHttpChannelInternal_GetCanceled (nsIHttpChannelInternal *iface, cpp_bool *aCanceled)
 
static nsresult NSAPI nsHttpChannelInternal_GetChannelIsForDownload (nsIHttpChannelInternal *iface, cpp_bool *aCanceled)
 
static nsresult NSAPI nsHttpChannelInternal_SetChannelIsForDownload (nsIHttpChannelInternal *iface, cpp_bool aCanceled)
 
static nsresult NSAPI nsHttpChannelInternal_GetLocalAddress (nsIHttpChannelInternal *iface, nsACString *aLocalAddress)
 
static nsresult NSAPI nsHttpChannelInternal_GetLocalPort (nsIHttpChannelInternal *iface, LONG *aLocalPort)
 
static nsresult NSAPI nsHttpChannelInternal_GetRemoteAddress (nsIHttpChannelInternal *iface, nsACString *aRemoteAddress)
 
static nsresult NSAPI nsHttpChannelInternal_GetRemotePort (nsIHttpChannelInternal *iface, LONG *aRemotePort)
 
static nsresult NSAPI nsHttpChannelInternal_SetCacheKeysRedirectChain (nsIHttpChannelInternal *iface, void *cacheKeys)
 
static nsresult NSAPI nsHttpChannelInternal_HTTPUpgrade (nsIHttpChannelInternal *iface, const nsACString *aProtocolName, nsIHttpUpgradeListener *aListener)
 
static nsresult NSAPI nsHttpChannelInternal_GetAllowSpdy (nsIHttpChannelInternal *iface, cpp_bool *aAllowSpdy)
 
static nsresult NSAPI nsHttpChannelInternal_SetAllowSpdy (nsIHttpChannelInternal *iface, cpp_bool aAllowSpdy)
 
static nsresult NSAPI nsHttpChannelInternal_GetResponseTimeoutEnabled (nsIHttpChannelInternal *iface, cpp_bool *aResponseTimeoutEnabled)
 
static nsresult NSAPI nsHttpChannelInternal_SetResponseTimeoutEnabled (nsIHttpChannelInternal *iface, cpp_bool aResponseTimeoutEnabled)
 
static nsresult NSAPI nsHttpChannelInternal_GetApiRedirectToURI (nsIHttpChannelInternal *iface, nsIURI **aApiRedirectToURI)
 
static nsresult NSAPI nsHttpChannelInternal_GetAllowAltSvc (nsIHttpChannelInternal *iface, cpp_bool *aAllowAltSvc)
 
static nsresult NSAPI nsHttpChannelInternal_SetAllowAltSvc (nsIHttpChannelInternal *iface, cpp_bool aAllowAltSvc)
 
static nsresult NSAPI nsHttpChannelInternal_AddRedirect (nsIHttpChannelInternal *iface, nsIPrincipal *aPrincipal)
 
static nsresult NSAPI nsHttpChannelInternal_GetLastModifiedTime (nsIHttpChannelInternal *iface, PRTime *aLastModifiedTime)
 
static nsresult NSAPI nsHttpChannelInternal_ForceNoIntercept (nsIHttpChannelInternal *iface)
 
static nsresult NSAPI nsHttpChannelInternal_GetCorsIncludeCredentials (nsIHttpChannelInternal *iface, cpp_bool *aCorsIncludeCredentials)
 
static nsresult NSAPI nsHttpChannelInternal_SetCorsIncludeCredentials (nsIHttpChannelInternal *iface, cpp_bool aCorsIncludeCredentials)
 
static nsresult NSAPI nsHttpChannelInternal_GetCorsMode (nsIHttpChannelInternal *iface, UINT32 *aCorsMode)
 
static nsresult NSAPI nsHttpChannelInternal_SetCorsMode (nsIHttpChannelInternal *iface, UINT32 aCorsMode)
 
static nsresult NSAPI nsHttpChannelInternal_GetTopWindowURI (nsIHttpChannelInternal *iface, nsIURI **aTopWindowURI)
 
static nsresult NSAPI nsHttpChannelInternal_GetNetworkInterfaceId (nsIHttpChannelInternal *iface, nsACString *aNetworkInterfaceId)
 
static nsresult NSAPI nsHttpChannelInternal_SetNetworkInterfaceId (nsIHttpChannelInternal *iface, const nsACString *aNetworkInterfaceId)
 
static nsresult NSAPI nsHttpChannelInternal_ContinueBeginConnect (nsIHttpChannelInternal *iface)
 
static nsresult NSAPI nsHttpChannelInternal_GetProxyURI (nsIHttpChannelInternal *iface, nsIURI **aProxyURI)
 
static void invalidate_uri (nsWineURI *This)
 
static BOOL ensure_uri_builder (nsWineURI *This)
 
static nsresult get_uri_string (nsWineURI *This, Uri_PROPERTY prop, nsACString *ret)
 
static nsWineURIimpl_from_nsIFileURL (nsIFileURL *iface)
 
static nsresult NSAPI nsURI_QueryInterface (nsIFileURL *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsURI_AddRef (nsIFileURL *iface)
 
static nsrefcnt NSAPI nsURI_Release (nsIFileURL *iface)
 
static nsresult NSAPI nsURI_GetSpec (nsIFileURL *iface, nsACString *aSpec)
 
static nsresult NSAPI nsURI_SetSpec (nsIFileURL *iface, const nsACString *aSpec)
 
static nsresult NSAPI nsURI_GetPrePath (nsIFileURL *iface, nsACString *aPrePath)
 
static nsresult NSAPI nsURI_GetScheme (nsIFileURL *iface, nsACString *aScheme)
 
static nsresult NSAPI nsURI_SetScheme (nsIFileURL *iface, const nsACString *aScheme)
 
static nsresult NSAPI nsURI_GetUserPass (nsIFileURL *iface, nsACString *aUserPass)
 
static nsresult NSAPI nsURI_SetUserPass (nsIFileURL *iface, const nsACString *aUserPass)
 
static nsresult NSAPI nsURI_GetUsername (nsIFileURL *iface, nsACString *aUsername)
 
static nsresult NSAPI nsURI_SetUsername (nsIFileURL *iface, const nsACString *aUsername)
 
static nsresult NSAPI nsURI_GetPassword (nsIFileURL *iface, nsACString *aPassword)
 
static nsresult NSAPI nsURI_SetPassword (nsIFileURL *iface, const nsACString *aPassword)
 
static nsresult NSAPI nsURI_GetHostPort (nsIFileURL *iface, nsACString *aHostPort)
 
static nsresult NSAPI nsURI_SetHostPort (nsIFileURL *iface, const nsACString *aHostPort)
 
static nsresult NSAPI nsURI_GetHost (nsIFileURL *iface, nsACString *aHost)
 
static nsresult NSAPI nsURI_SetHost (nsIFileURL *iface, const nsACString *aHost)
 
static nsresult NSAPI nsURI_GetPort (nsIFileURL *iface, LONG *aPort)
 
static nsresult NSAPI nsURI_SetPort (nsIFileURL *iface, LONG aPort)
 
static nsresult NSAPI nsURI_GetPath (nsIFileURL *iface, nsACString *aPath)
 
static nsresult NSAPI nsURI_SetPath (nsIFileURL *iface, const nsACString *aPath)
 
static nsresult NSAPI nsURI_Equals (nsIFileURL *iface, nsIURI *other, cpp_bool *_retval)
 
static nsresult NSAPI nsURI_SchemeIs (nsIFileURL *iface, const char *scheme, cpp_bool *_retval)
 
static nsresult NSAPI nsURI_Clone (nsIFileURL *iface, nsIURI **_retval)
 
static nsresult NSAPI nsURI_Resolve (nsIFileURL *iface, const nsACString *aRelativePath, nsACString *_retval)
 
static nsresult NSAPI nsURI_GetAsciiSpec (nsIFileURL *iface, nsACString *aAsciiSpec)
 
static nsresult NSAPI nsURI_GetAsciiHost (nsIFileURL *iface, nsACString *aAsciiHost)
 
static nsresult NSAPI nsURI_GetOriginCharset (nsIFileURL *iface, nsACString *aOriginCharset)
 
static nsresult NSAPI nsURL_GetRef (nsIFileURL *iface, nsACString *aRef)
 
static nsresult NSAPI nsURL_SetRef (nsIFileURL *iface, const nsACString *aRef)
 
static nsresult NSAPI nsURI_EqualsExceptRef (nsIFileURL *iface, nsIURI *other, cpp_bool *_retval)
 
static nsresult NSAPI nsURI_CloneIgnoreRef (nsIFileURL *iface, nsIURI **_retval)
 
static nsresult NSAPI nsURI_GetSpecIgnoringRef (nsIFileURL *iface, nsACString *aSpecIgnoringRef)
 
static nsresult NSAPI nsURI_GetHasRef (nsIFileURL *iface, cpp_bool *aHasRef)
 
static nsresult NSAPI nsURL_GetFilePath (nsIFileURL *iface, nsACString *aFilePath)
 
static nsresult NSAPI nsURL_SetFilePath (nsIFileURL *iface, const nsACString *aFilePath)
 
static nsresult NSAPI nsURL_GetQuery (nsIFileURL *iface, nsACString *aQuery)
 
static nsresult NSAPI nsURL_SetQuery (nsIFileURL *iface, const nsACString *aQuery)
 
static nsresult get_uri_path (nsWineURI *This, BSTR *path, const WCHAR **file, const WCHAR **ext)
 
static nsresult NSAPI nsURL_GetDirectory (nsIFileURL *iface, nsACString *aDirectory)
 
static nsresult NSAPI nsURL_SetDirectory (nsIFileURL *iface, const nsACString *aDirectory)
 
static nsresult NSAPI nsURL_GetFileName (nsIFileURL *iface, nsACString *aFileName)
 
static nsresult NSAPI nsURL_SetFileName (nsIFileURL *iface, const nsACString *aFileName)
 
static nsresult NSAPI nsURL_GetFileBaseName (nsIFileURL *iface, nsACString *aFileBaseName)
 
static nsresult NSAPI nsURL_SetFileBaseName (nsIFileURL *iface, const nsACString *aFileBaseName)
 
static nsresult NSAPI nsURL_GetFileExtension (nsIFileURL *iface, nsACString *aFileExtension)
 
static nsresult NSAPI nsURL_SetFileExtension (nsIFileURL *iface, const nsACString *aFileExtension)
 
static nsresult NSAPI nsURL_GetCommonBaseSpec (nsIFileURL *iface, nsIURI *aURIToCompare, nsACString *_retval)
 
static nsresult NSAPI nsURL_GetRelativeSpec (nsIFileURL *iface, nsIURI *aURIToCompare, nsACString *_retval)
 
static nsresult NSAPI nsFileURL_GetFile (nsIFileURL *iface, nsIFile **aFile)
 
static nsresult NSAPI nsFileURL_SetFile (nsIFileURL *iface, nsIFile *aFile)
 
static nsWineURIimpl_from_nsIStandardURL (nsIStandardURL *iface)
 
static nsresult NSAPI nsStandardURL_QueryInterface (nsIStandardURL *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsStandardURL_AddRef (nsIStandardURL *iface)
 
static nsrefcnt NSAPI nsStandardURL_Release (nsIStandardURL *iface)
 
static nsresult NSAPI nsStandardURL_GetMutable (nsIStandardURL *iface, cpp_bool *aMutable)
 
static nsresult NSAPI nsStandardURL_SetMutable (nsIStandardURL *iface, cpp_bool aMutable)
 
static nsresult NSAPI nsStandardURL_Init (nsIStandardURL *iface, UINT32 aUrlType, LONG aDefaultPort, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI)
 
HRESULT create_doc_uri (HTMLOuterWindow *window, IUri *iuri, nsWineURI **ret)
 
static nsresult create_nschannel (nsWineURI *uri, nsChannel **ret)
 
HRESULT create_redirect_nschannel (const WCHAR *url, nsChannel *orig_channel, nsChannel **ret)
 
static nsProtocolHandlerimpl_from_nsIProtocolHandler (nsIProtocolHandler *iface)
 
static nsresult NSAPI nsProtocolHandler_QueryInterface (nsIProtocolHandler *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsProtocolHandler_AddRef (nsIProtocolHandler *iface)
 
static nsrefcnt NSAPI nsProtocolHandler_Release (nsIProtocolHandler *iface)
 
static nsresult NSAPI nsProtocolHandler_GetScheme (nsIProtocolHandler *iface, nsACString *aScheme)
 
static nsresult NSAPI nsProtocolHandler_GetDefaultPort (nsIProtocolHandler *iface, LONG *aDefaultPort)
 
static nsresult NSAPI nsProtocolHandler_GetProtocolFlags (nsIProtocolHandler *iface, UINT32 *aProtocolFlags)
 
static nsresult NSAPI nsProtocolHandler_NewURI (nsIProtocolHandler *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval)
 
static nsresult NSAPI nsProtocolHandler_NewChannel2 (nsIProtocolHandler *iface, nsIURI *aURI, nsILoadInfo *aLoadInfo, nsIChannel **_retval)
 
static nsresult NSAPI nsProtocolHandler_NewChannel (nsIProtocolHandler *iface, nsIURI *aURI, nsIChannel **_retval)
 
static nsresult NSAPI nsProtocolHandler_AllowPort (nsIProtocolHandler *iface, LONG port, const char *scheme, cpp_bool *_retval)
 
static nsresult NSAPI nsIOService_QueryInterface (nsIIOService *, nsIIDRef, void **)
 
static nsrefcnt NSAPI nsIOService_AddRef (nsIIOService *iface)
 
static nsrefcnt NSAPI nsIOService_Release (nsIIOService *iface)
 
static nsresult NSAPI nsIOService_GetProtocolHandler (nsIIOService *iface, const char *aScheme, nsIProtocolHandler **_retval)
 
static nsresult NSAPI nsIOService_GetProtocolFlags (nsIIOService *iface, const char *aScheme, UINT32 *_retval)
 
static BOOL is_gecko_special_uri (const char *spec)
 
static nsresult NSAPI nsIOService_NewURI (nsIIOService *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval)
 
static nsresult NSAPI nsIOService_NewFileURI (nsIIOService *iface, nsIFile *aFile, nsIURI **_retval)
 
static nsresult new_channel_from_uri (nsIURI *uri, nsILoadInfo *load_info, nsIChannel **_retval)
 
static nsresult NSAPI nsIOService_NewChannelFromURI2 (nsIIOService *iface, nsIURI *aURI, nsIDOMNode *aLoadingNode, nsIPrincipal *aLoadingPrincipal, nsIPrincipal *aTriggeringPrincipal, UINT32 aSecurityFlags, UINT32 aContentPolicyType, nsIChannel **_retval)
 
static nsresult NSAPI nsIOService_NewChannelFromURIWithLoadInfo (nsIIOService *iface, nsIURI *aURI, nsILoadInfo *aLoadInfo, nsIChannel **_retval)
 
static nsresult NSAPI nsIOService_NewChannelFromURI (nsIIOService *iface, nsIURI *aURI, nsIChannel **_retval)
 
static nsresult NSAPI nsIOService_NewChannel2 (nsIIOService *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIDOMNode *aLoadingNode, nsIPrincipal *aLoadingPrincipal, nsIPrincipal *aTriggeringPrincipal, UINT32 aSecurityFlags, UINT32 aContentPolicyType, nsIChannel **_retval)
 
static nsresult NSAPI nsIOService_NewChannel (nsIIOService *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval)
 
static nsresult NSAPI nsIOService_GetOffline (nsIIOService *iface, cpp_bool *aOffline)
 
static nsresult NSAPI nsIOService_SetOffline (nsIIOService *iface, cpp_bool aOffline)
 
static nsresult NSAPI nsIOService_GetConnectivity (nsIIOService *iface, cpp_bool *aConnectivity)
 
static nsresult NSAPI nsIOService_SetAppOffline (nsIIOService *iface, UINT32 appId, INT32 state)
 
static nsresult NSAPI nsIOService_IsAppOffline (nsIIOService *iface, UINT32 appId, cpp_bool *_retval)
 
static nsresult NSAPI nsIOService_GetAppOfflineState (nsIIOService *iface, UINT32 appId, INT32 *_retval)
 
static nsresult NSAPI nsIOService_AllowPort (nsIIOService *iface, LONG aPort, const char *aScheme, cpp_bool *_retval)
 
static nsresult NSAPI nsIOService_ExtractScheme (nsIIOService *iface, const nsACString *urlString, nsACString *_retval)
 
static nsresult NSAPI nsNetUtil_QueryInterface (nsINetUtil *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsNetUtil_AddRef (nsINetUtil *iface)
 
static nsrefcnt NSAPI nsNetUtil_Release (nsINetUtil *iface)
 
static nsresult NSAPI nsNetUtil_ParseContentType (nsINetUtil *iface, const nsACString *aTypeHeader, nsACString *aCharset, cpp_bool *aHadCharset, nsACString *aContentType)
 
static const chardebugstr_protocol_flags (UINT32 flags)
 
static nsresult NSAPI nsNetUtil_ProtocolHasFlags (nsINetUtil *iface, nsIURI *aURI, UINT32 aFlags, cpp_bool *_retval)
 
static nsresult NSAPI nsNetUtil_URIChainHasFlags (nsINetUtil *iface, nsIURI *aURI, UINT32 aFlags, cpp_bool *_retval)
 
static nsresult NSAPI nsNetUtil_ToImmutableURI (nsINetUtil *iface, nsIURI *aURI, nsIURI **_retval)
 
static nsresult NSAPI nsNetUtil_NewSimpleNestedURI (nsINetUtil *iface, nsIURI *aURI, nsIURI **_retval)
 
static nsresult NSAPI nsNetUtil_EscapeString (nsINetUtil *iface, const nsACString *aString, UINT32 aEscapeType, nsACString *_retval)
 
static nsresult NSAPI nsNetUtil_EscapeURL (nsINetUtil *iface, const nsACString *aStr, UINT32 aFlags, nsACString *_retval)
 
static nsresult NSAPI nsNetUtil_UnescapeString (nsINetUtil *iface, const nsACString *aStr, UINT32 aFlags, nsACString *_retval)
 
static nsresult NSAPI nsNetUtil_ExtractCharsetFromContentType (nsINetUtil *iface, const nsACString *aTypeHeader, nsACString *aCharset, LONG *aCharsetStart, LONG *aCharsetEnd, cpp_bool *_retval)
 
static nsresult NSAPI nsIOServiceFactory_QueryInterface (nsIFactory *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsIOServiceFactory_AddRef (nsIFactory *iface)
 
static nsrefcnt NSAPI nsIOServiceFactory_Release (nsIFactory *iface)
 
static nsresult NSAPI nsIOServiceFactory_CreateInstance (nsIFactory *iface, nsISupports *aOuter, const nsIID *iid, void **result)
 
static nsresult NSAPI nsIOServiceFactory_LockFactory (nsIFactory *iface, cpp_bool lock)
 
static BOOL translate_url (HTMLDocumentObj *doc, nsWineURI *uri)
 
nsresult on_start_uri_open (NSContainer *nscontainer, nsIURI *uri, cpp_bool *_retval)
 
void init_nsio (nsIComponentManager *component_manager, nsIComponentRegistrar *registrar)
 
void release_nsio (void)
 

Variables

static const IID NS_IOSERVICE_CID
 
static const IID IID_nsWineURI
 
static nsIIOServicensio = NULL
 
static nsINetUtilnet_util
 
static const charrequest_method_strings [] = {"GET", "PUT", "POST"}
 
static const nsIHttpChannelVtbl nsChannelVtbl
 
static const nsIUploadChannelVtbl nsUploadChannelVtbl
 
static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl
 
static const nsIFileURLVtbl nsFileURLVtbl
 
static const nsIStandardURLVtbl nsStandardURLVtbl
 
static const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl
 
static const nsIIOServiceVtbl nsIOServiceVtbl
 
static nsIIOService nsIOService = { &nsIOServiceVtbl }
 
static const nsINetUtilVtbl nsNetUtilVtbl
 
static nsINetUtil nsNetUtil = { &nsNetUtilVtbl }
 
static const nsIFactoryVtbl nsIOServiceFactoryVtbl
 
static nsIFactory nsIOServiceFactory = { &nsIOServiceFactoryVtbl }
 

Macro Definition Documentation

◆ NS_IOSERVICE_CLASSNAME

#define NS_IOSERVICE_CLASSNAME   "nsIOService"

Definition at line 21 of file nsio.c.

◆ NS_IOSERVICE_CONTRACTID

#define NS_IOSERVICE_CONTRACTID   "@mozilla.org/network/io-service;1"

Definition at line 22 of file nsio.c.

◆ X

#define X (   f)    case f: return #f

Function Documentation

◆ async_open()

static nsresult async_open ( nsChannel This,
HTMLOuterWindow window,
BOOL  is_doc_channel,
nsIStreamListener listener,
nsISupports context 
)
static

Definition at line 993 of file nsio.c.

995{
996 nsChannelBSC *bscallback;
997 IMoniker *mon = NULL;
999
1000 hres = CreateURLMonikerEx2(NULL, This->uri->uri, &mon, 0);
1001 if(FAILED(hres)) {
1002 WARN("CreateURLMoniker failed: %08x\n", hres);
1003 return NS_ERROR_UNEXPECTED;
1004 }
1005
1006 if(is_doc_channel)
1008
1009 hres = create_channelbsc(mon, NULL, NULL, 0, is_doc_channel, &bscallback);
1010 IMoniker_Release(mon);
1011 if(FAILED(hres))
1012 return NS_ERROR_UNEXPECTED;
1013
1014 channelbsc_set_channel(bscallback, This, listener, context);
1015
1016 if(is_doc_channel) {
1017 hres = create_pending_window(window, bscallback);
1018 if(SUCCEEDED(hres))
1019 async_start_doc_binding(window, window->pending_window);
1020 IBindStatusCallback_Release(&bscallback->bsc.IBindStatusCallback_iface);
1021 if(FAILED(hres))
1022 return NS_ERROR_UNEXPECTED;
1023 }else {
1025
1026 task = heap_alloc(sizeof(start_binding_task_t));
1027 if(!task) {
1028 IBindStatusCallback_Release(&bscallback->bsc.IBindStatusCallback_iface);
1030 }
1031
1032 task->window = window->base.inner_window;
1033 task->bscallback = bscallback;
1034 hres = push_task(&task->header, start_binding_proc, start_binding_task_destr, window->base.inner_window->task_magic);
1035 if(FAILED(hres))
1037 }
1038
1039 return NS_OK;
1040}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define WARN(fmt,...)
Definition: precomp.h:61
#define BINDING_NAVIGATED
Definition: binding.h:127
void set_current_mon(HTMLOuterWindow *, IMoniker *, DWORD) DECLSPEC_HIDDEN
Definition: persist.c:99
void channelbsc_set_channel(nsChannelBSC *, nsChannel *, nsIStreamListener *, nsISupports *) DECLSPEC_HIDDEN
Definition: navigate.c:1839
HRESULT create_channelbsc(IMoniker *, const WCHAR *, BYTE *, DWORD, BOOL, nsChannelBSC **) DECLSPEC_HIDDEN
Definition: navigate.c:1693
#define NULL
Definition: types.h:112
HRESULT create_pending_window(HTMLOuterWindow *outer_window, nsChannelBSC *channelbsc)
Definition: htmlwindow.c:3009
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hres
Definition: protocol.c:465
static IHTMLWindow2 * window
Definition: events.c:77
#define NS_OK
HRESULT async_start_doc_binding(HTMLOuterWindow *, HTMLInnerWindow *) DECLSPEC_HIDDEN
Definition: navigate.c:1758
#define NS_ERROR_OUT_OF_MEMORY
#define NS_ERROR_UNEXPECTED
HRESULT push_task(task_t *, task_proc_t, task_proc_t, LONG) DECLSPEC_HIDDEN
Definition: task.c:39
static void start_binding_proc(task_t *_task)
Definition: nsio.c:978
static void start_binding_task_destr(task_t *_task)
Definition: nsio.c:985
IBindStatusCallback IBindStatusCallback_iface
Definition: binding.h:72
Definition: http.c:7252
BSCallback bsc
Definition: binding.h:98
nsChannelBSC * bscallback
Definition: nsio.c:975
HTMLInnerWindow * window
Definition: nsio.c:974
HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
Definition: umon.c:668

Referenced by nsChannel_AsyncOpen().

◆ before_async_open()

static nsresult before_async_open ( nsChannel channel,
NSContainer container,
BOOL cancel 
)
static

Definition at line 222 of file nsio.c.

223{
224 HTMLDocumentObj *doc = container->doc;
225 BSTR display_uri;
227
228 if(!doc->client) {
229 *cancel = TRUE;
230 return NS_OK;
231 }
232
233 hres = IUri_GetDisplayUri(channel->uri->uri, &display_uri);
234 if(FAILED(hres))
235 return NS_ERROR_FAILURE;
236
237 if(!exec_shldocvw_67(doc, display_uri)) {
238 SysFreeString(display_uri);
239 *cancel = FALSE;
240 return NS_OK;
241 }
242
243 hres = hlink_frame_navigate(&doc->basedoc, display_uri, channel, 0, cancel);
244 SysFreeString(display_uri);
245 if(FAILED(hres))
246 *cancel = TRUE;
247 return NS_OK;
248}
HRESULT hlink_frame_navigate(HTMLDocument *, LPCWSTR, nsChannel *, DWORD, BOOL *) DECLSPEC_HIDDEN
Definition: navigate.c:2193
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
OLECHAR * BSTR
Definition: compat.h:2293
#define NS_ERROR_FAILURE
static BOOL exec_shldocvw_67(HTMLDocumentObj *doc, BSTR url)
Definition: nsio.c:196
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
IOleClientSite * client
HTMLDocument basedoc
nsWineURI * uri
Definition: binding.h:43
IUri * uri
Definition: nsio.c:43

Referenced by nsChannel_AsyncOpen().

◆ combine_url()

static HRESULT combine_url ( IUri base_uri,
const WCHAR rel_url,
IUri **  ret 
)
static

Definition at line 123 of file nsio.c.

124{
125 IUri *uri_nofrag;
127
128 uri_nofrag = get_uri_nofrag(base_uri);
129 if(!uri_nofrag)
130 return E_FAIL;
131
133 ret, 0);
134 IUri_Release(uri_nofrag);
135 if(FAILED(hres))
136 WARN("CoInternetCombineUrlEx failed: %08x\n", hres);
137 return hres;
138}
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6762
const char * rel_url
Definition: protocol.c:463
IUri * get_uri_nofrag(IUri *uri)
Definition: nsio.c:77
#define URL_DONT_ESCAPE_EXTRA_INFO
Definition: shlwapi.h:1217
#define URL_ESCAPE_SPACES_ONLY
Definition: shlwapi.h:1216
int ret

Referenced by nsIOService_NewURI(), and nsURI_Resolve().

◆ compare_ignoring_frag()

static BOOL compare_ignoring_frag ( IUri uri1,
IUri uri2 
)
static

Definition at line 104 of file nsio.c.

105{
106 IUri *uri_nofrag1, *uri_nofrag2;
107 BOOL ret = FALSE;
108
109 uri_nofrag1 = get_uri_nofrag(uri1);
110 if(!uri_nofrag1)
111 return FALSE;
112
113 uri_nofrag2 = get_uri_nofrag(uri2);
114 if(uri_nofrag2) {
115 IUri_IsEqual(uri_nofrag1, uri_nofrag2, &ret);
116 IUri_Release(uri_nofrag2);
117 }
118
119 IUri_Release(uri_nofrag1);
120 return ret;
121}
unsigned int BOOL
Definition: ntddk_ex.h:94

Referenced by nsURI_EqualsExceptRef().

◆ create_doc_uri()

HRESULT create_doc_uri ( HTMLOuterWindow window,
IUri iuri,
nsWineURI **  ret 
)

Definition at line 3210 of file nsio.c.

3211{
3212 nsWineURI *uri;
3213 nsresult nsres;
3214
3215 nsres = create_nsuri(iuri, window, window->doc_obj->nscontainer, NULL, &uri);
3216 if(NS_FAILED(nsres))
3217 return E_FAIL;
3218
3219 uri->is_doc_uri = TRUE;
3220
3221 *ret = uri;
3222 return S_OK;
3223}
#define S_OK
Definition: intsafe.h:52
const char * uri
Definition: sec_mgr.c:1588
#define NS_FAILED(res)
static nsresult create_nsuri(IUri *, HTMLOuterWindow *, NSContainer *, const char *, nsWineURI **)
Definition: nsio.c:3172
Definition: nsio.c:34

Referenced by navigate_uri(), and set_moniker().

◆ create_nschannel()

static nsresult create_nschannel ( nsWineURI uri,
nsChannel **  ret 
)
static

Definition at line 3225 of file nsio.c.

3226{
3227 nsChannel *channel;
3228
3229 if(!ensure_uri(uri))
3230 return NS_ERROR_UNEXPECTED;
3231
3232 channel = heap_alloc_zero(sizeof(nsChannel));
3233 if(!channel)
3235
3236 channel->nsIHttpChannel_iface.lpVtbl = &nsChannelVtbl;
3239 channel->ref = 1;
3240 channel->request_method = METHOD_GET;
3241 list_init(&channel->response_headers);
3242 list_init(&channel->request_headers);
3243
3244 nsIFileURL_AddRef(&uri->nsIFileURL_iface);
3245 channel->uri = uri;
3246
3247 *ret = channel;
3248 return NS_OK;
3249}
static void list_init(struct list_entry *head)
Definition: list.h:51
@ METHOD_GET
Definition: binding.h:25
static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl
Definition: nsio.c:1945
static BOOL ensure_uri(nsWineURI *This)
Definition: nsio.c:51
static const nsIUploadChannelVtbl nsUploadChannelVtbl
Definition: nsio.c:1613
static const nsIHttpChannelVtbl nsChannelVtbl
Definition: nsio.c:1469
LONG ref
Definition: binding.h:41
struct list request_headers
Definition: binding.h:59
nsIUploadChannel nsIUploadChannel_iface
Definition: binding.h:38
struct list response_headers
Definition: binding.h:58
nsIHttpChannel nsIHttpChannel_iface
Definition: binding.h:37
nsIHttpChannelInternal nsIHttpChannelInternal_iface
Definition: binding.h:39
REQUEST_METHOD request_method
Definition: binding.h:57

Referenced by create_redirect_nschannel(), and new_channel_from_uri().

◆ create_nsuri()

static nsresult create_nsuri ( IUri iuri,
HTMLOuterWindow window,
NSContainer container,
const char origin_charset,
nsWineURI **  _retval 
)
static

Definition at line 3172 of file nsio.c.

3174{
3175 nsWineURI *ret;
3176 HRESULT hres;
3177
3178 ret = heap_alloc_zero(sizeof(nsWineURI));
3179 if(!ret)
3181
3182 ret->nsIFileURL_iface.lpVtbl = &nsFileURLVtbl;
3183 ret->nsIStandardURL_iface.lpVtbl = &nsStandardURLVtbl;
3184 ret->ref = 1;
3185 ret->is_mutable = TRUE;
3186
3189
3190 IUri_AddRef(iuri);
3191 ret->uri = iuri;
3192
3193 hres = IUri_GetScheme(iuri, &ret->scheme);
3194 if(FAILED(hres))
3195 ret->scheme = URL_SCHEME_UNKNOWN;
3196
3197 if(origin_charset && *origin_charset && strcmp(origin_charset, "UTF-8")) {
3198 ret->origin_charset = heap_strdupA(origin_charset);
3199 if(!ret->origin_charset) {
3200 nsIFileURL_Release(&ret->nsIFileURL_iface);
3202 }
3203 }
3204
3205 TRACE("retval=%p\n", ret);
3206 *_retval = ret;
3207 return NS_OK;
3208}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static char * heap_strdupA(const char *str)
static void set_uri_nscontainer(nsWineURI *This, NSContainer *nscontainer)
Definition: nsio.c:301
static void set_uri_window(nsWineURI *This, HTMLOuterWindow *window)
Definition: nsio.c:315
static const nsIFileURLVtbl nsFileURLVtbl
Definition: nsio.c:3057
static const nsIStandardURLVtbl nsStandardURLVtbl
Definition: nsio.c:3163
@ URL_SCHEME_UNKNOWN
Definition: shlwapi.h:1146
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by create_doc_uri(), create_redirect_nschannel(), nsIOService_NewURI(), nsURI_Clone(), and nsURI_CloneIgnoreRef().

◆ create_redirect_nschannel()

HRESULT create_redirect_nschannel ( const WCHAR url,
nsChannel orig_channel,
nsChannel **  ret 
)

Definition at line 3251 of file nsio.c.

3252{
3254 nsChannel *channel;
3255 nsWineURI *uri;
3256 IUri *iuri;
3257 nsresult nsres;
3258 HRESULT hres;
3259
3260 hres = create_uri(url, 0, &iuri);
3261 if(FAILED(hres))
3262 return hres;
3263
3264 if(orig_channel->uri->window_ref)
3265 window = orig_channel->uri->window_ref->window;
3266 nsres = create_nsuri(iuri, window, NULL, NULL, &uri);
3267 IUri_Release(iuri);
3268 if(NS_FAILED(nsres))
3269 return E_FAIL;
3270
3271 nsres = create_nschannel(uri, &channel);
3272 nsIFileURL_Release(&uri->nsIFileURL_iface);
3273 if(NS_FAILED(nsres))
3274 return E_FAIL;
3275
3276 if(orig_channel->load_group) {
3277 nsILoadGroup_AddRef(orig_channel->load_group);
3278 channel->load_group = orig_channel->load_group;
3279 }
3280
3281 if(orig_channel->notif_callback) {
3282 nsIInterfaceRequestor_AddRef(orig_channel->notif_callback);
3283 channel->notif_callback = orig_channel->notif_callback;
3284 }
3285
3286 channel->load_flags = orig_channel->load_flags | LOAD_REPLACE;
3287
3288 if(orig_channel->request_method == METHOD_POST)
3289 FIXME("unsupported POST method\n");
3290
3291 if(orig_channel->original_uri) {
3292 nsIURI_AddRef(orig_channel->original_uri);
3293 channel->original_uri = orig_channel->original_uri;
3294 }
3295
3296 if(orig_channel->referrer) {
3297 nsIURI_AddRef(orig_channel->referrer);
3298 channel->referrer = orig_channel->referrer;
3299 }
3300
3301 *ret = channel;
3302 return S_OK;
3303}
#define FIXME(fmt,...)
Definition: precomp.h:53
@ METHOD_POST
Definition: binding.h:27
HRESULT create_uri(const WCHAR *, DWORD, IUri **) DECLSPEC_HIDDEN
Definition: persist.c:158
static const WCHAR url[]
Definition: encode.c:1432
static nsresult create_nschannel(nsWineURI *uri, nsChannel **ret)
Definition: nsio.c:3225
nsIInterfaceRequestor * notif_callback
Definition: binding.h:47
nsILoadGroup * load_group
Definition: binding.h:46
nsIURI * original_uri
Definition: binding.h:51
nsLoadFlags load_flags
Definition: binding.h:50
nsIURI * referrer
Definition: binding.h:52
windowref_t * window_ref
Definition: nsio.c:41
HTMLOuterWindow * window

Referenced by handle_redirect().

◆ debugstr_nsacstr()

◆ debugstr_protocol_flags()

static const char * debugstr_protocol_flags ( UINT32  flags)
static

Definition at line 3804 of file nsio.c.

3805{
3806 switch(flags) {
3807#define X(f) case f: return #f
3808 X(URI_STD);
3809 X(URI_NORELATIVE);
3810 X(URI_NOAUTH);
3811 X(ALLOWS_PROXY);
3812 X(ALLOWS_PROXY_HTTP);
3813 X(URI_INHERITS_SECURITY_CONTEXT);
3814 X(URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT);
3815 X(URI_LOADABLE_BY_ANYONE);
3816 X(URI_DANGEROUS_TO_LOAD);
3817 X(URI_IS_UI_RESOURCE);
3818 X(URI_IS_LOCAL_FILE);
3819 X(URI_LOADABLE_BY_SUBSUMERS);
3820 X(URI_DOES_NOT_RETURN_DATA);
3821 X(URI_IS_LOCAL_RESOURCE);
3822 X(URI_OPENING_EXECUTES_SCRIPT);
3823 X(URI_NON_PERSISTABLE);
3824 X(URI_FORBIDS_COOKIE_ACCESS);
3825 X(URI_CROSS_ORIGIN_NEEDS_WEBAPPS_PERM);
3826 X(URI_SYNC_LOAD_IS_OK);
3827 X(URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT);
3828#undef X
3829 default:
3830 return wine_dbg_sprintf("%08x", flags);
3831 }
3832}
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
GLbitfield flags
Definition: glext.h:7161
#define X(f)

Referenced by nsNetUtil_ProtocolHasFlags(), and nsNetUtil_URIChainHasFlags().

◆ ensure_uri()

static BOOL ensure_uri ( nsWineURI This)
static

Definition at line 51 of file nsio.c.

52{
54
55 assert(This->uri || This->uri_builder);
56
57 if(!This->uri) {
58 hres = IUriBuilder_CreateUriSimple(This->uri_builder, 0, 0, &This->uri);
59 if(FAILED(hres)) {
60 WARN("CreateUriSimple failed: %08x\n", hres);
61 return FALSE;
62 }
63 }
64
65 return TRUE;
66}
#define assert(x)
Definition: debug.h:53

Referenced by create_nschannel(), ensure_uri_builder(), get_uri_path(), get_uri_string(), nsChannel_AsyncOpen(), nsIOService_NewURI(), nsURI_Clone(), nsURI_CloneIgnoreRef(), nsURI_Equals(), nsURI_EqualsExceptRef(), nsuri_get_uri(), nsURI_GetHasRef(), nsURI_GetHostPort(), nsURI_GetPort(), nsURI_GetPrePath(), nsURI_GetScheme(), nsURI_GetUserPass(), nsURI_Resolve(), nsURI_SchemeIs(), nsURL_GetQuery(), nsURL_GetRef(), and translate_url().

◆ ensure_uri_builder()

static BOOL ensure_uri_builder ( nsWineURI This)
static

Definition at line 1997 of file nsio.c.

1998{
1999 if(!This->is_mutable) {
2000 WARN("Not mutable URI\n");
2001 return FALSE;
2002 }
2003
2004 if(!This->uri_builder) {
2005 HRESULT hres;
2006
2007 if(!ensure_uri(This))
2008 return FALSE;
2009
2010 hres = CreateIUriBuilder(This->uri, 0, 0, &This->uri_builder);
2011 if(FAILED(hres)) {
2012 WARN("CreateIUriBuilder failed: %08x\n", hres);
2013 return FALSE;
2014 }
2015 }
2016
2018 return TRUE;
2019}
HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
Definition: uri.c:6353
static void invalidate_uri(nsWineURI *This)
Definition: nsio.c:1989

Referenced by nsURI_SetHost(), nsURI_SetPassword(), nsURI_SetPath(), nsURI_SetPort(), nsURI_SetScheme(), nsURI_SetUsername(), nsURI_SetUserPass(), nsURL_SetQuery(), and nsURL_SetRef().

◆ exec_shldocvw_67()

static BOOL exec_shldocvw_67 ( HTMLDocumentObj doc,
BSTR  url 
)
static

Definition at line 196 of file nsio.c.

197{
198 IOleCommandTarget *cmdtrg = NULL;
200
201 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
202 if(SUCCEEDED(hres)) {
203 VARIANT varUrl, varRes;
204
205 V_VT(&varUrl) = VT_BSTR;
206 V_BSTR(&varUrl) = url;
207 V_VT(&varRes) = VT_BOOL;
208
209 hres = IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 67, 0, &varUrl, &varRes);
210
211 IOleCommandTarget_Release(cmdtrg);
212
213 if(SUCCEEDED(hres) && !V_BOOL(&varRes)) {
214 TRACE("got VARIANT_FALSE, do not load\n");
215 return FALSE;
216 }
217 }
218
219 return TRUE;
220}
@ VT_BSTR
Definition: compat.h:2303
@ VT_BOOL
Definition: compat.h:2306
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226

Referenced by before_async_open().

◆ find_http_header()

static http_header_t * find_http_header ( struct list headers,
const WCHAR name,
int  len 
)
static

Definition at line 340 of file nsio.c.

341{
342 http_header_t *iter;
343
345 if(!strncmpiW(iter->header, name, len) && !iter->header[len])
346 return iter;
347 }
348
349 return NULL;
350}
GLenum GLsizei len
Definition: glext.h:6722
uint32_t entry
Definition: isohybrid.c:63
#define strncmpiW(s1, s2, n)
Definition: unicode.h:46
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
vector< Header * > headers
Definition: sdkparse.cpp:39
WCHAR * header
Definition: binding.h:123
Definition: name.c:39

Referenced by get_channel_http_header(), nsChannel_IsNoStoreResponse(), and set_http_header().

◆ free_http_headers()

static void free_http_headers ( struct list list)
static

Definition at line 475 of file nsio.c.

476{
477 http_header_t *iter, *iter_next;
478
480 list_remove(&iter->entry);
481 heap_free(iter->header);
482 heap_free(iter->data);
483 heap_free(iter);
484 }
485}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
static void list_remove(struct list_entry *entry)
Definition: list.h:90
Definition: list.h:37
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct list entry
Definition: binding.h:122
WCHAR * data
Definition: binding.h:124

Referenced by nsChannel_Release().

◆ get_channel_http_header()

static nsresult get_channel_http_header ( struct list headers,
const nsACString header_name_str,
nsACString _retval 
)
static

Definition at line 352 of file nsio.c.

354{
355 const char *header_namea;
358 char *data;
359
360 nsACString_GetData(header_name_str, &header_namea);
361 header_name = heap_strdupAtoW(header_namea);
362 if(!header_name)
363 return NS_ERROR_UNEXPECTED;
364
367 if(!header)
369
370 data = heap_strdupWtoA(header->data);
371 if(!data)
372 return NS_ERROR_UNEXPECTED;
373
374 TRACE("%s -> %s\n", debugstr_a(header_namea), debugstr_a(data));
375 nsACString_SetData(_retval, data);
377 return NS_OK;
378}
static char * heap_strdupWtoA(const WCHAR *str)
static WCHAR * heap_strdupAtoW(const char *str)
Definition: appwiz.h:81
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802
#define NS_ERROR_NOT_AVAILABLE
static http_header_t * find_http_header(struct list *headers, const WCHAR *name, int len)
Definition: nsio.c:340
#define strlenW(s)
Definition: unicode.h:34
char * header_name
Definition: widl.c:136
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by nsChannel_GetRequestHeader(), and nsChannel_GetResponseHeader().

◆ get_channel_window()

static HTMLOuterWindow * get_channel_window ( nsChannel This)
static

Definition at line 922 of file nsio.c.

923{
924 nsIWebProgress *web_progress;
925 nsIDOMWindow *nswindow;
927 nsresult nsres;
928
929 if(This->load_group) {
930 nsIRequestObserver *req_observer;
931
932 nsres = nsILoadGroup_GetGroupObserver(This->load_group, &req_observer);
933 if(NS_FAILED(nsres) || !req_observer) {
934 ERR("GetGroupObserver failed: %08x\n", nsres);
935 return NULL;
936 }
937
938 nsres = nsIRequestObserver_QueryInterface(req_observer, &IID_nsIWebProgress, (void**)&web_progress);
939 nsIRequestObserver_Release(req_observer);
940 if(NS_FAILED(nsres)) {
941 ERR("Could not get nsIWebProgress iface: %08x\n", nsres);
942 return NULL;
943 }
944 }else if(This->notif_callback) {
945 nsres = nsIInterfaceRequestor_GetInterface(This->notif_callback, &IID_nsIWebProgress, (void**)&web_progress);
946 if(NS_FAILED(nsres)) {
947 ERR("GetInterface(IID_nsIWebProgress failed: %08x\n", nsres);
948 return NULL;
949 }
950 }else {
951 ERR("no load group nor notif callback\n");
952 return NULL;
953 }
954
955 nsres = nsIWebProgress_GetDOMWindow(web_progress, &nswindow);
956 nsIWebProgress_Release(web_progress);
957 if(NS_FAILED(nsres) || !nswindow) {
958 ERR("GetDOMWindow failed: %08x\n", nsres);
959 return NULL;
960 }
961
962 window = nswindow_to_window(nswindow);
963 nsIDOMWindow_Release(nswindow);
964
965 if(window)
966 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
967 else
968 FIXME("NULL window for %p\n", nswindow);
969 return window;
970}
#define ERR(fmt,...)
Definition: precomp.h:57
HTMLOuterWindow * nswindow_to_window(const nsIDOMWindow *nswindow)
Definition: htmlwindow.c:3099

Referenced by nsChannel_AsyncOpen().

◆ get_uri_nofrag()

IUri * get_uri_nofrag ( IUri uri)

Definition at line 77 of file nsio.c.

78{
79 IUriBuilder *uri_builder;
80 IUri *ret;
81 BOOL b;
83
84 hres = IUri_HasProperty(uri, Uri_PROPERTY_FRAGMENT, &b);
85 if(SUCCEEDED(hres) && !b) {
86 IUri_AddRef(uri);
87 return uri;
88 }
89
90 hres = CreateIUriBuilder(uri, 0, 0, &uri_builder);
91 if(FAILED(hres))
92 return NULL;
93
94 hres = IUriBuilder_RemoveProperties(uri_builder, Uri_HAS_FRAGMENT);
95 if(SUCCEEDED(hres))
96 hres = IUriBuilder_CreateUriSimple(uri_builder, 0, 0, &ret);
97 IUriBuilder_Release(uri_builder);
98 if(FAILED(hres))
99 return NULL;
100
101 return ret;
102}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define b
Definition: ke_i.h:79

Referenced by combine_url(), compare_ignoring_frag(), nsURI_CloneIgnoreRef(), set_current_uri(), and super_navigate().

◆ get_uri_path()

static nsresult get_uri_path ( nsWineURI This,
BSTR path,
const WCHAR **  file,
const WCHAR **  ext 
)
static

Definition at line 2897 of file nsio.c.

2898{
2899 const WCHAR *ptr;
2900 HRESULT hres;
2901
2902 if(!ensure_uri(This))
2903 return NS_ERROR_UNEXPECTED;
2904
2905 hres = IUri_GetPath(This->uri, path);
2906 if(FAILED(hres))
2907 return NS_ERROR_FAILURE;
2908
2909 for(ptr = *path + SysStringLen(*path)-1; ptr > *path && *ptr != '/' && *ptr != '\\'; ptr--);
2910 if(*ptr == '/' || *ptr == '\\')
2911 ptr++;
2912 *file = ptr;
2913
2914 if(ext) {
2915 ptr = strrchrW(ptr, '.');
2916 if(!ptr)
2917 ptr = *path + SysStringLen(*path);
2918 *ext = ptr;
2919 }
2920
2921 return NS_OK;
2922}
static const WCHAR *const ext[]
Definition: module.c:53
static PVOID ptr
Definition: dispmode.c:27
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
#define strrchrW(s, c)
Definition: unicode.h:41
Definition: fci.c:127

Referenced by nsURL_GetDirectory(), nsURL_GetFileBaseName(), and nsURL_GetFileName().

◆ get_uri_string()

static nsresult get_uri_string ( nsWineURI This,
Uri_PROPERTY  prop,
nsACString ret 
)
static

Definition at line 2021 of file nsio.c.

2022{
2023 char *vala;
2024 BSTR val;
2025 HRESULT hres;
2026
2027 if(!ensure_uri(This))
2028 return NS_ERROR_UNEXPECTED;
2029
2030 hres = IUri_GetPropertyBSTR(This->uri, prop, &val, 0);
2031 if(FAILED(hres)) {
2032 WARN("GetPropertyBSTR failed: %08x\n", hres);
2033 return NS_ERROR_UNEXPECTED;
2034 }
2035
2036 vala = heap_strdupWtoU(val);
2038 if(!vala)
2040
2041 TRACE("ret %s\n", debugstr_a(vala));
2042 nsACString_SetData(ret, vala);
2043 heap_free(vala);
2044 return NS_OK;
2045}
GLuint GLfloat * val
Definition: glext.h:7180
static char * heap_strdupWtoU(const WCHAR *str)

Referenced by nsURI_GetAsciiHost(), nsURI_GetHost(), nsURI_GetPassword(), nsURI_GetPath(), nsURI_GetScheme(), nsURI_GetSpec(), nsURI_GetUsername(), and nsURL_GetFileExtension().

◆ get_window_from_load_group()

static HTMLOuterWindow * get_window_from_load_group ( nsChannel This)
static

Definition at line 875 of file nsio.c.

876{
878 nsIChannel *channel;
879 nsIRequest *req;
880 nsWineURI *wine_uri;
881 nsIURI *uri;
882 nsresult nsres;
883
884 nsres = nsILoadGroup_GetDefaultLoadRequest(This->load_group, &req);
885 if(NS_FAILED(nsres)) {
886 ERR("GetDefaultLoadRequest failed: %08x\n", nsres);
887 return NULL;
888 }
889
890 if(!req)
891 return NULL;
892
893 nsres = nsIRequest_QueryInterface(req, &IID_nsIChannel, (void**)&channel);
894 nsIRequest_Release(req);
895 if(NS_FAILED(nsres)) {
896 WARN("Could not get nsIChannel interface: %08x\n", nsres);
897 return NULL;
898 }
899
900 nsres = nsIChannel_GetURI(channel, &uri);
901 nsIChannel_Release(channel);
902 if(NS_FAILED(nsres)) {
903 ERR("GetURI failed: %08x\n", nsres);
904 return NULL;
905 }
906
907 nsres = nsIURI_QueryInterface(uri, &IID_nsWineURI, (void**)&wine_uri);
908 nsIURI_Release(uri);
909 if(NS_FAILED(nsres)) {
910 TRACE("Could not get nsWineURI: %08x\n", nsres);
911 return NULL;
912 }
913
914 window = wine_uri->window_ref ? wine_uri->window_ref->window : NULL;
915 if(window)
916 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
917 nsIFileURL_Release(&wine_uri->nsIFileURL_iface);
918
919 return window;
920}
static const IID IID_nsWineURI
Definition: nsio.c:26
nsIFileURL nsIFileURL_iface
Definition: nsio.c:35

Referenced by nsChannel_AsyncOpen().

◆ impl_from_nsIFileURL()

◆ impl_from_nsIHttpChannel()

static nsChannel * impl_from_nsIHttpChannel ( nsIHttpChannel iface)
inlinestatic

Definition at line 487 of file nsio.c.

488{
489 return CONTAINING_RECORD(iface, nsChannel, nsIHttpChannel_iface);
490}

Referenced by nsChannel_AddRef(), nsChannel_AsyncOpen(), nsChannel_Cancel(), nsChannel_GetAllowPipelining(), nsChannel_GetAllowTLS(), nsChannel_GetContentCharset(), nsChannel_GetContentDisposition(), nsChannel_GetContentDispositionFilename(), nsChannel_GetContentDispositionHeader(), nsChannel_GetContentLength(), nsChannel_GetContentType(), nsChannel_GetLoadFlags(), nsChannel_GetLoadGroup(), nsChannel_GetLoadInfo(), nsChannel_GetName(), nsChannel_GetNotificationCallbacks(), nsChannel_GetOriginalURI(), nsChannel_GetOwner(), nsChannel_GetRedirectionLimit(), nsChannel_GetReferrer(), nsChannel_GetReferrerPolicy(), nsChannel_GetRequestHeader(), nsChannel_GetRequestMethod(), nsChannel_GetRequestSucceeded(), nsChannel_GetResponseHeader(), nsChannel_GetResponseStatus(), nsChannel_GetResponseStatusText(), nsChannel_GetSecurityInfo(), nsChannel_GetStatus(), nsChannel_GetURI(), nsChannel_IsNoCacheResponse(), nsChannel_IsNoStoreResponse(), nsChannel_IsPending(), nsChannel_IsPrivateResponse(), nsChannel_Open(), nsChannel_QueryInterface(), nsChannel_RedirectTo(), nsChannel_Release(), nsChannel_Resume(), nsChannel_SetAllowPipelining(), nsChannel_SetAllowTLS(), nsChannel_SetContentCharset(), nsChannel_SetContentDisposition(), nsChannel_SetContentDispositionFilename(), nsChannel_SetContentLength(), nsChannel_SetContentType(), nsChannel_SetLoadFlags(), nsChannel_SetLoadGroup(), nsChannel_SetLoadInfo(), nsChannel_SetNotificationCallbacks(), nsChannel_SetOriginalURI(), nsChannel_SetOwner(), nsChannel_SetRedirectionLimit(), nsChannel_SetReferrer(), nsChannel_SetReferrerWithPolicy(), nsChannel_SetRequestHeader(), nsChannel_SetRequestMethod(), nsChannel_SetResponseHeader(), nsChannel_Suspend(), nsChannel_VisitRequestHeaders(), and nsChannel_VisitResponseHeaders().

◆ impl_from_nsIHttpChannelInternal()

static nsChannel * impl_from_nsIHttpChannelInternal ( nsIHttpChannelInternal iface)
inlinestatic

Definition at line 1621 of file nsio.c.

1622{
1623 return CONTAINING_RECORD(iface, nsChannel, nsIHttpChannelInternal_iface);
1624}

Referenced by nsHttpChannelInternal_AddRedirect(), nsHttpChannelInternal_AddRef(), nsHttpChannelInternal_ContinueBeginConnect(), nsHttpChannelInternal_ForceNoIntercept(), nsHttpChannelInternal_GetAllowAltSvc(), nsHttpChannelInternal_GetAllowSpdy(), nsHttpChannelInternal_GetApiRedirectToURI(), nsHttpChannelInternal_GetCanceled(), nsHttpChannelInternal_GetChannelIsForDownload(), nsHttpChannelInternal_GetCorsIncludeCredentials(), nsHttpChannelInternal_GetCorsMode(), nsHttpChannelInternal_GetDocumentURI(), nsHttpChannelInternal_GetForceAllowThirdPartyCookie(), nsHttpChannelInternal_GetLastModifiedTime(), nsHttpChannelInternal_GetLocalAddress(), nsHttpChannelInternal_GetLocalPort(), nsHttpChannelInternal_GetNetworkInterfaceId(), nsHttpChannelInternal_GetProxyURI(), nsHttpChannelInternal_GetRemoteAddress(), nsHttpChannelInternal_GetRemotePort(), nsHttpChannelInternal_GetRequestVersion(), nsHttpChannelInternal_GetResponseTimeoutEnabled(), nsHttpChannelInternal_GetResponseVersion(), nsHttpChannelInternal_GetTopWindowURI(), nsHttpChannelInternal_HTTPUpgrade(), nsHttpChannelInternal_QueryInterface(), nsHttpChannelInternal_Release(), nsHttpChannelInternal_SetAllowAltSvc(), nsHttpChannelInternal_SetAllowSpdy(), nsHttpChannelInternal_SetCacheKeysRedirectChain(), nsHttpChannelInternal_SetChannelIsForDownload(), nsHttpChannelInternal_SetCookie(), nsHttpChannelInternal_SetCorsIncludeCredentials(), nsHttpChannelInternal_SetCorsMode(), nsHttpChannelInternal_SetDocumentURI(), nsHttpChannelInternal_SetForceAllowThirdPartyCookie(), nsHttpChannelInternal_SetNetworkInterfaceId(), nsHttpChannelInternal_SetResponseTimeoutEnabled(), nsHttpChannelInternal_SetupFallbackChannel(), and nsHttpChannelInternal_TakeAllSecurityMessages().

◆ impl_from_nsIProtocolHandler()

◆ impl_from_nsIStandardURL()

static nsWineURI * impl_from_nsIStandardURL ( nsIStandardURL iface)
inlinestatic

◆ impl_from_nsIUploadChannel()

static nsChannel * impl_from_nsIUploadChannel ( nsIUploadChannel iface)
inlinestatic

◆ init_nsio()

void init_nsio ( nsIComponentManager component_manager,
nsIComponentRegistrar registrar 
)

Definition at line 4048 of file nsio.c.

4049{
4050 nsIFactory *old_factory = NULL;
4051 nsresult nsres;
4052
4053 nsres = nsIComponentManager_GetClassObject(component_manager, &NS_IOSERVICE_CID,
4054 &IID_nsIFactory, (void**)&old_factory);
4055 if(NS_FAILED(nsres)) {
4056 ERR("Could not get factory: %08x\n", nsres);
4057 return;
4058 }
4059
4060 nsres = nsIFactory_CreateInstance(old_factory, NULL, &IID_nsIIOService, (void**)&nsio);
4061 if(NS_FAILED(nsres)) {
4062 ERR("Couldn not create nsIOService instance %08x\n", nsres);
4063 nsIFactory_Release(old_factory);
4064 return;
4065 }
4066
4067 nsres = nsIIOService_QueryInterface(nsio, &IID_nsINetUtil, (void**)&net_util);
4068 if(NS_FAILED(nsres)) {
4069 WARN("Could not get nsINetUtil interface: %08x\n", nsres);
4070 nsIIOService_Release(nsio);
4071 return;
4072 }
4073
4074 nsres = nsIComponentRegistrar_UnregisterFactory(registrar, &NS_IOSERVICE_CID, old_factory);
4075 nsIFactory_Release(old_factory);
4076 if(NS_FAILED(nsres))
4077 ERR("UnregisterFactory failed: %08x\n", nsres);
4078
4079 nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_IOSERVICE_CID,
4081 if(NS_FAILED(nsres))
4082 ERR("RegisterFactory failed: %08x\n", nsres);
4083}
static const IID NS_IOSERVICE_CID
Definition: nsio.c:24
#define NS_IOSERVICE_CLASSNAME
Definition: nsio.c:21
static nsIFactory nsIOServiceFactory
Definition: nsio.c:3990
static nsIIOService * nsio
Definition: nsio.c:29
#define NS_IOSERVICE_CONTRACTID
Definition: nsio.c:22
static nsINetUtil * net_util
Definition: nsio.c:30

Referenced by init_xpcom().

◆ invalidate_uri()

static void invalidate_uri ( nsWineURI This)
static

Definition at line 1989 of file nsio.c.

1990{
1991 if(This->uri) {
1992 IUri_Release(This->uri);
1993 This->uri = NULL;
1994 }
1995}

Referenced by ensure_uri_builder(), and nsURI_SetSpec().

◆ is_gecko_special_uri()

static BOOL is_gecko_special_uri ( const char spec)
static

Definition at line 3525 of file nsio.c.

3526{
3527 static const char *special_schemes[] = {"chrome:", "data:", "jar:", "moz-safe-about", "resource:", "javascript:", "wyciwyg:"};
3528 unsigned int i;
3529
3530 for(i=0; i < sizeof(special_schemes)/sizeof(*special_schemes); i++) {
3531 if(!strncasecmp(spec, special_schemes[i], strlen(special_schemes[i])))
3532 return TRUE;
3533 }
3534
3535 if(!strncasecmp(spec, "file:", 5)) {
3536 const char *ptr = spec+5;
3537 while(*ptr == '/')
3538 ptr++;
3539 return is_gecko_path(ptr);
3540 }
3541
3542 return FALSE;
3543}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define strncasecmp
Definition: fake.h:10
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
BOOL is_gecko_path(const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:1108

Referenced by nsIOService_NewURI().

◆ is_http_channel()

static BOOL is_http_channel ( nsChannel This)
inlinestatic

Definition at line 335 of file nsio.c.

336{
337 return This->uri->scheme == URL_SCHEME_HTTP || This->uri->scheme == URL_SCHEME_HTTPS;
338}
@ URL_SCHEME_HTTPS
Definition: shlwapi.h:1157
@ URL_SCHEME_HTTP
Definition: shlwapi.h:1148

Referenced by nsChannel_QueryInterface().

◆ load_nsuri()

HRESULT load_nsuri ( HTMLOuterWindow window,
nsWineURI uri,
nsIInputStream post_stream,
nsChannelBSC channelbsc,
DWORD  flags 
)

Definition at line 250 of file nsio.c.

252{
253 nsIDocShellLoadInfo *load_info = NULL;
254 nsIWebNavigation *web_navigation;
255 nsIDocShell *doc_shell;
256 HTMLDocumentNode *doc;
257 nsresult nsres;
258
259 nsres = get_nsinterface((nsISupports*)window->nswindow, &IID_nsIWebNavigation, (void**)&web_navigation);
260 if(NS_FAILED(nsres)) {
261 ERR("Could not get nsIWebNavigation interface: %08x\n", nsres);
262 return E_FAIL;
263 }
264
265 nsres = nsIWebNavigation_QueryInterface(web_navigation, &IID_nsIDocShell, (void**)&doc_shell);
266 nsIWebNavigation_Release(web_navigation);
267 if(NS_FAILED(nsres)) {
268 ERR("Could not get nsIDocShell: %08x\n", nsres);
269 return E_FAIL;
270 }
271
272 if(post_stream) {
273 nsres = nsIDocShell_CreateLoadInfo(doc_shell, &load_info);
274 if(NS_FAILED(nsres)) {
275 nsIDocShell_Release(doc_shell);
276 return E_FAIL;
277 }
278
279 nsres = nsIDocShellLoadInfo_SetPostDataStream(load_info, post_stream);
280 assert(nsres == NS_OK);
281 }
282
283 uri->channel_bsc = channelbsc;
284 doc = window->base.inner_window->doc;
286 nsres = nsIDocShell_LoadURI(doc_shell, (nsIURI*)&uri->nsIFileURL_iface, load_info, flags, FALSE);
287 if(doc == window->base.inner_window->doc)
289 uri->channel_bsc = NULL;
290 nsIDocShell_Release(doc_shell);
291 if(load_info)
292 nsIDocShellLoadInfo_Release(load_info);
293 if(NS_FAILED(nsres)) {
294 WARN("LoadURI failed: %08x\n", nsres);
295 return E_FAIL;
296 }
297
298 return S_OK;
299}
nsresult get_nsinterface(nsISupports *, REFIID, void **) DECLSPEC_HIDDEN
Definition: nsembed.c:907

Referenced by navigate_uri(), and set_moniker().

◆ new_channel_from_uri()

static nsresult new_channel_from_uri ( nsIURI uri,
nsILoadInfo load_info,
nsIChannel **  _retval 
)
static

Definition at line 3625 of file nsio.c.

3626{
3627 nsWineURI *wine_uri;
3628 nsChannel *ret;
3629 nsresult nsres;
3630
3631 nsres = nsIURI_QueryInterface(uri, &IID_nsWineURI, (void**)&wine_uri);
3632 if(NS_FAILED(nsres)) {
3633 TRACE("Could not get nsWineURI: %08x\n", nsres);
3634 return nsIIOService_NewChannelFromURI(nsio, uri, _retval);
3635 }
3636
3637 nsres = create_nschannel(wine_uri, &ret);
3638 nsIFileURL_Release(&wine_uri->nsIFileURL_iface);
3639 if(NS_FAILED(nsres))
3640 return nsres;
3641
3642 nsIURI_AddRef(uri);
3643 ret->original_uri = uri;
3644
3645 if(load_info)
3646 nsIHttpChannel_SetLoadInfo(&ret->nsIHttpChannel_iface, load_info);
3647
3648 *_retval = (nsIChannel*)&ret->nsIHttpChannel_iface;
3649 return NS_OK;
3650}

Referenced by nsIOService_NewChannelFromURI(), nsIOService_NewChannelFromURI2(), and nsIOService_NewChannelFromURIWithLoadInfo().

◆ nsChannel_AddRef()

static nsrefcnt NSAPI nsChannel_AddRef ( nsIHttpChannel iface)
static

Definition at line 527 of file nsio.c.

528{
531
532 TRACE("(%p) ref=%d\n", This, ref);
533
534 return ref;
535}
#define InterlockedIncrement
Definition: armddk.h:53
ULONG nsrefcnt
Definition: nsiface.idl:40
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
Definition: send.c:48

◆ nsChannel_AsyncOpen()

static nsresult NSAPI nsChannel_AsyncOpen ( nsIHttpChannel iface,
nsIStreamListener aListener,
nsISupports aContext 
)
static

Definition at line 1042 of file nsio.c.

1044{
1047 BOOL cancel = FALSE;
1048 nsresult nsres = NS_OK;
1049
1050 TRACE("(%p)->(%p %p)\n", This, aListener, aContext);
1051
1052 if(!ensure_uri(This->uri))
1053 return NS_ERROR_FAILURE;
1054
1055 if(TRACE_ON(mshtml)) {
1056 HRESULT hres;
1057 BSTR uri_str;
1058
1059 hres = IUri_GetDisplayUri(This->uri->uri, &uri_str);
1060 if(SUCCEEDED(hres)) {
1061 TRACE("opening %s\n", debugstr_w(uri_str));
1062 SysFreeString(uri_str);
1063 }else {
1064 WARN("GetDisplayUri failed: %08x\n", hres);
1065 }
1066 }
1067
1068 if(This->uri->is_doc_uri) {
1070 if(window) {
1071 set_uri_window(This->uri, window);
1072 }else if(This->uri->container) {
1073 BOOL b;
1074
1075 /* nscontainer->doc should be NULL which means navigation to a new window */
1076 if(This->uri->container->doc)
1077 FIXME("nscontainer->doc = %p\n", This->uri->container->doc);
1078
1079 nsres = before_async_open(This, This->uri->container, &b);
1080 if(NS_FAILED(nsres))
1081 return nsres;
1082 if(b)
1083 FIXME("Navigation not cancelled\n");
1084 return NS_ERROR_UNEXPECTED;
1085 }
1086 }
1087
1088 if(!window) {
1089 if(This->uri->window_ref && This->uri->window_ref->window) {
1090 window = This->uri->window_ref->window;
1091 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
1092 }else {
1093 /* FIXME: Analyze removing get_window_from_load_group call */
1094 if(This->load_group)
1096 if(!window)
1098 if(window)
1099 set_uri_window(This->uri, window);
1100 }
1101 }
1102
1103 if(!window) {
1104 ERR("window = NULL\n");
1105 return NS_ERROR_UNEXPECTED;
1106 }
1107
1108 if(This->uri->is_doc_uri && window == window->doc_obj->basedoc.window) {
1109 if(This->uri->channel_bsc) {
1110 channelbsc_set_channel(This->uri->channel_bsc, This, aListener, aContext);
1111
1112 if(window->doc_obj->mime) {
1113 heap_free(This->content_type);
1114 This->content_type = heap_strdupWtoA(window->doc_obj->mime);
1115 }
1116
1117 cancel = TRUE;
1118 }else {
1119 nsres = before_async_open(This, window->doc_obj->nscontainer, &cancel);
1120 if(NS_SUCCEEDED(nsres) && cancel) {
1121 TRACE("canceled\n");
1122 nsres = NS_BINDING_ABORTED;
1123 }
1124 }
1125 }
1126
1127 if(!cancel)
1128 nsres = async_open(This, window, This->uri->is_doc_uri, aListener, aContext);
1129
1130 if(NS_SUCCEEDED(nsres) && This->load_group) {
1131 nsres = nsILoadGroup_AddRequest(This->load_group, (nsIRequest*)&This->nsIHttpChannel_iface,
1132 aContext);
1133 if(NS_FAILED(nsres))
1134 ERR("AddRequest failed: %08x\n", nsres);
1135 }
1136
1137 IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
1138 return nsres;
1139}
#define TRACE_ON(x)
Definition: compat.h:75
#define debugstr_w
Definition: kernel32.h:32
#define NS_BINDING_ABORTED
#define NS_SUCCEEDED(res)
static nsresult before_async_open(nsChannel *channel, NSContainer *container, BOOL *cancel)
Definition: nsio.c:222
static nsresult async_open(nsChannel *This, HTMLOuterWindow *window, BOOL is_doc_channel, nsIStreamListener *listener, nsISupports *context)
Definition: nsio.c:993
static HTMLOuterWindow * get_channel_window(nsChannel *This)
Definition: nsio.c:922
static HTMLOuterWindow * get_window_from_load_group(nsChannel *This)
Definition: nsio.c:875

◆ nsChannel_Cancel()

static nsresult NSAPI nsChannel_Cancel ( nsIHttpChannel iface,
nsresult  aStatus 
)
static

Definition at line 595 of file nsio.c.

596{
598
599 FIXME("(%p)->(%08x)\n", This, aStatus);
600
602}
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsChannel_GetAllowPipelining()

static nsresult NSAPI nsChannel_GetAllowPipelining ( nsIHttpChannel iface,
cpp_bool aAllowPipelining 
)
static

Definition at line 1306 of file nsio.c.

1307{
1309
1310 FIXME("(%p)->(%p)\n", This, aAllowPipelining);
1311
1313}

◆ nsChannel_GetAllowTLS()

static nsresult NSAPI nsChannel_GetAllowTLS ( nsIHttpChannel iface,
cpp_bool aAllowTLS 
)
static

Definition at line 1324 of file nsio.c.

1325{
1327 FIXME("(%p)->(%p)\n", This, aAllowTLS);
1329}

◆ nsChannel_GetContentCharset()

static nsresult NSAPI nsChannel_GetContentCharset ( nsIHttpChannel iface,
nsACString aContentCharset 
)
static

Definition at line 813 of file nsio.c.

815{
817
818 TRACE("(%p)->(%p)\n", This, aContentCharset);
819
820 if(This->charset) {
821 nsACString_SetData(aContentCharset, This->charset);
822 return NS_OK;
823 }
824
825 nsACString_SetData(aContentCharset, "");
826 return NS_OK;
827}

◆ nsChannel_GetContentDisposition()

static nsresult NSAPI nsChannel_GetContentDisposition ( nsIHttpChannel iface,
UINT32 aContentDisposition 
)
static

Definition at line 1141 of file nsio.c.

1142{
1144 FIXME("(%p)->(%p)\n", This, aContentDisposition);
1146}

◆ nsChannel_GetContentDispositionFilename()

static nsresult NSAPI nsChannel_GetContentDispositionFilename ( nsIHttpChannel iface,
nsAString aContentDispositionFilename 
)
static

Definition at line 1155 of file nsio.c.

1156{
1158 FIXME("(%p)->(%p)\n", This, aContentDispositionFilename);
1160}

◆ nsChannel_GetContentDispositionHeader()

static nsresult NSAPI nsChannel_GetContentDispositionHeader ( nsIHttpChannel iface,
nsACString aContentDispositionHeader 
)
static

Definition at line 1169 of file nsio.c.

1170{
1172 FIXME("(%p)->(%p)\n", This, aContentDispositionHeader);
1174}

◆ nsChannel_GetContentLength()

static nsresult NSAPI nsChannel_GetContentLength ( nsIHttpChannel iface,
INT64 aContentLength 
)
static

Definition at line 848 of file nsio.c.

849{
851
852 FIXME("(%p)->(%p)\n", This, aContentLength);
853
855}

◆ nsChannel_GetContentType()

static nsresult NSAPI nsChannel_GetContentType ( nsIHttpChannel iface,
nsACString aContentType 
)
static

Definition at line 777 of file nsio.c.

778{
780
781 TRACE("(%p)->(%p)\n", This, aContentType);
782
783 if(This->content_type) {
784 nsACString_SetData(aContentType, This->content_type);
785 return S_OK;
786 }
787
788 if(This->uri->is_doc_uri) {
789 WARN("Document channel with no MIME set. Assuming text/html\n");
790 nsACString_SetData(aContentType, "text/html");
791 return S_OK;
792 }
793
794 WARN("unknown type\n");
795 return NS_ERROR_FAILURE;
796}

◆ nsChannel_GetLoadFlags()

static nsresult NSAPI nsChannel_GetLoadFlags ( nsIHttpChannel iface,
nsLoadFlags aLoadFlags 
)
static

Definition at line 650 of file nsio.c.

651{
653
654 TRACE("(%p)->(%p)\n", This, aLoadFlags);
655
656 *aLoadFlags = This->load_flags;
657 return NS_OK;
658}

◆ nsChannel_GetLoadGroup()

static nsresult NSAPI nsChannel_GetLoadGroup ( nsIHttpChannel iface,
nsILoadGroup **  aLoadGroup 
)
static

Definition at line 622 of file nsio.c.

623{
625
626 TRACE("(%p)->(%p)\n", This, aLoadGroup);
627
628 if(This->load_group)
629 nsILoadGroup_AddRef(This->load_group);
630
631 *aLoadGroup = This->load_group;
632 return NS_OK;
633}

◆ nsChannel_GetLoadInfo()

static nsresult NSAPI nsChannel_GetLoadInfo ( nsIHttpChannel iface,
nsILoadInfo **  aLoadInfo 
)
static

Definition at line 1176 of file nsio.c.

1177{
1179
1180 TRACE("(%p)->(%p)\n", This, aLoadInfo);
1181
1182 if(This->load_info)
1183 nsISupports_AddRef(This->load_info);
1184 *aLoadInfo = This->load_info;
1185 return NS_OK;
1186}

◆ nsChannel_GetName()

static nsresult NSAPI nsChannel_GetName ( nsIHttpChannel iface,
nsACString aName 
)
static

Definition at line 568 of file nsio.c.

569{
571
572 TRACE("(%p)->(%p)\n", This, aName);
573
574 return nsIFileURL_GetSpec(&This->uri->nsIFileURL_iface, aName);
575}

◆ nsChannel_GetNotificationCallbacks()

static nsresult NSAPI nsChannel_GetNotificationCallbacks ( nsIHttpChannel iface,
nsIInterfaceRequestor **  aNotificationCallbacks 
)
static

Definition at line 737 of file nsio.c.

739{
741
742 TRACE("(%p)->(%p)\n", This, aNotificationCallbacks);
743
744 if(This->notif_callback)
745 nsIInterfaceRequestor_AddRef(This->notif_callback);
746 *aNotificationCallbacks = This->notif_callback;
747
748 return NS_OK;
749}

◆ nsChannel_GetOriginalURI()

static nsresult NSAPI nsChannel_GetOriginalURI ( nsIHttpChannel iface,
nsIURI **  aOriginalURI 
)
static

Definition at line 670 of file nsio.c.

671{
673
674 TRACE("(%p)->(%p)\n", This, aOriginalURI);
675
676 if(This->original_uri)
677 nsIURI_AddRef(This->original_uri);
678
679 *aOriginalURI = This->original_uri;
680 return NS_OK;
681}

◆ nsChannel_GetOwner()

static nsresult NSAPI nsChannel_GetOwner ( nsIHttpChannel iface,
nsISupports **  aOwner 
)
static

Definition at line 709 of file nsio.c.

710{
712
713 TRACE("(%p)->(%p)\n", This, aOwner);
714
715 if(This->owner)
716 nsISupports_AddRef(This->owner);
717 *aOwner = This->owner;
718
719 return NS_OK;
720}

◆ nsChannel_GetRedirectionLimit()

static nsresult NSAPI nsChannel_GetRedirectionLimit ( nsIHttpChannel iface,
UINT32 aRedirectionLimit 
)
static

Definition at line 1338 of file nsio.c.

1339{
1341
1342 FIXME("(%p)->(%p)\n", This, aRedirectionLimit);
1343
1345}

◆ nsChannel_GetReferrer()

static nsresult NSAPI nsChannel_GetReferrer ( nsIHttpChannel iface,
nsIURI **  aReferrer 
)
static

Definition at line 1233 of file nsio.c.

1234{
1236
1237 TRACE("(%p)->(%p)\n", This, aReferrer);
1238
1239 if(This->referrer)
1240 nsIURI_AddRef(This->referrer);
1241 *aReferrer = This->referrer;
1242 return NS_OK;
1243}

◆ nsChannel_GetReferrerPolicy()

static nsresult NSAPI nsChannel_GetReferrerPolicy ( nsIHttpChannel iface,
UINT32 aReferrerPolicy 
)
static

Definition at line 1259 of file nsio.c.

1260{
1262 FIXME("(%p)->(%p)\n", This, aReferrerPolicy);
1264}

◆ nsChannel_GetRequestHeader()

static nsresult NSAPI nsChannel_GetRequestHeader ( nsIHttpChannel iface,
const nsACString aHeader,
nsACString _retval 
)
static

Definition at line 1273 of file nsio.c.

1275{
1277
1278 TRACE("(%p)->(%s %p)\n", This, debugstr_nsacstr(aHeader), _retval);
1279
1280 return get_channel_http_header(&This->request_headers, aHeader, _retval);
1281}
static nsresult get_channel_http_header(struct list *headers, const nsACString *header_name_str, nsACString *_retval)
Definition: nsio.c:352
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142

◆ nsChannel_GetRequestMethod()

static nsresult NSAPI nsChannel_GetRequestMethod ( nsIHttpChannel iface,
nsACString aRequestMethod 
)
static

Definition at line 1202 of file nsio.c.

1203{
1205
1206 TRACE("(%p)->(%p)\n", This, aRequestMethod);
1207
1208 nsACString_SetData(aRequestMethod, request_method_strings[This->request_method]);
1209 return NS_OK;
1210}
static const char * request_method_strings[]
Definition: nsio.c:32

◆ nsChannel_GetRequestSucceeded()

static nsresult NSAPI nsChannel_GetRequestSucceeded ( nsIHttpChannel iface,
cpp_bool aRequestSucceeded 
)
static

Definition at line 1382 of file nsio.c.

1384{
1386
1387 TRACE("(%p)->(%p)\n", This, aRequestSucceeded);
1388
1389 if(!This->response_status)
1391
1392 *aRequestSucceeded = This->response_status/100 == 2;
1393
1394 return NS_OK;
1395}

◆ nsChannel_GetResponseHeader()

static nsresult NSAPI nsChannel_GetResponseHeader ( nsIHttpChannel iface,
const nsACString header,
nsACString _retval 
)
static

Definition at line 1397 of file nsio.c.

1399{
1401
1402 TRACE("(%p)->(%s %p)\n", This, debugstr_nsacstr(header), _retval);
1403
1404 return get_channel_http_header(&This->response_headers, header, _retval);
1405}

◆ nsChannel_GetResponseStatus()

static nsresult NSAPI nsChannel_GetResponseStatus ( nsIHttpChannel iface,
UINT32 aResponseStatus 
)
static

Definition at line 1356 of file nsio.c.

1357{
1359
1360 TRACE("(%p)->(%p)\n", This, aResponseStatus);
1361
1362 if(This->response_status) {
1363 *aResponseStatus = This->response_status;
1364 return NS_OK;
1365 }
1366
1367 WARN("No response status\n");
1368 return NS_ERROR_UNEXPECTED;
1369}

◆ nsChannel_GetResponseStatusText()

static nsresult NSAPI nsChannel_GetResponseStatusText ( nsIHttpChannel iface,
nsACString aResponseStatusText 
)
static

Definition at line 1371 of file nsio.c.

1373{
1375
1376 TRACE("(%p)->(%p)\n", This, aResponseStatusText);
1377
1378 nsACString_SetData(aResponseStatusText, This->response_status_text);
1379 return NS_OK;
1380}

◆ nsChannel_GetSecurityInfo()

static nsresult NSAPI nsChannel_GetSecurityInfo ( nsIHttpChannel iface,
nsISupports **  aSecurityInfo 
)
static

Definition at line 768 of file nsio.c.

769{
771
772 TRACE("(%p)->(%p)\n", This, aSecurityInfo);
773
775}

◆ nsChannel_GetStatus()

static nsresult NSAPI nsChannel_GetStatus ( nsIHttpChannel iface,
nsresult aStatus 
)
static

Definition at line 586 of file nsio.c.

587{
589
590 WARN("(%p)->(%p) returning NS_OK\n", This, aStatus);
591
592 return *aStatus = NS_OK;
593}

◆ nsChannel_GetURI()

static nsresult NSAPI nsChannel_GetURI ( nsIHttpChannel iface,
nsIURI **  aURI 
)
static

Definition at line 697 of file nsio.c.

698{
700
701 TRACE("(%p)->(%p)\n", This, aURI);
702
703 nsIFileURL_AddRef(&This->uri->nsIFileURL_iface);
704 *aURI = (nsIURI*)This->uri;
705
706 return NS_OK;
707}

◆ nsChannel_IsNoCacheResponse()

static nsresult NSAPI nsChannel_IsNoCacheResponse ( nsIHttpChannel iface,
cpp_bool _retval 
)
static

Definition at line 1442 of file nsio.c.

1443{
1445
1446 FIXME("(%p)->(%p)\n", This, _retval);
1447
1449}

◆ nsChannel_IsNoStoreResponse()

static nsresult NSAPI nsChannel_IsNoStoreResponse ( nsIHttpChannel iface,
cpp_bool _retval 
)
static

Definition at line 1427 of file nsio.c.

1428{
1431
1432 static const WCHAR cache_controlW[] = {'C','a','c','h','e','-','C','o','n','t','r','o','l'};
1433 static const WCHAR no_storeW[] = {'n','o','-','s','t','o','r','e',0};
1434
1435 TRACE("(%p)->(%p)\n", This, _retval);
1436
1437 header = find_http_header(&This->response_headers, cache_controlW, sizeof(cache_controlW)/sizeof(WCHAR));
1438 *_retval = header && !strcmpiW(header->data, no_storeW);
1439 return NS_OK;
1440}
#define strcmpiW(s1, s2)
Definition: unicode.h:45

◆ nsChannel_IsPending()

static nsresult NSAPI nsChannel_IsPending ( nsIHttpChannel iface,
cpp_bool _retval 
)
static

Definition at line 577 of file nsio.c.

578{
580
581 FIXME("(%p)->(%p)\n", This, _retval);
582
584}

◆ nsChannel_IsPrivateResponse()

static nsresult NSAPI nsChannel_IsPrivateResponse ( nsIHttpChannel iface,
cpp_bool _retval 
)
static

Definition at line 1451 of file nsio.c.

1452{
1454
1455 FIXME("(%p)->(%p)\n", This, _retval);
1456
1458}

◆ nsChannel_Open()

static nsresult NSAPI nsChannel_Open ( nsIHttpChannel iface,
nsIInputStream **  _retval 
)
static

Definition at line 866 of file nsio.c.

867{
869
870 FIXME("(%p)->(%p)\n", This, _retval);
871
873}

◆ nsChannel_QueryInterface()

static nsresult NSAPI nsChannel_QueryInterface ( nsIHttpChannel iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 492 of file nsio.c.

493{
495
496 if(IsEqualGUID(&IID_nsISupports, riid)) {
497 TRACE("(%p)->(IID_nsISupports %p)\n", This, result);
498 *result = &This->nsIHttpChannel_iface;
499 }else if(IsEqualGUID(&IID_nsIRequest, riid)) {
500 TRACE("(%p)->(IID_nsIRequest %p)\n", This, result);
501 *result = &This->nsIHttpChannel_iface;
502 }else if(IsEqualGUID(&IID_nsIChannel, riid)) {
503 TRACE("(%p)->(IID_nsIChannel %p)\n", This, result);
504 *result = &This->nsIHttpChannel_iface;
505 }else if(IsEqualGUID(&IID_nsIHttpChannel, riid)) {
506 TRACE("(%p)->(IID_nsIHttpChannel %p)\n", This, result);
507 *result = is_http_channel(This) ? &This->nsIHttpChannel_iface : NULL;
508 }else if(IsEqualGUID(&IID_nsIUploadChannel, riid)) {
509 TRACE("(%p)->(IID_nsIUploadChannel %p)\n", This, result);
510 *result = &This->nsIUploadChannel_iface;
511 }else if(IsEqualGUID(&IID_nsIHttpChannelInternal, riid)) {
512 TRACE("(%p)->(IID_nsIHttpChannelInternal %p)\n", This, result);
513 *result = is_http_channel(This) ? &This->nsIHttpChannelInternal_iface : NULL;
514 }else {
515 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
516 *result = NULL;
517 }
518
519 if(*result) {
520 nsIHttpChannel_AddRef(&This->nsIHttpChannel_iface);
521 return NS_OK;
522 }
523
524 return NS_NOINTERFACE;
525}
GLuint64EXT * result
Definition: glext.h:11304
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define NS_NOINTERFACE
static BOOL is_http_channel(nsChannel *This)
Definition: nsio.c:335
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ nsChannel_RedirectTo()

static nsresult NSAPI nsChannel_RedirectTo ( nsIHttpChannel iface,
nsIURI aNewURI 
)
static

Definition at line 1460 of file nsio.c.

1461{
1463
1464 FIXME("(%p)->(%p)\n", This, aNewURI);
1465
1467}

◆ nsChannel_Release()

static nsrefcnt NSAPI nsChannel_Release ( nsIHttpChannel iface)
static

Definition at line 537 of file nsio.c.

538{
541
542 if(!ref) {
543 nsIFileURL_Release(&This->uri->nsIFileURL_iface);
544 if(This->owner)
545 nsISupports_Release(This->owner);
546 if(This->post_data_stream)
547 nsIInputStream_Release(This->post_data_stream);
548 if(This->load_group)
549 nsILoadGroup_Release(This->load_group);
550 if(This->notif_callback)
551 nsIInterfaceRequestor_Release(This->notif_callback);
552 if(This->original_uri)
553 nsIURI_Release(This->original_uri);
554 if(This->referrer)
555 nsIURI_Release(This->referrer);
556
557 free_http_headers(&This->response_headers);
558 free_http_headers(&This->request_headers);
559
560 heap_free(This->content_type);
561 heap_free(This->charset);
563 }
564
565 return ref;
566}
#define InterlockedDecrement
Definition: armddk.h:52
static void free_http_headers(struct list *list)
Definition: nsio.c:475
long LONG
Definition: pedump.c:60

◆ nsChannel_Resume()

static nsresult NSAPI nsChannel_Resume ( nsIHttpChannel iface)
static

Definition at line 613 of file nsio.c.

614{
616
617 FIXME("(%p)\n", This);
618
620}

◆ nsChannel_SetAllowPipelining()

static nsresult NSAPI nsChannel_SetAllowPipelining ( nsIHttpChannel iface,
cpp_bool  aAllowPipelining 
)
static

Definition at line 1315 of file nsio.c.

1316{
1318
1319 FIXME("(%p)->(%x)\n", This, aAllowPipelining);
1320
1322}

◆ nsChannel_SetAllowTLS()

static nsresult NSAPI nsChannel_SetAllowTLS ( nsIHttpChannel iface,
cpp_bool  aAllowTLS 
)
static

Definition at line 1331 of file nsio.c.

1332{
1334 FIXME("(%p)->(%x)\n", This, aAllowTLS);
1336}

◆ nsChannel_SetContentCharset()

static nsresult NSAPI nsChannel_SetContentCharset ( nsIHttpChannel iface,
const nsACString aContentCharset 
)
static

Definition at line 829 of file nsio.c.

831{
833 const char *data;
834 char *charset;
835
836 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset));
837
838 nsACString_GetData(aContentCharset, &data);
840 if(!charset)
842
843 heap_free(This->charset);
844 This->charset = charset;
845 return NS_OK;
846}
CFF_Charset charset
Definition: cffcmap.c:138

◆ nsChannel_SetContentDisposition()

static nsresult NSAPI nsChannel_SetContentDisposition ( nsIHttpChannel iface,
UINT32  aContentDisposition 
)
static

Definition at line 1148 of file nsio.c.

1149{
1151 FIXME("(%p)->(%u)\n", This, aContentDisposition);
1153}

◆ nsChannel_SetContentDispositionFilename()

static nsresult NSAPI nsChannel_SetContentDispositionFilename ( nsIHttpChannel iface,
const nsAString aContentDispositionFilename 
)
static

Definition at line 1162 of file nsio.c.

1163{
1165 FIXME("(%p)->(%p)\n", This, aContentDispositionFilename);
1167}

◆ nsChannel_SetContentLength()

static nsresult NSAPI nsChannel_SetContentLength ( nsIHttpChannel iface,
INT64  aContentLength 
)
static

Definition at line 857 of file nsio.c.

858{
860
861 FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(aContentLength));
862
864}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ nsChannel_SetContentType()

static nsresult NSAPI nsChannel_SetContentType ( nsIHttpChannel iface,
const nsACString aContentType 
)
static

Definition at line 798 of file nsio.c.

800{
802 const char *content_type;
803
804 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aContentType));
805
806 nsACString_GetData(aContentType, &content_type);
807 heap_free(This->content_type);
808 This->content_type = heap_strdupA(content_type);
809
810 return NS_OK;
811}
static BSTR content_type

◆ nsChannel_SetLoadFlags()

static nsresult NSAPI nsChannel_SetLoadFlags ( nsIHttpChannel iface,
nsLoadFlags  aLoadFlags 
)
static

Definition at line 660 of file nsio.c.

661{
663
664 TRACE("(%p)->(%08x)\n", This, aLoadFlags);
665
666 This->load_flags = aLoadFlags;
667 return NS_OK;
668}

◆ nsChannel_SetLoadGroup()

static nsresult NSAPI nsChannel_SetLoadGroup ( nsIHttpChannel iface,
nsILoadGroup aLoadGroup 
)
static

Definition at line 635 of file nsio.c.

636{
638
639 TRACE("(%p)->(%p)\n", This, aLoadGroup);
640
641 if(This->load_group)
642 nsILoadGroup_Release(This->load_group);
643 if(aLoadGroup)
644 nsILoadGroup_AddRef(aLoadGroup);
645 This->load_group = aLoadGroup;
646
647 return NS_OK;
648}

◆ nsChannel_SetLoadInfo()

static nsresult NSAPI nsChannel_SetLoadInfo ( nsIHttpChannel iface,
nsILoadInfo aLoadInfo 
)
static

Definition at line 1188 of file nsio.c.

1189{
1191
1192 TRACE("(%p)->(%p)\n", This, aLoadInfo);
1193
1194 if(This->load_info)
1195 nsISupports_Release(This->load_info);
1196 This->load_info = aLoadInfo;
1197 if(This->load_info)
1198 nsISupports_AddRef(This->load_info);
1199 return NS_OK;
1200}

◆ nsChannel_SetNotificationCallbacks()

static nsresult NSAPI nsChannel_SetNotificationCallbacks ( nsIHttpChannel iface,
nsIInterfaceRequestor aNotificationCallbacks 
)
static

Definition at line 751 of file nsio.c.

753{
755
756 TRACE("(%p)->(%p)\n", This, aNotificationCallbacks);
757
758 if(This->notif_callback)
759 nsIInterfaceRequestor_Release(This->notif_callback);
760 if(aNotificationCallbacks)
761 nsIInterfaceRequestor_AddRef(aNotificationCallbacks);
762
763 This->notif_callback = aNotificationCallbacks;
764
765 return NS_OK;
766}

◆ nsChannel_SetOriginalURI()

static nsresult NSAPI nsChannel_SetOriginalURI ( nsIHttpChannel iface,
nsIURI aOriginalURI 
)
static

Definition at line 683 of file nsio.c.

684{
686
687 TRACE("(%p)->(%p)\n", This, aOriginalURI);
688
689 if(This->original_uri)
690 nsIURI_Release(This->original_uri);
691
692 nsIURI_AddRef(aOriginalURI);
693 This->original_uri = aOriginalURI;
694 return NS_OK;
695}

◆ nsChannel_SetOwner()

static nsresult NSAPI nsChannel_SetOwner ( nsIHttpChannel iface,
nsISupports aOwner 
)
static

Definition at line 722 of file nsio.c.

723{
725
726 TRACE("(%p)->(%p)\n", This, aOwner);
727
728 if(aOwner)
729 nsISupports_AddRef(aOwner);
730 if(This->owner)
731 nsISupports_Release(This->owner);
732 This->owner = aOwner;
733
734 return NS_OK;
735}

◆ nsChannel_SetRedirectionLimit()

static nsresult NSAPI nsChannel_SetRedirectionLimit ( nsIHttpChannel iface,
UINT32  aRedirectionLimit 
)
static

Definition at line 1347 of file nsio.c.

1348{
1350
1351 FIXME("(%p)->(%u)\n", This, aRedirectionLimit);
1352
1354}

◆ nsChannel_SetReferrer()

static nsresult NSAPI nsChannel_SetReferrer ( nsIHttpChannel iface,
nsIURI aReferrer 
)
static

Definition at line 1245 of file nsio.c.

1246{
1248
1249 TRACE("(%p)->(%p)\n", This, aReferrer);
1250
1251 if(aReferrer)
1252 nsIURI_AddRef(aReferrer);
1253 if(This->referrer)
1254 nsIURI_Release(This->referrer);
1255 This->referrer = aReferrer;
1256 return NS_OK;
1257}

◆ nsChannel_SetReferrerWithPolicy()

static nsresult NSAPI nsChannel_SetReferrerWithPolicy ( nsIHttpChannel iface,
nsIURI aReferrer,
UINT32  aReferrerPolicy 
)
static

Definition at line 1266 of file nsio.c.

1267{
1269 FIXME("(%p)->(%p %x)\n", This, aReferrer, aReferrerPolicy);
1271}

◆ nsChannel_SetRequestHeader()

static nsresult NSAPI nsChannel_SetRequestHeader ( nsIHttpChannel iface,
const nsACString aHeader,
const nsACString aValue,
cpp_bool  aMerge 
)
static

Definition at line 1283 of file nsio.c.

1285{
1287
1288 TRACE("(%p)->(%s %s %x)\n", This, debugstr_nsacstr(aHeader), debugstr_nsacstr(aValue), aMerge);
1289
1290 if(aMerge)
1291 FIXME("aMerge not supported\n");
1292
1293 return set_channel_http_header(&This->request_headers, aHeader, aValue);
1294}
static nsresult set_channel_http_header(struct list *headers, const nsACString *name_str, const nsACString *value_str)
Definition: nsio.c:417

◆ nsChannel_SetRequestMethod()

static nsresult NSAPI nsChannel_SetRequestMethod ( nsIHttpChannel iface,
const nsACString aRequestMethod 
)
static

Definition at line 1212 of file nsio.c.

1214{
1216 const char *method;
1217 unsigned i;
1218
1219 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aRequestMethod));
1220
1221 nsACString_GetData(aRequestMethod, &method);
1222 for(i=0; i < sizeof(request_method_strings)/sizeof(*request_method_strings); i++) {
1224 This->request_method = i;
1225 return NS_OK;
1226 }
1227 }
1228
1229 ERR("Invalid method %s\n", debugstr_a(method));
1230 return NS_ERROR_UNEXPECTED;
1231}
method
Definition: dragdrop.c:54
#define strcasecmp
Definition: fake.h:9

◆ nsChannel_SetResponseHeader()

static nsresult NSAPI nsChannel_SetResponseHeader ( nsIHttpChannel iface,
const nsACString header,
const nsACString value,
cpp_bool  merge 
)
static

Definition at line 1407 of file nsio.c.

1409{
1411
1412 FIXME("(%p)->(%s %s %x)\n", This, debugstr_nsacstr(header), debugstr_nsacstr(value), merge);
1413
1415}
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result)
Definition: _algo.c:1419
Definition: pdh_main.c:94

◆ nsChannel_Suspend()

static nsresult NSAPI nsChannel_Suspend ( nsIHttpChannel iface)
static

Definition at line 604 of file nsio.c.

605{
607
608 FIXME("(%p)\n", This);
609
611}

◆ nsChannel_VisitRequestHeaders()

static nsresult NSAPI nsChannel_VisitRequestHeaders ( nsIHttpChannel iface,
nsIHttpHeaderVisitor aVisitor 
)
static

Definition at line 1296 of file nsio.c.

1298{
1300
1301 FIXME("(%p)->(%p)\n", This, aVisitor);
1302
1304}

◆ nsChannel_VisitResponseHeaders()

static nsresult NSAPI nsChannel_VisitResponseHeaders ( nsIHttpChannel iface,
nsIHttpHeaderVisitor aVisitor 
)
static

Definition at line 1417 of file nsio.c.

1419{
1421
1422 TRACE("(%p)->(%p)\n", This, aVisitor);
1423
1424 return visit_http_headers(&This->response_headers, aVisitor);
1425}
static nsresult visit_http_headers(struct list *headers, nsIHttpHeaderVisitor *visitor)
Definition: nsio.c:443

◆ nsFileURL_GetFile()

static nsresult NSAPI nsFileURL_GetFile ( nsIFileURL iface,
nsIFile **  aFile 
)
static

Definition at line 3032 of file nsio.c.

3033{
3036 DWORD size;
3037 HRESULT hres;
3038
3039 TRACE("(%p)->(%p)\n", This, aFile);
3040
3041 hres = CoInternetParseIUri(This->uri, PARSE_PATH_FROM_URL, 0, path, sizeof(path)/sizeof(WCHAR), &size, 0);
3042 if(FAILED(hres)) {
3043 WARN("CoInternetParseIUri failed: %08x\n", hres);
3044 return NS_ERROR_FAILURE;
3045 }
3046
3047 return create_nsfile(path, aFile);
3048}
#define MAX_PATH
Definition: compat.h:34
HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD_PTR dwReserved)
Definition: uri.c:7247
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
nsresult create_nsfile(const PRUnichar *, nsIFile **) DECLSPEC_HIDDEN
Definition: nsembed.c:72
static nsWineURI * impl_from_nsIFileURL(nsIFileURL *iface)
Definition: nsio.c:2047

◆ nsFileURL_SetFile()

static nsresult NSAPI nsFileURL_SetFile ( nsIFileURL iface,
nsIFile aFile 
)
static

Definition at line 3050 of file nsio.c.

3051{
3053 FIXME("(%p)->(%p)\n", This, aFile);
3055}

◆ nsHttpChannelInternal_AddRedirect()

static nsresult NSAPI nsHttpChannelInternal_AddRedirect ( nsIHttpChannelInternal iface,
nsIPrincipal aPrincipal 
)
static

Definition at line 1857 of file nsio.c.

1858{
1860 FIXME("(%p)->(%p)\n", This, aPrincipal);
1862}
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ nsHttpChannelInternal_AddRef()

static nsrefcnt NSAPI nsHttpChannelInternal_AddRef ( nsIHttpChannelInternal iface)
static

Definition at line 1633 of file nsio.c.

1634{
1636 return nsIHttpChannel_AddRef(&This->nsIHttpChannel_iface);
1637}

◆ nsHttpChannelInternal_ContinueBeginConnect()

static nsresult NSAPI nsHttpChannelInternal_ContinueBeginConnect ( nsIHttpChannelInternal iface)
static

Definition at line 1931 of file nsio.c.

1932{
1934 FIXME("(%p)\n", This);
1936}

◆ nsHttpChannelInternal_ForceNoIntercept()

static nsresult NSAPI nsHttpChannelInternal_ForceNoIntercept ( nsIHttpChannelInternal iface)
static

Definition at line 1871 of file nsio.c.

1872{
1874 FIXME("(%p)\n", This);
1876}

◆ nsHttpChannelInternal_GetAllowAltSvc()

static nsresult NSAPI nsHttpChannelInternal_GetAllowAltSvc ( nsIHttpChannelInternal iface,
cpp_bool aAllowAltSvc 
)
static

Definition at line 1843 of file nsio.c.

1844{
1846 FIXME("(%p)->(%p)\n", This, aAllowAltSvc);
1848}

◆ nsHttpChannelInternal_GetAllowSpdy()

static nsresult NSAPI nsHttpChannelInternal_GetAllowSpdy ( nsIHttpChannelInternal iface,
cpp_bool aAllowSpdy 
)
static

Definition at line 1806 of file nsio.c.

1807{
1809 FIXME("(%p)->(%p)\n", This, aAllowSpdy);
1811}

◆ nsHttpChannelInternal_GetApiRedirectToURI()

static nsresult NSAPI nsHttpChannelInternal_GetApiRedirectToURI ( nsIHttpChannelInternal iface,
nsIURI **  aApiRedirectToURI 
)
static

Definition at line 1836 of file nsio.c.

1837{
1839 FIXME("(%p)->(%p)\n", This, aApiRedirectToURI);
1841}

◆ nsHttpChannelInternal_GetCanceled()

static nsresult NSAPI nsHttpChannelInternal_GetCanceled ( nsIHttpChannelInternal iface,
cpp_bool aCanceled 
)
static

Definition at line 1726 of file nsio.c.

1727{
1729
1730 FIXME("(%p)->(%p)\n", This, aCanceled);
1731
1733}

◆ nsHttpChannelInternal_GetChannelIsForDownload()

static nsresult NSAPI nsHttpChannelInternal_GetChannelIsForDownload ( nsIHttpChannelInternal iface,
cpp_bool aCanceled 
)
static

Definition at line 1735 of file nsio.c.

1736{
1738
1739 FIXME("(%p)->(%p)\n", This, aCanceled);
1740
1742}

◆ nsHttpChannelInternal_GetCorsIncludeCredentials()

static nsresult NSAPI nsHttpChannelInternal_GetCorsIncludeCredentials ( nsIHttpChannelInternal iface,
cpp_bool aCorsIncludeCredentials 
)
static

Definition at line 1878 of file nsio.c.

1880{
1882 FIXME("(%p)->(%p)\n", This, aCorsIncludeCredentials);
1884}

◆ nsHttpChannelInternal_GetCorsMode()

static nsresult NSAPI nsHttpChannelInternal_GetCorsMode ( nsIHttpChannelInternal iface,
UINT32 aCorsMode 
)
static

Definition at line 1894 of file nsio.c.

1895{
1897 FIXME("(%p)->(%p)\n", This, aCorsMode);
1899}

◆ nsHttpChannelInternal_GetDocumentURI()

static nsresult NSAPI nsHttpChannelInternal_GetDocumentURI ( nsIHttpChannelInternal iface,
nsIURI **  aDocumentURI 
)
static

Definition at line 1645 of file nsio.c.

1646{
1648
1649 FIXME("(%p)->()\n", This);
1650
1652}

◆ nsHttpChannelInternal_GetForceAllowThirdPartyCookie()

static nsresult NSAPI nsHttpChannelInternal_GetForceAllowThirdPartyCookie ( nsIHttpChannelInternal iface,
cpp_bool aForceThirdPartyCookie 
)
static

Definition at line 1708 of file nsio.c.

1709{
1711
1712 FIXME("(%p)->()\n", This);
1713
1715}

◆ nsHttpChannelInternal_GetLastModifiedTime()

static nsresult NSAPI nsHttpChannelInternal_GetLastModifiedTime ( nsIHttpChannelInternal iface,
PRTime aLastModifiedTime 
)
static

Definition at line 1864 of file nsio.c.

1865{
1867 FIXME("(%p)->(%p)\n", This, aLastModifiedTime);
1869}

◆ nsHttpChannelInternal_GetLocalAddress()

static nsresult NSAPI nsHttpChannelInternal_GetLocalAddress ( nsIHttpChannelInternal iface,
nsACString aLocalAddress 
)
static

Definition at line 1753 of file nsio.c.

1754{
1756
1757 FIXME("(%p)->(%p)\n", This, aLocalAddress);
1758
1760}

◆ nsHttpChannelInternal_GetLocalPort()

static nsresult NSAPI nsHttpChannelInternal_GetLocalPort ( nsIHttpChannelInternal iface,
LONG aLocalPort 
)
static

Definition at line 1762 of file nsio.c.

1763{
1765
1766 FIXME("(%p)->(%p)\n", This, aLocalPort);
1767
1769}

◆ nsHttpChannelInternal_GetNetworkInterfaceId()

static nsresult NSAPI nsHttpChannelInternal_GetNetworkInterfaceId ( nsIHttpChannelInternal iface,
nsACString aNetworkInterfaceId 
)
static

Definition at line 1915 of file nsio.c.

1917{
1919 FIXME("(%p)->(%p)\n", This, aNetworkInterfaceId);
1921}

◆ nsHttpChannelInternal_GetProxyURI()

static nsresult NSAPI nsHttpChannelInternal_GetProxyURI ( nsIHttpChannelInternal iface,
nsIURI **  aProxyURI 
)
static

Definition at line 1938 of file nsio.c.

1939{
1941 FIXME("(%p)->(%p)\n", This, aProxyURI);
1943}

◆ nsHttpChannelInternal_GetRemoteAddress()

static nsresult NSAPI nsHttpChannelInternal_GetRemoteAddress ( nsIHttpChannelInternal iface,
nsACString aRemoteAddress 
)
static

Definition at line 1771 of file nsio.c.

1772{
1774
1775 FIXME("(%p)->(%p)\n", This, aRemoteAddress);
1776
1778}

◆ nsHttpChannelInternal_GetRemotePort()

static nsresult NSAPI nsHttpChannelInternal_GetRemotePort ( nsIHttpChannelInternal iface,
LONG aRemotePort 
)
static

Definition at line 1780 of file nsio.c.

1781{
1783
1784 FIXME("(%p)->(%p)\n", This, aRemotePort);
1785
1787}

◆ nsHttpChannelInternal_GetRequestVersion()

static nsresult NSAPI nsHttpChannelInternal_GetRequestVersion ( nsIHttpChannelInternal iface,
UINT32 major,
UINT32 minor 
)
static

Definition at line 1663 of file nsio.c.

1664{
1666
1667 FIXME("(%p)->()\n", This);
1668
1670}

◆ nsHttpChannelInternal_GetResponseTimeoutEnabled()

static nsresult NSAPI nsHttpChannelInternal_GetResponseTimeoutEnabled ( nsIHttpChannelInternal iface,
cpp_bool aResponseTimeoutEnabled 
)
static

Definition at line 1820 of file nsio.c.

1822{
1824 FIXME("(%p)->(%p)\n", This, aResponseTimeoutEnabled);
1826}

◆ nsHttpChannelInternal_GetResponseVersion()

static nsresult NSAPI nsHttpChannelInternal_GetResponseVersion ( nsIHttpChannelInternal iface,
UINT32 major,
UINT32 minor 
)
static

Definition at line 1672 of file nsio.c.

1673{
1675
1676 FIXME("(%p)->()\n", This);
1677
1679}

◆ nsHttpChannelInternal_GetTopWindowURI()

static nsresult NSAPI nsHttpChannelInternal_GetTopWindowURI ( nsIHttpChannelInternal iface,
nsIURI **  aTopWindowURI 
)
static

Definition at line 1908 of file nsio.c.

1909{
1911 FIXME("(%p)->(%p)\n", This, aTopWindowURI);
1913}

◆ nsHttpChannelInternal_HTTPUpgrade()

static nsresult NSAPI nsHttpChannelInternal_HTTPUpgrade ( nsIHttpChannelInternal iface,
const nsACString aProtocolName,
nsIHttpUpgradeListener aListener 
)
static

Definition at line 1798 of file nsio.c.

1800{
1802 FIXME("(%p)->(%s %p)\n", This, debugstr_nsacstr(aProtocolName), aListener);
1804}

◆ nsHttpChannelInternal_QueryInterface()

static nsresult NSAPI nsHttpChannelInternal_QueryInterface ( nsIHttpChannelInternal iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1626 of file nsio.c.

1628{
1630 return nsIHttpChannel_QueryInterface(&This->nsIHttpChannel_iface, riid, result);
1631}

◆ nsHttpChannelInternal_Release()

static nsrefcnt NSAPI nsHttpChannelInternal_Release ( nsIHttpChannelInternal iface)
static

Definition at line 1639 of file nsio.c.

1640{
1642 return nsIHttpChannel_Release(&This->nsIHttpChannel_iface);
1643}

◆ nsHttpChannelInternal_SetAllowAltSvc()

static nsresult NSAPI nsHttpChannelInternal_SetAllowAltSvc ( nsIHttpChannelInternal iface,
cpp_bool  aAllowAltSvc 
)
static

Definition at line 1850 of file nsio.c.

1851{
1853 FIXME("(%p)->(%x)\n", This, aAllowAltSvc);
1855}

◆ nsHttpChannelInternal_SetAllowSpdy()

static nsresult NSAPI nsHttpChannelInternal_SetAllowSpdy ( nsIHttpChannelInternal iface,
cpp_bool  aAllowSpdy 
)
static

Definition at line 1813 of file nsio.c.

1814{
1816 FIXME("(%p)->(%x)\n", This, aAllowSpdy);
1818}

◆ nsHttpChannelInternal_SetCacheKeysRedirectChain()

static nsresult NSAPI nsHttpChannelInternal_SetCacheKeysRedirectChain ( nsIHttpChannelInternal iface,
void cacheKeys 
)
static

Definition at line 1789 of file nsio.c.

1790{
1792
1793 FIXME("(%p)->(%p)\n", This, cacheKeys);
1794
1796}

◆ nsHttpChannelInternal_SetChannelIsForDownload()

static nsresult NSAPI nsHttpChannelInternal_SetChannelIsForDownload ( nsIHttpChannelInternal iface,
cpp_bool  aCanceled 
)
static

Definition at line 1744 of file nsio.c.

1745{
1747
1748 FIXME("(%p)->(%x)\n", This, aCanceled);
1749
1751}

◆ nsHttpChannelInternal_SetCookie()

static nsresult NSAPI nsHttpChannelInternal_SetCookie ( nsIHttpChannelInternal iface,
const char aCookieHeader 
)
static

Definition at line 1690 of file nsio.c.

1691{
1693
1694 FIXME("(%p)->()\n", This);
1695
1697}

◆ nsHttpChannelInternal_SetCorsIncludeCredentials()

static nsresult NSAPI nsHttpChannelInternal_SetCorsIncludeCredentials ( nsIHttpChannelInternal iface,
cpp_bool  aCorsIncludeCredentials 
)
static

Definition at line 1886 of file nsio.c.

1888{
1890 FIXME("(%p)->(%x)\n", This, aCorsIncludeCredentials);
1892}

◆ nsHttpChannelInternal_SetCorsMode()

static nsresult NSAPI nsHttpChannelInternal_SetCorsMode ( nsIHttpChannelInternal iface,
UINT32  aCorsMode 
)
static

Definition at line 1901 of file nsio.c.

1902{
1904 FIXME("(%p)->(%d)\n", This, aCorsMode);
1906}

◆ nsHttpChannelInternal_SetDocumentURI()

static nsresult NSAPI nsHttpChannelInternal_SetDocumentURI ( nsIHttpChannelInternal iface,
nsIURI aDocumentURI 
)
static

Definition at line 1654 of file nsio.c.

1655{
1657
1658 FIXME("(%p)->()\n", This);
1659
1661}

◆ nsHttpChannelInternal_SetForceAllowThirdPartyCookie()

static nsresult NSAPI nsHttpChannelInternal_SetForceAllowThirdPartyCookie ( nsIHttpChannelInternal iface,
cpp_bool  aForceThirdPartyCookie 
)
static

Definition at line 1717 of file nsio.c.

1718{
1720
1721 FIXME("(%p)->()\n", This);
1722
1724}

◆ nsHttpChannelInternal_SetNetworkInterfaceId()

static nsresult NSAPI nsHttpChannelInternal_SetNetworkInterfaceId ( nsIHttpChannelInternal iface,
const nsACString aNetworkInterfaceId 
)
static

Definition at line 1923 of file nsio.c.

1925{
1927 FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aNetworkInterfaceId));
1929}

◆ nsHttpChannelInternal_SetResponseTimeoutEnabled()

static nsresult NSAPI nsHttpChannelInternal_SetResponseTimeoutEnabled ( nsIHttpChannelInternal iface,
cpp_bool  aResponseTimeoutEnabled 
)
static

Definition at line 1828 of file nsio.c.

1830{
1832 FIXME("(%p)->(%x)\n", This, aResponseTimeoutEnabled);
1834}

◆ nsHttpChannelInternal_SetupFallbackChannel()

static nsresult NSAPI nsHttpChannelInternal_SetupFallbackChannel ( nsIHttpChannelInternal iface,
const char aFallbackKey 
)
static

Definition at line 1699 of file nsio.c.

1700{
1702
1703 FIXME("(%p)->()\n", This);
1704
1706}

◆ nsHttpChannelInternal_TakeAllSecurityMessages()

static nsresult NSAPI nsHttpChannelInternal_TakeAllSecurityMessages ( nsIHttpChannelInternal iface,
void aMessages 
)
static

Definition at line 1681 of file nsio.c.

1682{
1684
1685 FIXME("(%p)->()\n", This);
1686
1688}

◆ nsIOService_AddRef()

static nsrefcnt NSAPI nsIOService_AddRef ( nsIIOService iface)
static

Definition at line 3470 of file nsio.c.

3471{
3472 return 2;
3473}

◆ nsIOService_AllowPort()

static nsresult NSAPI nsIOService_AllowPort ( nsIIOService iface,
LONG  aPort,
const char aScheme,
cpp_bool _retval 
)
static

Definition at line 3741 of file nsio.c.

3743{
3744 TRACE("(%d %s %p)\n", aPort, debugstr_a(aScheme), _retval);
3745 return nsIIOService_AllowPort(nsio, aPort, debugstr_a(aScheme), _retval);
3746}

◆ nsIOService_ExtractScheme()

static nsresult NSAPI nsIOService_ExtractScheme ( nsIIOService iface,
const nsACString urlString,
nsACString _retval 
)
static

Definition at line 3748 of file nsio.c.

3750{
3751 TRACE("(%s %p)\n", debugstr_nsacstr(urlString), _retval);
3752 return nsIIOService_ExtractScheme(nsio, urlString, _retval);
3753}

◆ nsIOService_GetAppOfflineState()

static nsresult NSAPI nsIOService_GetAppOfflineState ( nsIIOService iface,
UINT32  appId,
INT32 _retval 
)
static

Definition at line 3735 of file nsio.c.

3736{
3737 TRACE("(%d %p)\n", appId, _retval);
3738 return nsIIOService_GetAppOfflineState(nsio, appId, _retval);
3739}

◆ nsIOService_GetConnectivity()

static nsresult NSAPI nsIOService_GetConnectivity ( nsIIOService iface,
cpp_bool aConnectivity 
)
static

Definition at line 3717 of file nsio.c.

3718{
3719 TRACE("(%p)\n", aConnectivity);
3720 return nsIIOService_GetConnectivity(nsio, aConnectivity);
3721}

◆ nsIOService_GetOffline()

static nsresult NSAPI nsIOService_GetOffline ( nsIIOService iface,
cpp_bool aOffline 
)
static

Definition at line 3705 of file nsio.c.

3706{
3707 TRACE("(%p)\n", aOffline);
3708 return nsIIOService_GetOffline(nsio, aOffline);
3709}

◆ nsIOService_GetProtocolFlags()

static nsresult NSAPI nsIOService_GetProtocolFlags ( nsIIOService iface,
const char aScheme,
UINT32 _retval 
)
static

Definition at line 3518 of file nsio.c.

3520{
3521 TRACE("(%s %p)\n", debugstr_a(aScheme), _retval);
3522 return nsIIOService_GetProtocolFlags(nsio, aScheme, _retval);
3523}

◆ nsIOService_GetProtocolHandler()

static nsresult NSAPI nsIOService_GetProtocolHandler ( nsIIOService iface,
const char aScheme,
nsIProtocolHandler **  _retval 
)
static

Definition at line 3480 of file nsio.c.

3482{
3483 nsIExternalProtocolHandler *nsexthandler;
3484 nsIProtocolHandler *nshandler;
3486 nsresult nsres;
3487
3488 TRACE("(%s %p)\n", debugstr_a(aScheme), _retval);
3489
3490 nsres = nsIIOService_GetProtocolHandler(nsio, aScheme, &nshandler);
3491 if(NS_FAILED(nsres)) {
3492 WARN("GetProtocolHandler failed: %08x\n", nsres);
3493 return nsres;
3494 }
3495
3496 nsres = nsIProtocolHandler_QueryInterface(nshandler, &IID_nsIExternalProtocolHandler,
3497 (void**)&nsexthandler);
3498 if(NS_FAILED(nsres)) {
3499 *_retval = nshandler;
3500 return NS_OK;
3501 }
3502
3503 nsIExternalProtocolHandler_Release(nsexthandler);
3504
3505 ret = heap_alloc(sizeof(nsProtocolHandler));
3506 if(!ret)
3508
3509 ret->nsIProtocolHandler_iface.lpVtbl = &nsProtocolHandlerVtbl;
3510 ret->ref = 1;
3511 ret->nshandler = nshandler;
3512 *_retval = &ret->nsIProtocolHandler_iface;
3513
3514 TRACE("return %p\n", *_retval);
3515 return NS_OK;
3516}
static const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl
Definition: nsio.c:3455

◆ nsIOService_IsAppOffline()

static nsresult NSAPI nsIOService_IsAppOffline ( nsIIOService iface,
UINT32  appId,
cpp_bool _retval 
)
static

Definition at line 3729 of file nsio.c.

3730{
3731 TRACE("(%u %p)\n", appId, _retval);
3732 return nsIIOService_IsAppOffline(nsio, appId, _retval);
3733}

◆ nsIOService_NewChannel()

static nsresult NSAPI nsIOService_NewChannel ( nsIIOService iface,
const nsACString aSpec,
const char aOriginCharset,
nsIURI aBaseURI,
nsIChannel **  _retval 
)
static

Definition at line 3698 of file nsio.c.

3700{
3701 TRACE("(%s %s %p %p)\n", debugstr_nsacstr(aSpec), debugstr_a(aOriginCharset), aBaseURI, _retval);
3702 return nsIIOService_NewChannel(nsio, aSpec, aOriginCharset, aBaseURI, _retval);
3703}

◆ nsIOService_NewChannel2()

static nsresult NSAPI nsIOService_NewChannel2 ( nsIIOService iface,
const nsACString aSpec,
const char aOriginCharset,
nsIURI aBaseURI,
nsIDOMNode aLoadingNode,
nsIPrincipal aLoadingPrincipal,
nsIPrincipal aTriggeringPrincipal,
UINT32  aSecurityFlags,
UINT32  aContentPolicyType,
nsIChannel **  _retval 
)
static

Definition at line 3688 of file nsio.c.

3691{
3692 TRACE("(%s %s %p %p %p %p %x %d %p)\n", debugstr_nsacstr(aSpec), debugstr_a(aOriginCharset), aBaseURI,
3693 aLoadingNode, aLoadingPrincipal, aTriggeringPrincipal, aSecurityFlags, aContentPolicyType, _retval);
3694 return nsIIOService_NewChannel2(nsio, aSpec, aOriginCharset, aBaseURI, aLoadingNode, aLoadingPrincipal,
3695 aTriggeringPrincipal, aSecurityFlags, aContentPolicyType, _retval);
3696}

◆ nsIOService_NewChannelFromURI()

static nsresult NSAPI nsIOService_NewChannelFromURI ( nsIIOService iface,
nsIURI aURI,
nsIChannel **  _retval 
)
static

Definition at line 3681 of file nsio.c.

3683{
3684 TRACE("(%p %p)\n", aURI, _retval);
3685 return new_channel_from_uri(aURI, NULL, _retval);
3686}
static nsresult new_channel_from_uri(nsIURI *uri, nsILoadInfo *load_info, nsIChannel **_retval)
Definition: nsio.c:3625

◆ nsIOService_NewChannelFromURI2()

static nsresult NSAPI nsIOService_NewChannelFromURI2 ( nsIIOService iface,
nsIURI aURI,
nsIDOMNode aLoadingNode,
nsIPrincipal aLoadingPrincipal,
nsIPrincipal aTriggeringPrincipal,
UINT32  aSecurityFlags,
UINT32  aContentPolicyType,
nsIChannel **  _retval 
)
static

Definition at line 3652 of file nsio.c.

3655{
3656 nsILoadInfo *load_info = NULL;
3657 nsresult nsres;
3658
3659 TRACE("(%p %p %p %p %x %d %p)\n", aURI, aLoadingNode, aLoadingPrincipal, aTriggeringPrincipal,
3660 aSecurityFlags, aContentPolicyType, _retval);
3661
3662 if(aLoadingNode || aLoadingPrincipal) {
3663 nsres = nsIIOService_NewLoadInfo(nsio, aLoadingPrincipal, aTriggeringPrincipal, aLoadingNode,
3664 aSecurityFlags, aContentPolicyType, &load_info);
3665 assert(nsres == NS_OK);
3666 }
3667
3668 nsres = new_channel_from_uri(aURI, load_info, _retval);
3669 if(load_info)
3670 nsISupports_Release(load_info);
3671 return nsres;
3672}

◆ nsIOService_NewChannelFromURIWithLoadInfo()

static nsresult NSAPI nsIOService_NewChannelFromURIWithLoadInfo ( nsIIOService iface,
nsIURI aURI,
nsILoadInfo aLoadInfo,
nsIChannel **  _retval 
)
static

Definition at line 3674 of file nsio.c.

3676{
3677 TRACE("(%p %p %p)\n", aURI, aLoadInfo, _retval);
3678 return new_channel_from_uri(aURI, aLoadInfo, _retval);
3679}

◆ nsIOService_NewFileURI()

static nsresult NSAPI nsIOService_NewFileURI ( nsIIOService iface,
nsIFile aFile,
nsIURI **  _retval 
)
static

Definition at line 3618 of file nsio.c.

3620{
3621 TRACE("(%p %p)\n", aFile, _retval);
3622 return nsIIOService_NewFileURI(nsio, aFile, _retval);
3623}

◆ nsIOService_NewURI()

static nsresult NSAPI nsIOService_NewURI ( nsIIOService iface,
const nsACString aSpec,
const char aOriginCharset,
nsIURI aBaseURI,
nsIURI **  _retval 
)
static

Definition at line 3545 of file nsio.c.

3547{
3548 nsWineURI *wine_uri, *base_wine_uri = NULL;
3551 const char *spec = NULL;
3552 UINT cp = CP_UTF8;
3553 IUri *urlmon_uri;
3554 nsresult nsres;
3555 HRESULT hres;
3556
3557 TRACE("(%s %s %p %p)\n", debugstr_nsacstr(aSpec), debugstr_a(aOriginCharset),
3558 aBaseURI, _retval);
3559
3560 nsACString_GetData(aSpec, &spec);
3561 if(is_gecko_special_uri(spec))
3562 return nsIIOService_NewURI(nsio, aSpec, aOriginCharset, aBaseURI, _retval);
3563
3564 if(!strncmp(spec, "wine:", 5))
3565 spec += 5;
3566
3567 if(aBaseURI) {
3568 nsres = nsIURI_QueryInterface(aBaseURI, &IID_nsWineURI, (void**)&base_wine_uri);
3569 if(NS_SUCCEEDED(nsres)) {
3570 if(!ensure_uri(base_wine_uri))
3571 return NS_ERROR_UNEXPECTED;
3572 if(base_wine_uri->window_ref)
3573 window = base_wine_uri->window_ref->window;
3574 }else {
3575 WARN("Could not get base nsWineURI: %08x\n", nsres);
3576 }
3577 }
3578
3579 if(aOriginCharset && *aOriginCharset && strncasecmp(aOriginCharset, "utf", 3)) {
3580 BSTR charset;
3581 int len;
3582
3583 len = MultiByteToWideChar(CP_UTF8, 0, aOriginCharset, -1, NULL, 0);
3585 if(!charset)
3587 MultiByteToWideChar(CP_UTF8, 0, aOriginCharset, -1, charset, len);
3588
3590
3592 }
3593
3594 MultiByteToWideChar(cp, 0, spec, -1, new_spec, sizeof(new_spec)/sizeof(WCHAR));
3595
3596 if(base_wine_uri) {
3597 hres = combine_url(base_wine_uri->uri, new_spec, &urlmon_uri);
3598 }else {
3599 hres = create_uri(new_spec, 0, &urlmon_uri);
3600 if(FAILED(hres))
3601 WARN("create_uri failed: %08x\n", hres);
3602 }
3603
3604 if(FAILED(hres))
3605 return nsIIOService_NewURI(nsio, aSpec, aOriginCharset, aBaseURI, _retval);
3606
3607 nsres = create_nsuri(urlmon_uri, window, NULL, NULL, &wine_uri);
3608 IUri_Release(urlmon_uri);
3609 if(base_wine_uri)
3610 nsIFileURL_Release(&base_wine_uri->nsIFileURL_iface);
3611 if(NS_FAILED(nsres))
3612 return nsres;
3613
3614 *_retval = (nsIURI*)&wine_uri->nsIFileURL_iface;
3615 return nsres;
3616}
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
#define MultiByteToWideChar
Definition: compat.h:110
UINT cp_from_charset_string(BSTR charset)
Definition: main.c:45
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
POINT cp
Definition: magnifier.c:59
unsigned int UINT
Definition: ndis.h:50
static HRESULT combine_url(IUri *base_uri, const WCHAR *rel_url, IUri **ret)
Definition: nsio.c:123
static BOOL is_gecko_special_uri(const char *spec)
Definition: nsio.c:3525
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define CP_UTF8
Definition: nls.h:20

◆ nsIOService_QueryInterface()

static nsresult NSAPI nsIOService_QueryInterface ( nsIIOService iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 3917 of file nsio.c.

3919{
3920 *result = NULL;
3921
3922 if(IsEqualGUID(&IID_nsISupports, riid))
3923 *result = &nsIOService;
3924 else if(IsEqualGUID(&IID_nsIIOService, riid))
3925 *result = &nsIOService;
3926 else if(IsEqualGUID(&IID_nsINetUtil, riid))
3927 *result = &nsNetUtil;
3928
3929 if(*result) {
3930 nsISupports_AddRef((nsISupports*)*result);
3931 return NS_OK;
3932 }
3933
3934 FIXME("(%s %p)\n", debugstr_guid(riid), result);
3935 return NS_NOINTERFACE;
3936}
static nsINetUtil nsNetUtil
Definition: nsio.c:3915
static nsIIOService nsIOService
Definition: nsio.c:3778

◆ nsIOService_Release()

static nsrefcnt NSAPI nsIOService_Release ( nsIIOService iface)
static

Definition at line 3475 of file nsio.c.

3476{
3477 return 1;
3478}

◆ nsIOService_SetAppOffline()

static nsresult NSAPI nsIOService_SetAppOffline ( nsIIOService iface,
UINT32  appId,
INT32  state 
)
static

Definition at line 3723 of file nsio.c.

3724{
3725 TRACE("(%d %x)\n", appId, state);
3726 return nsIIOService_SetAppOffline(nsio, appId, state);
3727}
static int state
Definition: maze.c:121

◆ nsIOService_SetOffline()

static nsresult NSAPI nsIOService_SetOffline ( nsIIOService iface,
cpp_bool  aOffline 
)
static

Definition at line 3711 of file nsio.c.

3712{
3713 TRACE("(%x)\n", aOffline);
3714 return nsIIOService_SetOffline(nsio, aOffline);
3715}

◆ nsIOServiceFactory_AddRef()

static nsrefcnt NSAPI nsIOServiceFactory_AddRef ( nsIFactory iface)
static

Definition at line 3960 of file nsio.c.

3961{
3962 return 2;
3963}

◆ nsIOServiceFactory_CreateInstance()

static nsresult NSAPI nsIOServiceFactory_CreateInstance ( nsIFactory iface,
nsISupports aOuter,
const nsIID iid,
void **  result 
)
static

Definition at line 3970 of file nsio.c.

3972{
3973 return nsIIOService_QueryInterface(&nsIOService, iid, result);
3974}

◆ nsIOServiceFactory_LockFactory()

static nsresult NSAPI nsIOServiceFactory_LockFactory ( nsIFactory iface,
cpp_bool  lock 
)
static

Definition at line 3976 of file nsio.c.

3977{
3978 WARN("(%x)\n", lock);
3979 return NS_OK;
3980}
rwlock_t lock
Definition: tcpcore.h:0

◆ nsIOServiceFactory_QueryInterface()

static nsresult NSAPI nsIOServiceFactory_QueryInterface ( nsIFactory iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 3938 of file nsio.c.

3940{
3941 *result = NULL;
3942
3943 if(IsEqualGUID(&IID_nsISupports, riid)) {
3944 TRACE("(IID_nsISupports %p)\n", result);
3945 *result = iface;
3946 }else if(IsEqualGUID(&IID_nsIFactory, riid)) {
3947 TRACE("(IID_nsIFactory %p)\n", result);
3948 *result = iface;
3949 }
3950
3951 if(*result) {
3952 nsIFactory_AddRef(iface);
3953 return NS_OK;
3954 }
3955
3956 WARN("(%s %p)\n", debugstr_guid(riid), result);
3957 return NS_NOINTERFACE;
3958}

◆ nsIOServiceFactory_Release()

static nsrefcnt NSAPI nsIOServiceFactory_Release ( nsIFactory iface)
static

Definition at line 3965 of file nsio.c.

3966{
3967 return 1;
3968}

◆ nsNetUtil_AddRef()

static nsrefcnt NSAPI nsNetUtil_AddRef ( nsINetUtil iface)
static

Definition at line 3786 of file nsio.c.

3787{
3788 return 2;
3789}

◆ nsNetUtil_EscapeString()

static nsresult NSAPI nsNetUtil_EscapeString ( nsINetUtil iface,
const nsACString aString,
UINT32  aEscapeType,
nsACString _retval 
)
static

Definition at line 3867 of file nsio.c.

3869{
3870 TRACE("(%s %x %p)\n", debugstr_nsacstr(aString), aEscapeType, _retval);
3871
3872 return nsINetUtil_EscapeString(net_util, aString, aEscapeType, _retval);
3873}

◆ nsNetUtil_EscapeURL()

static nsresult NSAPI nsNetUtil_EscapeURL ( nsINetUtil iface,
const nsACString aStr,
UINT32  aFlags,
nsACString _retval 
)
static

Definition at line 3875 of file nsio.c.

3877{
3878 TRACE("(%s %08x %p)\n", debugstr_nsacstr(aStr), aFlags, _retval);
3879
3880 return nsINetUtil_EscapeURL(net_util, aStr, aFlags, _retval);
3881}

◆ nsNetUtil_ExtractCharsetFromContentType()

static nsresult NSAPI nsNetUtil_ExtractCharsetFromContentType ( nsINetUtil iface,
const nsACString aTypeHeader,
nsACString aCharset,
LONG aCharsetStart,
LONG aCharsetEnd,
cpp_bool _retval 
)
static

Definition at line 3891 of file nsio.c.

3893{
3894 TRACE("(%s %p %p %p %p)\n", debugstr_nsacstr(aTypeHeader), aCharset, aCharsetStart,
3895 aCharsetEnd, _retval);
3896
3897 return nsINetUtil_ExtractCharsetFromContentType(net_util, aTypeHeader, aCharset, aCharsetStart, aCharsetEnd, _retval);
3898}

◆ nsNetUtil_NewSimpleNestedURI()

static nsresult NSAPI nsNetUtil_NewSimpleNestedURI ( nsINetUtil iface,
nsIURI aURI,
nsIURI **  _retval 
)
static

Definition at line 3860 of file nsio.c.

3861{
3862 TRACE("(%p %p)\n", aURI, _retval);
3863
3864 return nsINetUtil_NewSimpleNestedURI(net_util, aURI, _retval);
3865}

◆ nsNetUtil_ParseContentType()

static nsresult NSAPI nsNetUtil_ParseContentType ( nsINetUtil iface,
const nsACString aTypeHeader,
nsACString aCharset,
cpp_bool aHadCharset,
nsACString aContentType 
)
static

Definition at line 3796 of file nsio.c.

3798{
3799 TRACE("(%s %p %p %p)\n", debugstr_nsacstr(aTypeHeader), aCharset, aHadCharset, aContentType);
3800
3801 return nsINetUtil_ParseContentType(net_util, aTypeHeader, aCharset, aHadCharset, aContentType);
3802}

◆ nsNetUtil_ProtocolHasFlags()

static nsresult NSAPI nsNetUtil_ProtocolHasFlags ( nsINetUtil iface,
nsIURI aURI,
UINT32  aFlags,
cpp_bool _retval 
)
static

Definition at line 3834 of file nsio.c.

3835{
3836 TRACE("(%p %s %p)\n", aURI, debugstr_protocol_flags(aFlags), _retval);
3837
3838 return nsINetUtil_ProtocolHasFlags(net_util, aURI, aFlags, _retval);
3839}
static const char * debugstr_protocol_flags(UINT32 flags)
Definition: nsio.c:3804

◆ nsNetUtil_QueryInterface()

static nsresult NSAPI nsNetUtil_QueryInterface ( nsINetUtil iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 3780 of file nsio.c.

3782{
3783 return nsIIOService_QueryInterface(&nsIOService, riid, result);
3784}

◆ nsNetUtil_Release()

static nsrefcnt NSAPI nsNetUtil_Release ( nsINetUtil iface)
static

Definition at line 3791 of file nsio.c.

3792{
3793 return 1;
3794}

◆ nsNetUtil_ToImmutableURI()

static nsresult NSAPI nsNetUtil_ToImmutableURI ( nsINetUtil iface,
nsIURI aURI,
nsIURI **  _retval 
)
static

Definition at line 3853 of file nsio.c.

3854{
3855 TRACE("(%p %p)\n", aURI, _retval);
3856
3857 return nsINetUtil_ToImmutableURI(net_util, aURI, _retval);
3858}

◆ nsNetUtil_UnescapeString()

static nsresult NSAPI nsNetUtil_UnescapeString ( nsINetUtil iface,
const nsACString aStr,
UINT32  aFlags,
nsACString _retval 
)
static

Definition at line 3883 of file nsio.c.

3885{
3886 TRACE("(%s %08x %p)\n", debugstr_nsacstr(aStr), aFlags, _retval);
3887
3888 return nsINetUtil_UnescapeString(net_util, aStr, aFlags, _retval);
3889}

◆ nsNetUtil_URIChainHasFlags()

static nsresult NSAPI nsNetUtil_URIChainHasFlags ( nsINetUtil iface,
nsIURI aURI,
UINT32  aFlags,
cpp_bool _retval 
)
static

Definition at line 3841 of file nsio.c.

3842{
3843 TRACE("(%p %s %p)\n", aURI, debugstr_protocol_flags(aFlags), _retval);
3844
3845 if(aFlags == URI_DOES_NOT_RETURN_DATA) {
3846 *_retval = FALSE;
3847 return NS_OK;
3848 }
3849
3850 return nsINetUtil_URIChainHasFlags(net_util, aURI, aFlags, _retval);
3851}

◆ nsProtocolHandler_AddRef()

static nsrefcnt NSAPI nsProtocolHandler_AddRef ( nsIProtocolHandler iface)
static

Definition at line 3345 of file nsio.c.

3346{
3349
3350 TRACE("(%p) ref=%d\n", This, ref);
3351
3352 return ref;
3353}
static nsProtocolHandler * impl_from_nsIProtocolHandler(nsIProtocolHandler *iface)
Definition: nsio.c:3313

◆ nsProtocolHandler_AllowPort()

static nsresult NSAPI nsProtocolHandler_AllowPort ( nsIProtocolHandler iface,
LONG  port,
const char scheme,
cpp_bool _retval 
)
static

Definition at line 3443 of file nsio.c.

3445{
3447
3448 TRACE("(%p)->(%d %s %p)\n", This, port, debugstr_a(scheme), _retval);
3449
3450 if(This->nshandler)
3451 return nsIProtocolHandler_AllowPort(This->nshandler, port, scheme, _retval);
3453}
USHORT port
Definition: uri.c:228
DWORD scheme

◆ nsProtocolHandler_GetDefaultPort()

static nsresult NSAPI nsProtocolHandler_GetDefaultPort ( nsIProtocolHandler iface,
LONG aDefaultPort 
)
static

Definition at line 3382 of file nsio.c.

3384{
3386
3387 TRACE("(%p)->(%p)\n", This, aDefaultPort);
3388
3389 if(This->nshandler)
3390 return nsIProtocolHandler_GetDefaultPort(This->nshandler, aDefaultPort);
3392}

◆ nsProtocolHandler_GetProtocolFlags()

<
static nsresult NSAPI nsProtocolHandler_GetProtocolFlags ( nsIProtocolHandler iface,