ReactOS  0.4.15-dev-506-ga3ec01c
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;
998  HRESULT hres;
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 {
1024  start_binding_task_t *task;
1025 
1026  task = heap_alloc(sizeof(start_binding_task_t));
1027  if(!task) {
1028  IBindStatusCallback_Release(&bscallback->bsc.IBindStatusCallback_iface);
1029  return NS_ERROR_OUT_OF_MEMORY;
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))
1036  return NS_ERROR_OUT_OF_MEMORY;
1037  }
1038 
1039  return NS_OK;
1040 }
Definition: http.c:7094
HRESULT create_channelbsc(IMoniker *, const WCHAR *, BYTE *, DWORD, BOOL, nsChannelBSC **) DECLSPEC_HIDDEN
Definition: navigate.c:1693
BSCallback bsc
Definition: binding.h:98
#define WARN(fmt,...)
Definition: debug.h:112
static void start_binding_proc(task_t *_task)
Definition: nsio.c:978
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define NS_OK
nsChannelBSC * bscallback
Definition: nsio.c:975
HTMLInnerWindow * window
Definition: nsio.c:974
smooth NULL
Definition: ftsmooth.c:416
HRESULT create_pending_window(HTMLOuterWindow *outer_window, nsChannelBSC *channelbsc)
Definition: htmlwindow.c:3009
void channelbsc_set_channel(nsChannelBSC *, nsChannel *, nsIStreamListener *, nsISupports *) DECLSPEC_HIDDEN
Definition: navigate.c:1839
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
Definition: umon.c:668
static IHTMLWindow2 * window
Definition: events.c:77
static void start_binding_task_destr(task_t *_task)
Definition: nsio.c:985
HRESULT async_start_doc_binding(HTMLOuterWindow *, HTMLInnerWindow *) DECLSPEC_HIDDEN
Definition: navigate.c:1758
void set_current_mon(HTMLOuterWindow *, IMoniker *, DWORD) DECLSPEC_HIDDEN
Definition: persist.c:99
#define BINDING_NAVIGATED
Definition: binding.h:127
IBindStatusCallback IBindStatusCallback_iface
Definition: binding.h:72
#define NS_ERROR_OUT_OF_MEMORY
HRESULT push_task(task_t *, task_proc_t, task_proc_t, LONG) DECLSPEC_HIDDEN
Definition: task.c:39
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define NS_ERROR_UNEXPECTED

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;
226  HRESULT hres;
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 }
nsWineURI * uri
Definition: binding.h:43
HRESULT hlink_frame_navigate(HTMLDocument *, LPCWSTR, nsChannel *, DWORD, BOOL *) DECLSPEC_HIDDEN
Definition: navigate.c:2193
#define TRUE
Definition: types.h:120
IOleClientSite * client
OLECHAR * BSTR
Definition: compat.h:1943
#define NS_OK
#define NS_ERROR_FAILURE
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
HTMLDocument basedoc
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
IUri * uri
Definition: nsio.c:43
static BOOL exec_shldocvw_67(HTMLDocumentObj *doc, BSTR url)
Definition: nsio.c:196

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;
126  HRESULT hres;
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 }
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
#define WARN(fmt,...)
Definition: debug.h:112
#define E_FAIL
Definition: ddrawi.h:102
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
int ret
IUri * get_uri_nofrag(IUri *uri)
Definition: nsio.c:77
#define URL_ESCAPE_SPACES_ONLY
Definition: shlwapi.h:1216
#define URL_DONT_ESCAPE_EXTRA_INFO
Definition: shlwapi.h:1217

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
int ret
IUri * get_uri_nofrag(IUri *uri)
Definition: nsio.c:77

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 TRUE
Definition: types.h:120
const char * uri
Definition: sec_mgr.c:1588
static nsresult create_nsuri(IUri *, HTMLOuterWindow *, NSContainer *, const char *, nsWineURI **)
Definition: nsio.c:3172
Definition: nsio.c:34
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
int ret
static IHTMLWindow2 * window
Definition: events.c:77
#define S_OK
Definition: intsafe.h:59
HRESULT nsresult
Definition: nsiface.idl:39

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)
3234  return NS_ERROR_OUT_OF_MEMORY;
3235 
3236  channel->nsIHttpChannel_iface.lpVtbl = &nsChannelVtbl;
3237  channel->nsIUploadChannel_iface.lpVtbl = &nsUploadChannelVtbl;
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 const nsIHttpChannelVtbl nsChannelVtbl
Definition: nsio.c:1469
nsWineURI * uri
Definition: binding.h:43
nsIHttpChannel nsIHttpChannel_iface
Definition: binding.h:37
const char * uri
Definition: sec_mgr.c:1588
struct list response_headers
Definition: binding.h:58
#define NS_OK
static const nsIUploadChannelVtbl nsUploadChannelVtbl
Definition: nsio.c:1613
static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl
Definition: nsio.c:1945
int ret
struct list request_headers
Definition: binding.h:59
nsIUploadChannel nsIUploadChannel_iface
Definition: binding.h:38
static BOOL ensure_uri(nsWineURI *This)
Definition: nsio.c:51
#define NS_ERROR_OUT_OF_MEMORY
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
nsIHttpChannelInternal nsIHttpChannelInternal_iface
Definition: binding.h:39
LONG ref
Definition: binding.h:41
REQUEST_METHOD request_method
Definition: binding.h:57
#define NS_ERROR_UNEXPECTED

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)
3180  return NS_ERROR_OUT_OF_MEMORY;
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);
3201  return NS_ERROR_OUT_OF_MEMORY;
3202  }
3203  }
3204 
3205  TRACE("retval=%p\n", ret);
3206  *_retval = ret;
3207  return NS_OK;
3208 }
#define TRUE
Definition: types.h:120
static void set_uri_window(nsWineURI *This, HTMLOuterWindow *window)
Definition: nsio.c:315
Definition: nsio.c:34
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static const nsIFileURLVtbl nsFileURLVtbl
Definition: nsio.c:3057
int ret
static IHTMLWindow2 * window
Definition: events.c:77
static const nsIStandardURLVtbl nsStandardURLVtbl
Definition: nsio.c:3163
static void set_uri_nscontainer(nsWineURI *This, NSContainer *nscontainer)
Definition: nsio.c:301
#define NS_ERROR_OUT_OF_MEMORY
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static char * heap_strdupA(const char *str)

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 }
nsIInterfaceRequestor * notif_callback
Definition: binding.h:47
nsWineURI * uri
Definition: binding.h:43
const char * uri
Definition: sec_mgr.c:1588
static nsresult create_nsuri(IUri *, HTMLOuterWindow *, NSContainer *, const char *, nsWineURI **)
Definition: nsio.c:3172
windowref_t * window_ref
Definition: nsio.c:41
Definition: nsio.c:34
nsLoadFlags load_flags
Definition: binding.h:50
#define E_FAIL
Definition: ddrawi.h:102
HTMLOuterWindow * window
#define FIXME(fmt,...)
Definition: debug.h:111
nsIURI * original_uri
Definition: binding.h:51
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static const WCHAR url[]
Definition: encode.c:1432
int ret
static IHTMLWindow2 * window
Definition: events.c:77
#define S_OK
Definition: intsafe.h:59
static nsresult create_nschannel(nsWineURI *uri, nsChannel **ret)
Definition: nsio.c:3225
nsILoadGroup * load_group
Definition: binding.h:46
HRESULT nsresult
Definition: nsiface.idl:39
REQUEST_METHOD request_method
Definition: binding.h:57
nsIURI * referrer
Definition: binding.h:52
HRESULT create_uri(const WCHAR *, DWORD, IUri **) DECLSPEC_HIDDEN
Definition: persist.c:158

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:271
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 {
53  HRESULT hres;
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 TRUE
Definition: types.h:120
#define WARN(fmt,...)
Definition: debug.h:112
#define assert(x)
Definition: debug.h:53
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78

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 }
#define TRUE
Definition: types.h:120
HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
Definition: uri.c:6353
#define WARN(fmt,...)
Definition: debug.h:112
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static void invalidate_uri(nsWineURI *This)
Definition: nsio.c:1989
static BOOL ensure_uri(nsWineURI *This)
Definition: nsio.c:51

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;
199  HRESULT hres;
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 }
#define TRUE
Definition: types.h:120
IOleClientSite * client
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static const WCHAR url[]
Definition: encode.c:1432
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 }
vector< Header * > headers
Definition: sdkparse.cpp:39
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
smooth NULL
Definition: ftsmooth.c:416
uint32_t entry
Definition: isohybrid.c:63
GLenum GLsizei len
Definition: glext.h:6722
WCHAR * header
Definition: binding.h:123
Definition: name.c:38

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 
479  LIST_FOR_EACH_ENTRY_SAFE(iter, iter_next, list, http_header_t, entry) {
480  list_remove(&iter->entry);
481  heap_free(iter->header);
482  heap_free(iter->data);
483  heap_free(iter);
484  }
485 }
WCHAR * data
Definition: binding.h:124
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
WCHAR * header
Definition: binding.h:123
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct list entry
Definition: binding.h:122
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

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)
368  return NS_ERROR_NOT_AVAILABLE;
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);
376  heap_free(data);
377  return NS_OK;
378 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
UINT32 nsACString_GetData(const nsACString *, const char **) DECLSPEC_HIDDEN
Definition: nsembed.c:807
vector< Header * > headers
Definition: sdkparse.cpp:39
char * header_name
Definition: widl.c:136
#define NS_OK
static WCHAR * heap_strdupAtoW(const char *str)
Definition: appwiz.h:80
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
static char * heap_strdupWtoA(const WCHAR *str)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static http_header_t * find_http_header(struct list *headers, const WCHAR *name, int len)
Definition: nsio.c:340
#define NS_ERROR_NOT_AVAILABLE
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802
struct CFHEADER header
Definition: fdi.c:101
#define NS_ERROR_UNEXPECTED
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

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 FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
HTMLOuterWindow * nswindow_to_window(const nsIDOMWindow *nswindow)
Definition: htmlwindow.c:3099
#define NS_FAILED(res)
static IHTMLWindow2 * window
Definition: events.c:77
#define ERR(fmt,...)
Definition: debug.h:110
HRESULT nsresult
Definition: nsiface.idl:39

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;
82  HRESULT hres;
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 }
HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
Definition: uri.c:6353
const char * uri
Definition: sec_mgr.c:1588
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
int ret
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 }
#define NS_OK
static PVOID ptr
Definition: dispmode.c:27
char ext[3]
Definition: mkdosfs.c:358
#define NS_ERROR_FAILURE
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
WINE_UNICODE_INLINE WCHAR * strrchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:254
static BOOL ensure_uri(nsWineURI *This)
Definition: nsio.c:51
#define NS_ERROR_UNEXPECTED
Definition: fci.c:126

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);
2037  SysFreeString(val);
2038  if(!vala)
2039  return NS_ERROR_OUT_OF_MEMORY;
2040 
2041  TRACE("ret %s\n", debugstr_a(vala));
2042  nsACString_SetData(ret, vala);
2043  heap_free(vala);
2044  return NS_OK;
2045 }
#define WARN(fmt,...)
Definition: debug.h:112
static char * heap_strdupWtoU(const WCHAR *str)
OLECHAR * BSTR
Definition: compat.h:1943
#define NS_OK
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:78
int ret
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static BOOL ensure_uri(nsWineURI *This)
Definition: nsio.c:51
#define NS_ERROR_OUT_OF_MEMORY
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802
#define NS_ERROR_UNEXPECTED
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

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 }
nsIFileURL nsIFileURL_iface
Definition: nsio.c:35
const char * uri
Definition: sec_mgr.c:1588
static const IID IID_nsWineURI
Definition: nsio.c:26
#define WARN(fmt,...)
Definition: debug.h:112
windowref_t * window_ref
Definition: nsio.c:41
Definition: nsio.c:34
HTMLOuterWindow * window
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
static IHTMLWindow2 * window
Definition: events.c:77
#define ERR(fmt,...)
Definition: debug.h:110
HRESULT nsresult
Definition: nsiface.idl:39

Referenced by nsChannel_AsyncOpen().

◆ impl_from_nsIFileURL()

static nsWineURI* impl_from_nsIFileURL ( nsIFileURL iface)
inlinestatic

◆ 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 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

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 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

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()

static nsProtocolHandler* impl_from_nsIProtocolHandler ( nsIProtocolHandler iface)
inlinestatic

Definition at line 3313 of file nsio.c.

3314 {
3315  return CONTAINING_RECORD(iface, nsProtocolHandler, nsIProtocolHandler_iface);
3316 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by nsProtocolHandler_AddRef(), nsProtocolHandler_AllowPort(), nsProtocolHandler_GetDefaultPort(), nsProtocolHandler_GetProtocolFlags(), nsProtocolHandler_GetScheme(), nsProtocolHandler_NewChannel(), nsProtocolHandler_NewChannel2(), nsProtocolHandler_NewURI(), nsProtocolHandler_QueryInterface(), and nsProtocolHandler_Release().

◆ impl_from_nsIStandardURL()

static nsWineURI* impl_from_nsIStandardURL ( nsIStandardURL iface)
inlinestatic

Definition at line 3111 of file nsio.c.

3112 {
3113  return CONTAINING_RECORD(iface, nsWineURI, nsIStandardURL_iface);
3114 }
Definition: nsio.c:34
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by nsStandardURL_AddRef(), nsStandardURL_GetMutable(), nsStandardURL_Init(), nsStandardURL_QueryInterface(), nsStandardURL_Release(), and nsStandardURL_SetMutable().

◆ impl_from_nsIUploadChannel()

static nsChannel* impl_from_nsIUploadChannel ( nsIUploadChannel iface)
inlinestatic

Definition at line 1533 of file nsio.c.

1534 {
1535  return CONTAINING_RECORD(iface, nsChannel, nsIUploadChannel_iface);
1536 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by nsUploadChannel_AddRef(), nsUploadChannel_GetUploadStream(), nsUploadChannel_QueryInterface(), nsUploadChannel_Release(), and nsUploadChannel_SetUploadStream().

◆ 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 }
#define NS_IOSERVICE_CONTRACTID
Definition: nsio.c:22
#define WARN(fmt,...)
Definition: debug.h:112
static nsIFactory nsIOServiceFactory
Definition: nsio.c:3990
#define NS_IOSERVICE_CLASSNAME
Definition: nsio.c:21
static nsINetUtil * net_util
Definition: nsio.c:30
smooth NULL
Definition: ftsmooth.c:416
static const IID NS_IOSERVICE_CID
Definition: nsio.c:24
#define NS_FAILED(res)
static nsIIOService * nsio
Definition: nsio.c:29
#define ERR(fmt,...)
Definition: debug.h:110
HRESULT nsresult
Definition: nsiface.idl:39

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 }
smooth NULL
Definition: ftsmooth.c:416

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 }
#define TRUE
Definition: types.h:120
BOOL is_gecko_path(const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:1108
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
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
static PVOID ptr
Definition: dispmode.c:27
#define strncasecmp
Definition: fake.h:10

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 }

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;
285  doc->skip_mutation_notif = TRUE;
286  nsres = nsIDocShell_LoadURI(doc_shell, (nsIURI*)&uri->nsIFileURL_iface, load_info, flags, FALSE);
287  if(doc == window->base.inner_window->doc)
288  doc->skip_mutation_notif = FALSE;
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 }
#define TRUE
Definition: types.h:120
const char * uri
Definition: sec_mgr.c:1588
#define WARN(fmt,...)
Definition: debug.h:112
#define assert(x)
Definition: debug.h:53
#define E_FAIL
Definition: ddrawi.h:102
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
GLbitfield flags
Definition: glext.h:7161
static IHTMLWindow2 * window
Definition: events.c:77
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
nsresult get_nsinterface(nsISupports *, REFIID, void **) DECLSPEC_HIDDEN
Definition: nsembed.c:907
HRESULT nsresult
Definition: nsiface.idl:39

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 }
nsIFileURL nsIFileURL_iface
Definition: nsio.c:35
const char * uri
Definition: sec_mgr.c:1588
static const IID IID_nsWineURI
Definition: nsio.c:26
Definition: nsio.c:34
#define NS_OK
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
static nsIIOService * nsio
Definition: nsio.c:29
int ret
static nsresult create_nschannel(nsWineURI *uri, nsChannel **ret)
Definition: nsio.c:3225
HRESULT nsresult
Definition: nsiface.idl:39

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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
ULONG nsrefcnt
Definition: nsiface.idl:40

◆ 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 TRUE
Definition: types.h:120
#define NS_BINDING_ABORTED
static void set_uri_window(nsWineURI *This, HTMLOuterWindow *window)
Definition: nsio.c:315
#define WARN(fmt,...)
Definition: debug.h:112
OLECHAR * BSTR
Definition: compat.h:1943
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define b
Definition: ke_i.h:79
#define NS_FAILED(res)
#define NS_ERROR_FAILURE
void channelbsc_set_channel(nsChannelBSC *, nsChannel *, nsIStreamListener *, nsISupports *) DECLSPEC_HIDDEN
Definition: navigate.c:1839
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static char * heap_strdupWtoA(const WCHAR *str)
#define NS_SUCCEEDED(res)
static nsresult async_open(nsChannel *This, HTMLOuterWindow *window, BOOL is_doc_channel, nsIStreamListener *listener, nsISupports *context)
Definition: nsio.c:993
static IHTMLWindow2 * window
Definition: events.c:77
#define ERR(fmt,...)
Definition: debug.h:110
static HTMLOuterWindow * get_channel_window(nsChannel *This)
Definition: nsio.c:922
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static BOOL ensure_uri(nsWineURI *This)
Definition: nsio.c:51
static nsresult before_async_open(nsChannel *channel, NSContainer *container, BOOL *cancel)
Definition: nsio.c:222
HRESULT nsresult
Definition: nsiface.idl:39
#define TRACE_ON(x)
Definition: compat.h:65
static HTMLOuterWindow * get_window_from_load_group(nsChannel *This)
Definition: nsio.c:875
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define NS_ERROR_UNEXPECTED
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#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 
1312  return NS_ERROR_NOT_IMPLEMENTED;
1313 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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);
1328  return NS_ERROR_NOT_IMPLEMENTED;
1329 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802

◆ 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);
1145  return NS_ERROR_NOT_IMPLEMENTED;
1146 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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);
1159  return NS_ERROR_NOT_IMPLEMENTED;
1160 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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);
1173  return NS_ERROR_NOT_IMPLEMENTED;
1174 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
#define WARN(fmt,...)
Definition: debug.h:112
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_ERROR_FAILURE
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 
1344  return NS_ERROR_NOT_IMPLEMENTED;
1345 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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);
1263  return NS_ERROR_NOT_IMPLEMENTED;
1264 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define TRACE(s)
Definition: solgame.cpp:4
static nsresult get_channel_http_header(struct list *headers, const nsACString *header_name_str, nsACString *_retval)
Definition: nsio.c:352

◆ 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 nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
static const char * request_method_strings[]
Definition: nsio.c:32
#define TRACE(s)
Definition: solgame.cpp:4
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802

◆ 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)
1390  return NS_ERROR_NOT_AVAILABLE;
1391 
1392  *aRequestSucceeded = This->response_status/100 == 2;
1393 
1394  return NS_OK;
1395 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
#define NS_ERROR_NOT_AVAILABLE

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define TRACE(s)
Definition: solgame.cpp:4
static nsresult get_channel_http_header(struct list *headers, const nsACString *header_name_str, nsACString *_retval)
Definition: nsio.c:352

◆ 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 }
#define WARN(fmt,...)
Definition: debug.h:112
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
#define NS_ERROR_UNEXPECTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
void nsACString_SetData(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:802

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define TRACE(s)
Definition: solgame.cpp:4
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
#define WARN(fmt,...)
Definition: debug.h:112
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 
1448  return NS_ERROR_NOT_IMPLEMENTED;
1449 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define strcmpiW(s1, s2)
Definition: unicode.h:39
static http_header_t * find_http_header(struct list *headers, const WCHAR *name, int len)
Definition: nsio.c:340
struct CFHEADER header
Definition: fdi.c:101

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 
1457  return NS_ERROR_NOT_IMPLEMENTED;
1458 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
REFIID riid
Definition: precomp.h:44
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_http_channel(nsChannel *This)
Definition: nsio.c:335
#define NS_NOINTERFACE
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
GLuint64EXT * result
Definition: glext.h:11304

◆ 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 
1466  return NS_ERROR_NOT_IMPLEMENTED;
1467 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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);
562  heap_free(This);
563  }
564 
565  return ref;
566 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
static void free_http_headers(struct list *list)
Definition: nsio.c:475
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 
1321  return NS_ERROR_NOT_IMPLEMENTED;
1322 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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);
1335  return NS_ERROR_NOT_IMPLEMENTED;
1336 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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)
841  return NS_ERROR_OUT_OF_MEMORY;
842 
843  heap_free(This->charset);
844  This->charset = charset;
845  return NS_OK;
846 }
CFF_Charset charset
Definition: cffcmap.c:138
UINT32 nsACString_GetData(const nsACString *, const char **) DECLSPEC_HIDDEN
Definition: nsembed.c:807
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define NS_ERROR_OUT_OF_MEMORY
static char * heap_strdupA(const char *str)
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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);
1152  return NS_ERROR_NOT_IMPLEMENTED;
1153 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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);
1166  return NS_ERROR_NOT_IMPLEMENTED;
1167 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ 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 }
UINT32 nsACString_GetData(const nsACString *, const char **) DECLSPEC_HIDDEN
Definition: nsembed.c:807
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define TRACE(s)
Definition: solgame.cpp:4
static BSTR content_type
static char * heap_strdupA(const char *str)
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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 
1353  return NS_ERROR_NOT_IMPLEMENTED;
1354 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
#define TRACE(s)
Definition: solgame.cpp:4

◆ 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);
1270  return NS_ERROR_NOT_IMPLEMENTED;
1271 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define TRACE(s)
Definition: solgame.cpp:4
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 }
#define strcasecmp
Definition: fake.h:9
UINT32 nsACString_GetData(const nsACString *, const char **) DECLSPEC_HIDDEN
Definition: nsembed.c:807
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define NS_OK
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
static const char * request_method_strings[]
Definition: nsio.c:32
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
method
Definition: dragdrop.c:53
#define ERR(fmt,...)
Definition: debug.h:110
#define NS_ERROR_UNEXPECTED

◆ 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 
1414  return NS_ERROR_NOT_IMPLEMENTED;
1415 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result)
Definition: _algo.c:1419
#define FIXME(fmt,...)
Definition: debug.h:111
static const char * debugstr_nsacstr(const nsACString *nsstr)
Definition: nsio.c:142
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 
1303  return NS_ERROR_NOT_IMPLEMENTED;
1304 }
static nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ 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 nsChannel * impl_from_nsIHttpChannel(nsIHttpChannel *iface)
Definition: nsio.c:487
static nsresult visit_http_headers(struct list *headers, nsIHttpHeaderVisitor *visitor)
Definition: nsio.c:443
#define TRACE(s)
Definition: solgame.cpp:4

◆ nsFileURL_GetFile()

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

Definition at line 3032 of file nsio.c.

3033 {
3035  WCHAR path[MAX_PATH];
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 WARN(fmt,...)
Definition: debug.h:112
nsresult create_nsfile(const PRUnichar *, nsIFile **) DECLSPEC_HIDDEN
Definition: nsembed.c:72
Definition: nsio.c:34
#define NS_ERROR_FAILURE
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD_PTR dwReserved)
Definition: uri.c:7247
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);
3054  return NS_ERROR_NOT_IMPLEMENTED;
3055 }
Definition: nsio.c:34
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsWineURI * impl_from_nsIFileURL(nsIFileURL *iface)
Definition: nsio.c:2047

◆ 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);
1861  return NS_ERROR_NOT_IMPLEMENTED;
1862 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
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 }
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ nsHttpChannelInternal_ContinueBeginConnect()

static nsresult NSAPI nsHttpChannelInternal_ContinueBeginConnect ( nsIHttpChannelInternal iface)
static

Definition at line 1931 of file nsio.c.

1932 {
1934  FIXME("(%p)\n", This);
1935  return NS_ERROR_NOT_IMPLEMENTED;
1936 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ nsHttpChannelInternal_ForceNoIntercept()

static nsresult NSAPI nsHttpChannelInternal_ForceNoIntercept ( nsIHttpChannelInternal iface)
static

Definition at line 1871 of file nsio.c.

1872 {
1874  FIXME("(%p)\n", This);
1875  return NS_ERROR_NOT_IMPLEMENTED;
1876 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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);
1847  return NS_ERROR_NOT_IMPLEMENTED;
1848 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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);
1810  return NS_ERROR_NOT_IMPLEMENTED;
1811 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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);
1840  return NS_ERROR_NOT_IMPLEMENTED;
1841 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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 
1732  return NS_ERROR_NOT_IMPLEMENTED;
1733 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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 
1741  return NS_ERROR_NOT_IMPLEMENTED;
1742 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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);
1883  return NS_ERROR_NOT_IMPLEMENTED;
1884 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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);
1898  return NS_ERROR_NOT_IMPLEMENTED;
1899 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED
static nsChannel * impl_from_nsIHttpChannelInternal(nsIHttpChannelInternal *iface)
Definition: nsio.c:1621

◆ 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 
1651  return NS_ERROR_NOT_IMPLEMENTED;
1652 }
#define FIXME(fmt,...)
Definition: debug.h:111