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

Go to the source code of this file.

Classes

struct  nsWineURI
 
struct  start_binding_task_t
 
struct  nsProtocolHandler
 

Macros

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

Functions

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

Variables

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

Macro Definition Documentation

◆ NS_IOSERVICE_CLASSNAME

#define NS_IOSERVICE_CLASSNAME   "nsIOService"

Definition at line 21 of file nsio.c.

◆ NS_IOSERVICE_CONTRACTID

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

Definition at line 22 of file nsio.c.

◆ X

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

Function Documentation

◆ async_open()

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

Definition at line 993 of file nsio.c.

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

Referenced by nsChannel_AsyncOpen().

◆ before_async_open()

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

Definition at line 222 of file nsio.c.

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

Referenced by nsChannel_AsyncOpen().

◆ combine_url()

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

Definition at line 123 of file nsio.c.

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

Referenced by nsIOService_NewURI(), and nsURI_Resolve().

◆ compare_ignoring_frag()

static BOOL compare_ignoring_frag ( IUri uri1,
IUri uri2 
)
static

Definition at line 104 of file nsio.c.

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

Referenced by nsURI_EqualsExceptRef().

◆ create_doc_uri()

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

Definition at line 3210 of file nsio.c.

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

Referenced by navigate_uri(), and set_moniker().

◆ create_nschannel()

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

Definition at line 3225 of file nsio.c.

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

Referenced by create_redirect_nschannel(), and new_channel_from_uri().

◆ create_nsuri()

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

Definition at line 3172 of file nsio.c.

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

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

◆ create_redirect_nschannel()

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

Definition at line 3251 of file nsio.c.

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

Referenced by handle_redirect().

◆ debugstr_nsacstr()

◆ debugstr_protocol_flags()

static const char * debugstr_protocol_flags ( UINT32  flags)
static

Definition at line 3804 of file nsio.c.

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

Referenced by nsNetUtil_ProtocolHasFlags(), and nsNetUtil_URIChainHasFlags().

◆ ensure_uri()

static BOOL ensure_uri ( nsWineURI This)
static

Definition at line 51 of file nsio.c.

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

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

◆ ensure_uri_builder()

static BOOL ensure_uri_builder ( nsWineURI This)
static

Definition at line 1997 of file nsio.c.

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

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

◆ exec_shldocvw_67()

static BOOL exec_shldocvw_67 ( HTMLDocumentObj doc,
BSTR  url 
)
static

Definition at line 196 of file nsio.c.

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

Referenced by before_async_open().

◆ find_http_header()

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

Definition at line 340 of file nsio.c.

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

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

◆ free_http_headers()

static void free_http_headers ( struct list list)
static

Definition at line 475 of file nsio.c.

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

Referenced by nsChannel_Release().

◆ get_channel_http_header()

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

Definition at line 352 of file nsio.c.

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

Referenced by nsChannel_GetRequestHeader(), and nsChannel_GetResponseHeader().

◆ get_channel_window()

static HTMLOuterWindow * get_channel_window ( nsChannel This)
static

Definition at line 922 of file nsio.c.

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

Referenced by nsChannel_AsyncOpen().

◆ get_uri_nofrag()

IUri * get_uri_nofrag ( IUri uri)

Definition at line 77 of file nsio.c.

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

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

◆ get_uri_path()

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

Definition at line 2897 of file nsio.c.

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

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

◆ get_uri_string()

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

Definition at line 2021 of file nsio.c.

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

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

◆ get_window_from_load_group()

static HTMLOuterWindow * get_window_from_load_group ( nsChannel This)
static

Definition at line 875 of file nsio.c.

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

Referenced by nsChannel_AsyncOpen().

◆ impl_from_nsIFileURL()

◆ impl_from_nsIHttpChannel()

static nsChannel * impl_from_nsIHttpChannel ( nsIHttpChannel iface)
inlinestatic

Definition at line 487 of file nsio.c.

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

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

◆ impl_from_nsIHttpChannelInternal()

static nsChannel * impl_from_nsIHttpChannelInternal ( nsIHttpChannelInternal iface)
inlinestatic

Definition at line 1621 of file nsio.c.

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

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

◆ impl_from_nsIProtocolHandler()

◆ impl_from_nsIStandardURL()

static nsWineURI * impl_from_nsIStandardURL ( nsIStandardURL iface)
inlinestatic

◆ impl_from_nsIUploadChannel()

static nsChannel * impl_from_nsIUploadChannel ( nsIUploadChannel iface)
inlinestatic

◆ init_nsio()

void init_nsio ( nsIComponentManager component_manager,
nsIComponentRegistrar registrar 
)

Definition at line 4048 of file nsio.c.

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

Referenced by init_xpcom().

◆ invalidate_uri()

static void invalidate_uri ( nsWineURI This)
static

Definition at line 1989 of file nsio.c.

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

Referenced by ensure_uri_builder(), and nsURI_SetSpec().

◆ is_gecko_special_uri()

static BOOL is_gecko_special_uri ( const char spec)
static

Definition at line 3525 of file nsio.c.

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

Referenced by nsIOService_NewURI().

◆ is_http_channel()

static BOOL is_http_channel ( nsChannel This)
inlinestatic

Definition at line 335 of file nsio.c.

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

Referenced by nsChannel_QueryInterface().

◆ load_nsuri()

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

Definition at line 250 of file nsio.c.

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

Referenced by navigate_uri(), and set_moniker().

◆ new_channel_from_uri()

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

Definition at line 3625 of file nsio.c.

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

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

◆ nsChannel_AddRef()

static nsrefcnt NSAPI nsChannel_AddRef ( nsIHttpChannel iface)
static

Definition at line 527 of file nsio.c.

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

◆ nsChannel_AsyncOpen()

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

Definition at line 1042 of file nsio.c.

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

◆ nsChannel_Cancel()

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

Definition at line 595 of file nsio.c.

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

◆ nsChannel_GetAllowPipelining()

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

Definition at line 1306 of file nsio.c.

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

◆ nsChannel_GetAllowTLS()

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

Definition at line 1324 of file nsio.c.

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

◆ nsChannel_GetContentCharset()

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

Definition at line 813 of file nsio.c.

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

◆ nsChannel_GetContentDisposition()

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

Definition at line 1141 of file nsio.c.

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

◆ nsChannel_GetContentDispositionFilename()

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

Definition at line 1155 of file nsio.c.

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

◆ nsChannel_GetContentDispositionHeader()

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

Definition at line 1169 of file nsio.c.

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

◆ nsChannel_GetContentLength()

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

Definition at line 848 of file nsio.c.

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

◆ nsChannel_GetContentType()

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

Definition at line 777 of file nsio.c.

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

◆ nsChannel_GetLoadFlags()

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

Definition at line 650 of file nsio.c.

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

◆ nsChannel_GetLoadGroup()

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

Definition at line 622 of file nsio.c.

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

◆ nsChannel_GetLoadInfo()

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

Definition at line 1176 of file nsio.c.

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

◆ nsChannel_GetName()

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

Definition at line 568 of file nsio.c.

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

◆ nsChannel_GetNotificationCallbacks()

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

Definition at line 737 of file nsio.c.

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

◆ nsChannel_GetOriginalURI()

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

Definition at line 670 of file nsio.c.

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

◆ nsChannel_GetOwner()

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

Definition at line 709 of file nsio.c.

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

◆ nsChannel_GetRedirectionLimit()

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

Definition at line 1338 of file nsio.c.

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

◆ nsChannel_GetReferrer()

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

Definition at line 1233 of file nsio.c.

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

◆ nsChannel_GetReferrerPolicy()

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

Definition at line 1259 of file nsio.c.

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

◆ nsChannel_GetRequestHeader()

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

Definition at line 1273 of file nsio.c.

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

◆ nsChannel_GetRequestMethod()

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

Definition at line 1202 of file nsio.c.

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

◆ nsChannel_GetRequestSucceeded()

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

Definition at line 1382 of file nsio.c.

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

◆ nsChannel_GetResponseHeader()

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

Definition at line 1397 of file nsio.c.

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

◆ nsChannel_GetResponseStatus()

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

Definition at line 1356 of file nsio.c.

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

◆ nsChannel_GetResponseStatusText()

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

Definition at line 1371 of file nsio.c.

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

◆ nsChannel_GetSecurityInfo()

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

Definition at line 768 of file nsio.c.

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

◆ nsChannel_GetStatus()

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

Definition at line 586 of file nsio.c.

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

◆ nsChannel_GetURI()

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

Definition at line 697 of file nsio.c.

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

◆ nsChannel_IsNoCacheResponse()

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

Definition at line 1442 of file nsio.c.

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

◆ nsChannel_IsNoStoreResponse()

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

Definition at line 1427 of file nsio.c.

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

◆ nsChannel_IsPending()

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

Definition at line 577 of file nsio.c.

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

◆ nsChannel_IsPrivateResponse()

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

Definition at line 1451 of file nsio.c.

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

◆ nsChannel_Open()

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

Definition at line 866 of file nsio.c.

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

◆ nsChannel_QueryInterface()

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

Definition at line 492 of file nsio.c.

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

◆ nsChannel_RedirectTo()

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

Definition at line 1460 of file nsio.c.

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

◆ nsChannel_Release()

static nsrefcnt NSAPI nsChannel_Release ( nsIHttpChannel iface)
static

Definition at line 537 of file nsio.c.

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

◆ nsChannel_Resume()

static nsresult NSAPI nsChannel_Resume ( nsIHttpChannel iface)
static

Definition at line 613 of file nsio.c.

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

◆ nsChannel_SetAllowPipelining()

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

Definition at line 1315 of file nsio.c.

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

◆ nsChannel_SetAllowTLS()

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

Definition at line 1331 of file nsio.c.

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

◆ nsChannel_SetContentCharset()

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

Definition at line 829 of file nsio.c.

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

◆ nsChannel_SetContentDisposition()

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

Definition at line 1148 of file nsio.c.

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

◆ nsChannel_SetContentDispositionFilename()

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

Definition at line 1162 of file nsio.c.

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

◆ nsChannel_SetContentLength()

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

Definition at line 857 of file nsio.c.

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

◆ nsChannel_SetContentType()

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

Definition at line 798 of file nsio.c.

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

◆ nsChannel_SetLoadFlags()

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

Definition at line 660 of file nsio.c.

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

◆ nsChannel_SetLoadGroup()

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

Definition at line 635 of file nsio.c.

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

◆ nsChannel_SetLoadInfo()

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

Definition at line 1188 of file nsio.c.

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

◆ nsChannel_SetNotificationCallbacks()

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

Definition at line 751 of file nsio.c.

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

◆ nsChannel_SetOriginalURI()

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

Definition at line 683 of file nsio.c.

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

◆ nsChannel_SetOwner()

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

Definition at line 722 of file nsio.c.

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

◆ nsChannel_SetRedirectionLimit()

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

Definition at line 1347 of file nsio.c.

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

◆ nsChannel_SetReferrer()

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

Definition at line 1245 of file nsio.c.

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

◆ nsChannel_SetReferrerWithPolicy()

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

Definition at line 1266 of file nsio.c.

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

◆ nsChannel_SetRequestHeader()

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

Definition at line 1283 of file nsio.c.

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

◆ nsChannel_SetRequestMethod()

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

Definition at line 1212 of file nsio.c.

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

◆ nsChannel_SetResponseHeader()

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

Definition at line 1407 of file nsio.c.

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

◆ nsChannel_Suspend()

static nsresult NSAPI nsChannel_Suspend ( nsIHttpChannel iface)
static

Definition at line 604 of file nsio.c.

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

◆ nsChannel_VisitRequestHeaders()

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

Definition at line 1296 of file nsio.c.

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

◆ nsChannel_VisitResponseHeaders()

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

Definition at line 1417 of file nsio.c.

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

◆ nsFileURL_GetFile()

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

Definition at line 3032 of file nsio.c.

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

◆ nsFileURL_SetFile()

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

Definition at line 3050 of file nsio.c.

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

◆ nsHttpChannelInternal_AddRedirect()

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

Definition at line 1857 of file nsio.c.

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

◆ nsHttpChannelInternal_AddRef()

static nsrefcnt NSAPI nsHttpChannelInternal_AddRef ( nsIHttpChannelInternal iface)
static

Definition at line 1633 of file nsio.c.

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

◆ nsHttpChannelInternal_ContinueBeginConnect()

static nsresult NSAPI nsHttpChannelInternal_ContinueBeginConnect ( nsIHttpChannelInternal iface)
static

Definition at line 1931 of file nsio.c.

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

◆ nsHttpChannelInternal_ForceNoIntercept()

static nsresult NSAPI nsHttpChannelInternal_ForceNoIntercept ( nsIHttpChannelInternal iface)
static

Definition at line 1871 of file nsio.c.

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

◆ nsHttpChannelInternal_GetAllowAltSvc()

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

Definition at line 1843 of file nsio.c.

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

◆ nsHttpChannelInternal_GetAllowSpdy()

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

Definition at line 1806 of file nsio.c.

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

◆ nsHttpChannelInternal_GetApiRedirectToURI()

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

Definition at line 1836 of file nsio.c.

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

◆ nsHttpChannelInternal_GetCanceled()

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

Definition at line 1726 of file nsio.c.

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

◆ nsHttpChannelInternal_GetChannelIsForDownload()

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

Definition at line 1735 of file nsio.c.

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

◆ nsHttpChannelInternal_GetCorsIncludeCredentials()

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

Definition at line 1878 of file nsio.c.

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

◆ nsHttpChannelInternal_GetCorsMode()

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

Definition at line 1894 of file nsio.c.

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

◆ nsHttpChannelInternal_GetDocumentURI()

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

Definition at line 1645 of file nsio.c.

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

◆ nsHttpChannelInternal_GetForceAllowThirdPartyCookie()

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

Definition at line 1708 of file nsio.c.

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

◆ nsHttpChannelInternal_GetLastModifiedTime()

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

Definition at line 1864 of file nsio.c.

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

◆ nsHttpChannelInternal_GetLocalAddress()

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

Definition at line 1753 of file nsio.c.

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

◆ nsHttpChannelInternal_GetLocalPort()

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

Definition at line 1762 of file nsio.c.

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

◆ nsHttpChannelInternal_GetNetworkInterfaceId()

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

Definition at line 1915 of file nsio.c.

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

◆ nsHttpChannelInternal_GetProxyURI()

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

Definition at line 1938 of file nsio.c.

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

◆ nsHttpChannelInternal_GetRemoteAddress()

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

Definition at line 1771 of file nsio.c.

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

◆ nsHttpChannelInternal_GetRemotePort()

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

Definition at line 1780 of file nsio.c.

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

◆ nsHttpChannelInternal_GetRequestVersion()

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

Definition at line 1663 of file nsio.c.

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

◆ nsHttpChannelInternal_GetResponseTimeoutEnabled()

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

Definition at line 1820 of file nsio.c.

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

◆ nsHttpChannelInternal_GetResponseVersion()

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

Definition at line 1672 of file nsio.c.

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

◆ nsHttpChannelInternal_GetTopWindowURI()

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

Definition at line 1908 of file nsio.c.

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

◆ nsHttpChannelInternal_HTTPUpgrade()

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

Definition at line 1798 of file nsio.c.

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

◆ nsHttpChannelInternal_QueryInterface()

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

Definition at line 1626 of file nsio.c.

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

◆ nsHttpChannelInternal_Release()

static nsrefcnt NSAPI nsHttpChannelInternal_Release ( nsIHttpChannelInternal iface)
static

Definition at line 1639 of file nsio.c.

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

◆ nsHttpChannelInternal_SetAllowAltSvc()

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

Definition at line 1850 of file nsio.c.

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

◆ nsHttpChannelInternal_SetAllowSpdy()

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

Definition at line 1813 of file nsio.c.

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

◆ nsHttpChannelInternal_SetCacheKeysRedirectChain()

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

Definition at line 1789 of file nsio.c.

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

◆ nsHttpChannelInternal_SetChannelIsForDownload()

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

Definition at line 1744 of file nsio.c.

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

◆ nsHttpChannelInternal_SetCookie()

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

Definition at line 1690 of file nsio.c.

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

◆ nsHttpChannelInternal_SetCorsIncludeCredentials()

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

Definition at line 1886 of file nsio.c.

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

◆ nsHttpChannelInternal_SetCorsMode()

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

Definition at line 1901 of file nsio.c.

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

◆ nsHttpChannelInternal_SetDocumentURI()

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

Definition at line 1654 of file nsio.c.

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

◆ nsHttpChannelInternal_SetForceAllowThirdPartyCookie()

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

Definition at line 1717 of file nsio.c.

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

◆ nsHttpChannelInternal_SetNetworkInterfaceId()

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

Definition at line 1923 of file nsio.c.

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

◆ nsHttpChannelInternal_SetResponseTimeoutEnabled()

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

Definition at line 1828 of file nsio.c.

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

◆ nsHttpChannelInternal_SetupFallbackChannel()

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

Definition at line 1699 of file nsio.c.

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

◆ nsHttpChannelInternal_TakeAllSecurityMessages()

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

Definition at line 1681 of file nsio.c.

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

◆ nsIOService_AddRef()

static nsrefcnt NSAPI nsIOService_AddRef ( nsIIOService iface)
static

Definition at line 3470 of file nsio.c.

3471{
3472 return 2;
3473}

◆ nsIOService_AllowPort()

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

Definition at line 3741 of file nsio.c.

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

◆ nsIOService_ExtractScheme()

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

Definition at line 3748 of file nsio.c.

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

◆ nsIOService_GetAppOfflineState()

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

Definition at line 3735 of file nsio.c.

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

◆ nsIOService_GetConnectivity()

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

Definition at line 3717 of file nsio.c.

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

◆ nsIOService_GetOffline()

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

Definition at line 3705 of file nsio.c.

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

◆ nsIOService_GetProtocolFlags()

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

Definition at line 3518 of file nsio.c.

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

◆ nsIOService_GetProtocolHandler()

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

Definition at line 3480 of file nsio.c.

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

◆ nsIOService_IsAppOffline()

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

Definition at line 3729 of file nsio.c.

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

◆ nsIOService_NewChannel()

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

Definition at line 3698 of file nsio.c.

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

◆ nsIOService_NewChannel2()

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

Definition at line 3688 of file nsio.c.

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

◆ nsIOService_NewChannelFromURI()

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

Definition at line 3681 of file nsio.c.

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

◆ nsIOService_NewChannelFromURI2()

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

Definition at line 3652 of file nsio.c.

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

◆ nsIOService_NewChannelFromURIWithLoadInfo()

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

Definition at line 3674 of file nsio.c.

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

◆ nsIOService_NewFileURI()

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

Definition at line 3618 of file nsio.c.

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

◆ nsIOService_NewURI()

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

Definition at line 3545 of file nsio.c.

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

◆ nsIOService_QueryInterface()

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

Definition at line 3917 of file nsio.c.

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

◆ nsIOService_Release()

static nsrefcnt NSAPI nsIOService_Release ( nsIIOService iface)
static

Definition at line 3475 of file nsio.c.

3476{
3477 return 1;
3478}

◆ nsIOService_SetAppOffline()

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

Definition at line 3723 of file nsio.c.

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

◆ nsIOService_SetOffline()

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

Definition at line 3711 of file nsio.c.

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

◆ nsIOServiceFactory_AddRef()

static nsrefcnt NSAPI nsIOServiceFactory_AddRef ( nsIFactory iface)
static

Definition at line 3960 of file nsio.c.

3961{
3962 return 2;
3963}

◆ nsIOServiceFactory_CreateInstance()

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

Definition at line 3970 of file nsio.c.

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

◆ nsIOServiceFactory_LockFactory()

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

Definition at line 3976 of file nsio.c.

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

◆ nsIOServiceFactory_QueryInterface()

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

Definition at line 3938 of file nsio.c.

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

◆ nsIOServiceFactory_Release()

static nsrefcnt NSAPI nsIOServiceFactory_Release ( nsIFactory iface)
static

Definition at line 3965 of file nsio.c.

3966{
3967 return 1;
3968}

◆ nsNetUtil_AddRef()

static nsrefcnt NSAPI nsNetUtil_AddRef ( nsINetUtil iface)
static

Definition at line 3786 of file nsio.c.

3787{
3788 return 2;
3789}

◆ nsNetUtil_EscapeString()

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

Definition at line 3867 of file nsio.c.

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

◆ nsNetUtil_EscapeURL()

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

Definition at line 3875 of file nsio.c.

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

◆ nsNetUtil_ExtractCharsetFromContentType()

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

Definition at line 3891 of file nsio.c.

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

◆ nsNetUtil_NewSimpleNestedURI()

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

Definition at line 3860 of file nsio.c.

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

◆ nsNetUtil_ParseContentType()

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

Definition at line 3796 of file nsio.c.

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

◆ nsNetUtil_ProtocolHasFlags()

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

Definition at line 3834 of file nsio.c.

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

◆ nsNetUtil_QueryInterface()

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

Definition at line 3780 of file nsio.c.

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

◆ nsNetUtil_Release()

static nsrefcnt NSAPI nsNetUtil_Release ( nsINetUtil iface)
static

Definition at line 3791 of file nsio.c.

3792{
3793 return 1;
3794}

◆ nsNetUtil_ToImmutableURI()

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

Definition at line 3853 of file nsio.c.

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

◆ nsNetUtil_UnescapeString()

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

Definition at line 3883 of file nsio.c.

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

◆ nsNetUtil_URIChainHasFlags()

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

Definition at line 3841 of file nsio.c.

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

◆ nsProtocolHandler_AddRef()

static nsrefcnt NSAPI nsProtocolHandler_AddRef ( nsIProtocolHandler iface)
static

Definition at line 3345 of file nsio.c.

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

◆ nsProtocolHandler_AllowPort()

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

Definition at line 3443 of file nsio.c.

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

◆ nsProtocolHandler_GetDefaultPort()

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

Definition at line 3382 of file nsio.c.

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

◆ nsProtocolHandler_GetProtocolFlags()

static nsresult NSAPI nsProtocolHandler_GetProtocolFlags ( nsIProtocolHandler iface,
UINT32 aProtocolFlags 
)
static

Definition at line 3394 of file nsio.c.

3396{
3398
3399 TRACE("(%p)->(%p)\n", This, aProtocolFlags);
3400
3401 if(This->nshandler)
3402 return nsIProtocolHandler_GetProtocolFlags(This->nshandler, aProtocolFlags);
3404}

◆ nsProtocolHandler_GetScheme()

static nsresult NSAPI nsProtocolHandler_GetScheme ( nsIProtocolHandler iface,
nsACString aScheme 
)
static

Definition at line 3371 of file nsio.c.

3372{
3374
3375 TRACE("(%p)->(%p)\n", This, aScheme);
3376
3377 if(This->nshandler)
3378 return nsIProtocolHandler_GetScheme(This->nshandler, aScheme);
3380}

◆ nsProtocolHandler_NewChannel()

static nsresult NSAPI nsProtocolHandler_NewChannel ( nsIProtocolHandler iface,
nsIURI aURI,
nsIChannel **  _retval 
)
static

Definition at line 3431 of file nsio.c.

3433{
3435
3436 TRACE("(%p)->(%p %p)\n", This, aURI, _retval);
3437
3438 if(This->nshandler)
3439 return nsIProtocolHandler_NewChannel(This->nshandler, aURI, _retval);
3441}

◆ nsProtocolHandler_NewChannel2()

static nsresult NSAPI nsProtocolHandler_NewChannel2 ( nsIProtocolHandler iface,
nsIURI aURI,
nsILoadInfo aLoadInfo,
nsIChannel **  _retval 
)
static

Definition at line 3419 of file nsio.c.

3421{
3423
3424 TRACE("(%p)->(%p %p %p)\n", This, aURI, aLoadInfo, _retval);
3425
3426 if(This->nshandler)
3427 return nsIProtocolHandler_NewChannel2(This->nshandler, aURI, aLoadInfo, _retval);
3429}

◆ nsProtocolHandler_NewURI()

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

Definition at line 3406 of file nsio.c.

3408{
3410
3411 TRACE("((%p)->%s %s %p %p)\n", This, debugstr_nsacstr(aSpec), debugstr_a(aOriginCharset),
3412 aBaseURI, _retval);
3413
3414 if(This->nshandler)
3415 return nsIProtocolHandler_NewURI(This->nshandler, aSpec, aOriginCharset, aBaseURI, _retval);
3417}

◆ nsProtocolHandler_QueryInterface()

static nsresult NSAPI nsProtocolHandler_QueryInterface ( nsIProtocolHandler iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 3318 of file nsio.c.

3320{
3322
3323 *result = NULL;
3324
3325 if(IsEqualGUID(&IID_nsISupports, riid)) {
3326 TRACE("(%p)->(IID_nsISupports %p)\n", This, result);
3327 *result = &This->nsIProtocolHandler_iface;
3328 }else if(IsEqualGUID(&IID_nsIProtocolHandler, riid)) {
3329 TRACE("(%p)->(IID_nsIProtocolHandler %p)\n", This, result);
3330 *result = &This->nsIProtocolHandler_iface;
3331 }else if(IsEqualGUID(&IID_nsIExternalProtocolHandler, riid)) {
3332 TRACE("(%p)->(IID_nsIExternalProtocolHandler %p), returning NULL\n", This, result);
3333 return NS_NOINTERFACE;
3334 }
3335
3336 if(*result) {
3337 nsISupports_AddRef((nsISupports*)*result);
3338 return NS_OK;
3339 }
3340
3341 WARN("(%s %p)\n", debugstr_guid(riid), result);
3342 return NS_NOINTERFACE;
3343}

◆ nsProtocolHandler_Release()

static nsrefcnt NSAPI nsProtocolHandler_Release ( nsIProtocolHandler iface)
static

Definition at line 3355 of file nsio.c.

3356{
3359
3360 TRACE("(%p) ref=%d\n", This, ref);
3361
3362 if(!ref) {
3363 if(This->nshandler)
3364 nsIProtocolHandler_Release(This->nshandler);
3365 heap_free(This);
3366 }
3367
3368 return ref;
3369}

◆ nsStandardURL_AddRef()

static nsrefcnt NSAPI nsStandardURL_AddRef ( nsIStandardURL iface)
static

Definition at line 3123 of file nsio.c.

3124{
3126 return nsIFileURL_AddRef(&This->nsIFileURL_iface);
3127}
static nsWineURI * impl_from_nsIStandardURL(nsIStandardURL *iface)
Definition: nsio.c:3111

◆ nsStandardURL_GetMutable()

static nsresult NSAPI nsStandardURL_GetMutable ( nsIStandardURL iface,
cpp_bool aMutable 
)
static

Definition at line 3135 of file nsio.c.

3136{
3138
3139 TRACE("(%p)->(%p)\n", This, aMutable);
3140
3141 *aMutable = This->is_mutable;
3142 return NS_OK;
3143}

◆ nsStandardURL_Init()

static nsresult NSAPI nsStandardURL_Init ( nsIStandardURL iface,
UINT32  aUrlType,
LONG  aDefaultPort,
const nsACString aSpec,
const char aOriginCharset,
nsIURI aBaseURI 
)
static

Definition at line 3155 of file nsio.c.

3157{
3159 FIXME("(%p)->(%d %d %s %s %p)\n", This, aUrlType, aDefaultPort, debugstr_nsacstr(aSpec), debugstr_a(aOriginCharset), aBaseURI);
3161}

◆ nsStandardURL_QueryInterface()

static nsresult NSAPI nsStandardURL_QueryInterface ( nsIStandardURL iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 3116 of file nsio.c.

3118{
3120 return nsIFileURL_QueryInterface(&This->nsIFileURL_iface, riid, result);
3121}

◆ nsStandardURL_Release()

static nsrefcnt NSAPI nsStandardURL_Release ( nsIStandardURL iface)
static

Definition at line 3129 of file nsio.c.

3130{
3132 return nsIFileURL_Release(&This->nsIFileURL_iface);
3133}

◆ nsStandardURL_SetMutable()

static nsresult NSAPI nsStandardURL_SetMutable ( nsIStandardURL iface,
cpp_bool  aMutable 
)
static

Definition at line 3145 of file nsio.c.

3146{
3148
3149 TRACE("(%p)->(%x)\n", This, aMutable);
3150
3151 This->is_mutable = aMutable;
3152 return NS_OK;
3153}

◆ nsUploadChannel_AddRef()

static nsrefcnt NSAPI nsUploadChannel_AddRef ( nsIUploadChannel iface)
static

Definition at line 1545 of file nsio.c.

1546{
1548 return nsIHttpChannel_AddRef(&This->nsIHttpChannel_iface);
1549}
static nsChannel * impl_from_nsIUploadChannel(nsIUploadChannel *iface)
Definition: nsio.c:1533

◆ nsUploadChannel_GetUploadStream()

static nsresult NSAPI nsUploadChannel_GetUploadStream ( nsIUploadChannel iface,
nsIInputStream **  aUploadStream 
)
static

Definition at line 1599 of file nsio.c.

1601{
1603
1604 TRACE("(%p)->(%p)\n", This, aUploadStream);
1605
1606 if(This->post_data_stream)
1607 nsIInputStream_AddRef(This->post_data_stream);
1608
1609 *aUploadStream = This->post_data_stream;
1610 return NS_OK;
1611}

◆ nsUploadChannel_QueryInterface()

static nsresult NSAPI nsUploadChannel_QueryInterface ( nsIUploadChannel iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1538 of file nsio.c.

1540{
1542 return nsIHttpChannel_QueryInterface(&This->nsIHttpChannel_iface, riid, result);
1543}

◆ nsUploadChannel_Release()

static nsrefcnt NSAPI nsUploadChannel_Release ( nsIUploadChannel iface)
static

Definition at line 1551 of file nsio.c.

1552{
1554 return nsIHttpChannel_Release(&This->nsIHttpChannel_iface);
1555}

◆ nsUploadChannel_SetUploadStream()

static nsresult NSAPI nsUploadChannel_SetUploadStream ( nsIUploadChannel iface,
nsIInputStream aStream,
const nsACString aContentType,
INT64  aContentLength 
)
static

Definition at line 1557 of file nsio.c.

1559{
1561 const char *content_type;
1562
1563 static const WCHAR content_typeW[] =
1564 {'C','o','n','t','e','n','t','-','T','y','p','e',0};
1565
1566 TRACE("(%p)->(%p %s %s)\n", This, aStream, debugstr_nsacstr(aContentType), wine_dbgstr_longlong(aContentLength));
1567
1568 This->post_data_contains_headers = TRUE;
1569
1570 if(aContentType) {
1571 nsACString_GetData(aContentType, &content_type);
1572 if(*content_type) {
1573 WCHAR *ct;
1574
1576 if(!ct)
1577 return NS_ERROR_UNEXPECTED;
1578
1579 set_http_header(&This->request_headers, content_typeW,
1580 sizeof(content_typeW)/sizeof(WCHAR), ct, strlenW(ct));
1581 heap_free(ct);
1582 This->post_data_contains_headers = FALSE;
1583 }
1584 }
1585
1586 if(aContentLength != -1)
1587 FIXME("Unsupported acontentLength = %s\n", wine_dbgstr_longlong(aContentLength));
1588
1589 if(This->post_data_stream)
1590 nsIInputStream_Release(This->post_data_stream);
1591 This->post_data_stream = aStream;
1592 if(aStream)
1593 nsIInputStream_AddRef(aStream);
1594
1595 This->request_method = METHOD_POST;
1596 return NS_OK;
1597}
HRESULT set_http_header(struct list *headers, const WCHAR *name, int name_len, const WCHAR *value, int value_len)
Definition: nsio.c:380

◆ nsURI_AddRef()

static nsrefcnt NSAPI nsURI_AddRef ( nsIFileURL iface)
static

Definition at line 2090 of file nsio.c.

2091{
2094
2095 TRACE("(%p) ref=%d\n", This, ref);
2096
2097 return ref;
2098}

◆ nsURI_Clone()

static nsresult NSAPI nsURI_Clone ( nsIFileURL iface,
nsIURI **  _retval 
)
static

Definition at line 2600 of file nsio.c.

2601{
2603 nsWineURI *wine_uri;
2604 nsresult nsres;
2605
2606 TRACE("(%p)->(%p)\n", This, _retval);
2607
2608 if(!ensure_uri(This))
2609 return NS_ERROR_UNEXPECTED;
2610
2611 nsres = create_nsuri(This->uri, This->window_ref ? This->window_ref->window : NULL,
2612 This->container, This->origin_charset, &wine_uri);
2613 if(NS_FAILED(nsres)) {
2614 WARN("create_nsuri failed: %08x\n", nsres);
2615 return nsres;
2616 }
2617
2618 *_retval = (nsIURI*)&wine_uri->nsIFileURL_iface;
2619 return NS_OK;
2620}

◆ nsURI_CloneIgnoreRef()

static nsresult NSAPI nsURI_CloneIgnoreRef ( nsIFileURL iface,
nsIURI **  _retval 
)
static

Definition at line 2769 of file nsio.c.

2770{
2772 nsWineURI *wine_uri;
2773 IUri *uri;
2774 nsresult nsres;
2775
2776 TRACE("(%p)->(%p)\n", This, _retval);
2777
2778 if(!ensure_uri(This))
2779 return NS_ERROR_UNEXPECTED;
2780
2781 uri = get_uri_nofrag(This->uri);
2782 if(!uri)
2783 return NS_ERROR_FAILURE;
2784
2785 nsres = create_nsuri(uri, This->window_ref ? This->window_ref->window : NULL, This->container,
2786 This->origin_charset, &wine_uri);
2787 IUri_Release(uri);
2788 if(NS_FAILED(nsres)) {
2789 WARN("create_nsuri failed: %08x\n", nsres);
2790 return nsres;
2791 }
2792
2793 *_retval = (nsIURI*)&wine_uri->nsIFileURL_iface;
2794 return NS_OK;
2795}

◆ nsURI_Equals()

static nsresult NSAPI nsURI_Equals ( nsIFileURL iface,
nsIURI other,
cpp_bool _retval 
)
static

Definition at line 2544 of file nsio.c.

2545{
2547 nsWineURI *other_obj;
2548 nsresult nsres;
2549 HRESULT hres;
2550
2551 TRACE("(%p)->(%p %p)\n", This, other, _retval);
2552
2553 nsres = nsIURI_QueryInterface(other, &IID_nsWineURI, (void**)&other_obj);
2554 if(NS_FAILED(nsres)) {
2555 TRACE("Could not get nsWineURI interface\n");
2556 *_retval = FALSE;
2557 return NS_OK;
2558 }
2559
2560 if(ensure_uri(This) && ensure_uri(other_obj)) {
2561 BOOL b;
2562
2563 hres = IUri_IsEqual(This->uri, other_obj->uri, &b);
2564 if(SUCCEEDED(hres)) {
2565 *_retval = b;
2566 nsres = NS_OK;
2567 }else {
2568 nsres = NS_ERROR_FAILURE;
2569 }
2570 }else {
2571 nsres = NS_ERROR_UNEXPECTED;
2572 }
2573
2574 nsIFileURL_Release(&other_obj->nsIFileURL_iface);
2575 return nsres;
2576}
int other
Definition: msacm.c:1376

◆ nsURI_EqualsExceptRef()

static nsresult NSAPI nsURI_EqualsExceptRef ( nsIFileURL iface,
nsIURI other,
cpp_bool _retval 
)
static

Definition at line 2743 of file nsio.c.

2744{
2746 nsWineURI *other_obj;
2747 nsresult nsres;
2748
2749 TRACE("(%p)->(%p %p)\n", This, other, _retval);
2750
2751 nsres = nsIURI_QueryInterface(other, &IID_nsWineURI, (void**)&other_obj);
2752 if(NS_FAILED(nsres)) {
2753 TRACE("Could not get nsWineURI interface\n");
2754 *_retval = FALSE;
2755 return NS_OK;
2756 }
2757
2758 if(ensure_uri(This) && ensure_uri(other_obj)) {
2759 *_retval = compare_ignoring_frag(This->uri, other_obj->uri);
2760 nsres = NS_OK;
2761 }else {
2762 nsres = NS_ERROR_UNEXPECTED;
2763 }
2764
2765 nsIFileURL_Release(&other_obj->nsIFileURL_iface);
2766 return nsres;
2767}
static BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
Definition: nsio.c:104

◆ nsuri_get_uri()

IUri * nsuri_get_uri ( nsWineURI nsuri)

Definition at line 68 of file nsio.c.

69{
70 if(!ensure_uri(nsuri))
71 return NULL;
72
73 IUri_AddRef(nsuri->uri);
74 return nsuri->uri;
75}

Referenced by nsAsyncVerifyRedirectCallback_OnRedirectVerifyCallback().

◆ nsURI_GetAsciiHost()

static nsresult NSAPI nsURI_GetAsciiHost ( nsIFileURL iface,
nsACString aAsciiHost 
)
static

Definition at line 2673 of file nsio.c.

2674{
2676
2677 WARN("(%p)->(%p) FIXME: Use Uri_PUNYCODE_IDN_HOST flag\n", This, aAsciiHost);
2678
2679 return get_uri_string(This, Uri_PROPERTY_HOST, aAsciiHost);
2680}
static nsresult get_uri_string(nsWineURI *This, Uri_PROPERTY prop, nsACString *ret)
Definition: nsio.c:2021

◆ nsURI_GetAsciiSpec()

static nsresult NSAPI nsURI_GetAsciiSpec ( nsIFileURL iface,
nsACString aAsciiSpec 
)
static

Definition at line 2664 of file nsio.c.

2665{
2667
2668 TRACE("(%p)->(%p)\n", This, aAsciiSpec);
2669
2670 return nsIFileURL_GetSpec(&This->nsIFileURL_iface, aAsciiSpec);
2671}

◆ nsURI_GetHasRef()

static nsresult NSAPI nsURI_GetHasRef ( nsIFileURL iface,
cpp_bool aHasRef 
)
static

Definition at line 2806 of file nsio.c.

2807{
2809 BOOL b;
2810 HRESULT hres;
2811
2812 TRACE("(%p)->(%p)\n", This, aHasRef);
2813
2814 if(!ensure_uri(This))
2815 return NS_ERROR_UNEXPECTED;
2816
2817 hres = IUri_HasProperty(This->uri, Uri_PROPERTY_FRAGMENT, &b);
2818 if(FAILED(hres))
2819 return NS_ERROR_FAILURE;
2820
2821 *aHasRef = b;
2822 return NS_OK;
2823}

◆ nsURI_GetHost()

static nsresult NSAPI nsURI_GetHost ( nsIFileURL iface,
nsACString aHost 
)
static

Definition at line 2441 of file nsio.c.

2442{
2444
2445 TRACE("(%p)->(%p)\n", This, aHost);
2446
2447 return get_uri_string(This, Uri_PROPERTY_HOST, aHost);
2448}

◆ nsURI_GetHostPort()

static nsresult NSAPI nsURI_GetHostPort ( nsIFileURL iface,
nsACString aHostPort 
)
static

Definition at line 2397 of file nsio.c.

2398{
2400 const WCHAR *ptr;
2401 char *vala;
2402 BSTR val;
2403 HRESULT hres;
2404
2405 TRACE("(%p)->(%p)\n", This, aHostPort);
2406
2407 if(!ensure_uri(This))
2408 return NS_ERROR_UNEXPECTED;
2409
2410 hres = IUri_GetAuthority(This->uri, &val);
2411 if(FAILED(hres)) {
2412 WARN("GetAuthority failed: %08x\n", hres);
2413 return NS_ERROR_UNEXPECTED;
2414 }
2415
2416 ptr = strchrW(val, '@');
2417 if(!ptr)
2418 ptr = val;
2419
2420 vala = heap_strdupWtoU(ptr);
2422 if(!vala)
2424
2425 TRACE("ret %s\n", debugstr_a(vala));
2426 nsACString_SetData(aHostPort, vala);
2427 heap_free(vala);
2428 return NS_OK;
2429}
#define strchrW(s, c)
Definition: unicode.h:34

◆ nsURI_GetOriginCharset()

static nsresult NSAPI nsURI_GetOriginCharset ( nsIFileURL iface,
nsACString aOriginCharset 
)
static

Definition at line 2682 of file nsio.c.

2683{
2685
2686 TRACE("(%p)->(%p)\n", This, aOriginCharset);
2687
2688 nsACString_SetData(aOriginCharset, This->origin_charset);
2689 return NS_OK;
2690}

◆ nsURI_GetPassword()

static nsresult NSAPI nsURI_GetPassword ( nsIFileURL iface,
nsACString aPassword 
)
static

Definition at line 2363 of file nsio.c.

2364{
2366
2367 TRACE("(%p)->(%p)\n", This, aPassword);
2368
2369 return get_uri_string(This, Uri_PROPERTY_PASSWORD, aPassword);
2370}

◆ nsURI_GetPath()

static nsresult NSAPI nsURI_GetPath ( nsIFileURL iface,
nsACString aPath 
)
static

Definition at line 2510 of file nsio.c.

2511{
2513
2514 TRACE("(%p)->(%p)\n", This, aPath);
2515
2516 return get_uri_string(This, Uri_PROPERTY_PATH, aPath);
2517}

◆ nsURI_GetPort()

static nsresult NSAPI nsURI_GetPort ( nsIFileURL iface,
LONG aPort 
)
static

Definition at line 2475 of file nsio.c.

2476{
2478 DWORD port;
2479 HRESULT hres;
2480
2481 TRACE("(%p)->(%p)\n", This, aPort);
2482
2483 if(!ensure_uri(This))
2484 return NS_ERROR_UNEXPECTED;
2485
2486 hres = IUri_GetPort(This->uri, &port);
2487 if(FAILED(hres)) {
2488 WARN("GetPort failed: %08x\n", hres);
2489 return NS_ERROR_UNEXPECTED;
2490 }
2491
2492 *aPort = port ? port : -1;
2493 return NS_OK;
2494}

◆ nsURI_GetPrePath()

static nsresult NSAPI nsURI_GetPrePath ( nsIFileURL iface,
nsACString aPrePath 
)
static

Definition at line 2165 of file nsio.c.

2166{
2168 IUriBuilder *uri_builder;
2169 BSTR display_uri;
2170 IUri *uri;
2171 int len;
2172 nsresult nsres;
2173 HRESULT hres;
2174
2175 TRACE("(%p)->(%p)\n", This, aPrePath);
2176
2177 if(!ensure_uri(This))
2178 return NS_ERROR_UNEXPECTED;
2179
2180 hres = CreateIUriBuilder(This->uri, 0, 0, &uri_builder);
2181 if(FAILED(hres))
2182 return NS_ERROR_FAILURE;
2183
2184 hres = IUriBuilder_RemoveProperties(uri_builder, Uri_HAS_PATH|Uri_HAS_QUERY|Uri_HAS_FRAGMENT);
2185 if(SUCCEEDED(hres))
2186 hres = IUriBuilder_CreateUriSimple(uri_builder, 0, 0, &uri);
2187 IUriBuilder_Release(uri_builder);
2188 if(FAILED(hres))
2189 return NS_ERROR_FAILURE;
2190
2191 hres = IUri_GetDisplayUri(uri, &display_uri);
2192 IUri_Release(uri);
2193 if(FAILED(hres))
2194 return NS_ERROR_FAILURE;
2195
2196 /* Remove trailing slash that may be appended as default path. */
2197 len = SysStringLen(display_uri);
2198 if(len && display_uri[len-1] == '/')
2199 display_uri[len-1] = 0;
2200
2201 nsres = return_wstr_nsacstr(aPrePath, display_uri, -1);
2202 SysFreeString(display_uri);
2203 return nsres;
2204}
static nsresult return_wstr_nsacstr(nsACString *ret_str, const WCHAR *str, int len)
Definition: nsio.c:150

◆ nsURI_GetScheme()

static nsresult NSAPI nsURI_GetScheme ( nsIFileURL iface,
nsACString aScheme 
)
static

Definition at line 2206 of file nsio.c.

2207{
2209 DWORD scheme;
2210 HRESULT hres;
2211
2212 TRACE("(%p)->(%p)\n", This, aScheme);
2213
2214 if(!ensure_uri(This))
2215 return NS_ERROR_UNEXPECTED;
2216
2217 hres = IUri_GetScheme(This->uri, &scheme);
2218 if(FAILED(hres)) {
2219 WARN("GetScheme failed: %08x\n", hres);
2220 return NS_ERROR_UNEXPECTED;
2221 }
2222
2223 if(scheme == URL_SCHEME_ABOUT) {
2224 nsACString_SetData(aScheme, "wine");
2225 return NS_OK;
2226 }
2227
2228 return get_uri_string(This, Uri_PROPERTY_SCHEME_NAME, aScheme);
2229}
@ URL_SCHEME_ABOUT
Definition: shlwapi.h:1163

◆ nsURI_GetSpec()

static nsresult NSAPI nsURI_GetSpec ( nsIFileURL iface,
nsACString aSpec 
)
static

Definition at line 2121 of file nsio.c.

2122{
2124
2125 TRACE("(%p)->(%p)\n", This, aSpec);
2126
2127 return get_uri_string(This, Uri_PROPERTY_DISPLAY_URI, aSpec);
2128}

◆ nsURI_GetSpecIgnoringRef()

static nsresult NSAPI nsURI_GetSpecIgnoringRef ( nsIFileURL iface,
nsACString aSpecIgnoringRef 
)
static

Definition at line 2797 of file nsio.c.

2798{
2800
2801 FIXME("(%p)->(%p)\n", This, aSpecIgnoringRef);
2802
2803 return nsIFileURL_GetSpec(&This->nsIFileURL_iface, aSpecIgnoringRef);
2804}

◆ nsURI_GetUsername()

static nsresult NSAPI nsURI_GetUsername ( nsIFileURL iface,
nsACString aUsername 
)
static

Definition at line 2329 of file nsio.c.

2330{
2332
2333 TRACE("(%p)->(%p)\n", This, aUsername);
2334
2335 return get_uri_string(This, Uri_PROPERTY_USER_NAME, aUsername);
2336}

◆ nsURI_GetUserPass()

static nsresult NSAPI nsURI_GetUserPass ( nsIFileURL iface,
nsACString aUserPass 
)
static

Definition at line 2256 of file nsio.c.

2257{
2259 BSTR user, pass;
2260 HRESULT hres;
2261
2262 TRACE("(%p)->(%p)\n", This, aUserPass);
2263
2264 if(!ensure_uri(This))
2265 return NS_ERROR_UNEXPECTED;
2266
2267 hres = IUri_GetUserName(This->uri, &user);
2268 if(FAILED(hres))
2269 return NS_ERROR_FAILURE;
2270
2271 hres = IUri_GetPassword(This->uri, &pass);
2272 if(FAILED(hres)) {
2274 return NS_ERROR_FAILURE;
2275 }
2276
2277 if(*user || *pass) {
2278 FIXME("Construct user:pass string\n");
2279 }else {
2280 nsACString_SetData(aUserPass, "");
2281 }
2282
2285 return NS_OK;
2286}
void user(int argc, const char *argv[])
Definition: cmds.c:1350
pass
Definition: typegen.h:25

◆ nsURI_QueryInterface()

static nsresult NSAPI nsURI_QueryInterface ( nsIFileURL iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 2052 of file nsio.c.

2053{
2055
2056 *result = NULL;
2057
2058 if(IsEqualGUID(&IID_nsISupports, riid)) {
2059 TRACE("(%p)->(IID_nsISupports %p)\n", This, result);
2060 *result = &This->nsIFileURL_iface;
2061 }else if(IsEqualGUID(&IID_nsIURI, riid)) {
2062 TRACE("(%p)->(IID_nsIURI %p)\n", This, result);
2063 *result = &This->nsIFileURL_iface;
2064 }else if(IsEqualGUID(&IID_nsIURL, riid)) {
2065 TRACE("(%p)->(IID_nsIURL %p)\n", This, result);
2066 *result = &This->nsIFileURL_iface;
2067 }else if(IsEqualGUID(&IID_nsIFileURL, riid)) {
2068 TRACE("(%p)->(IID_nsIFileURL %p)\n", This, result);
2069 *result = This->scheme == URL_SCHEME_FILE ? &This->nsIFileURL_iface : NULL;
2070 }else if(IsEqualGUID(&IID_nsIMutable, riid)) {
2071 TRACE("(%p)->(IID_nsIMutable %p)\n", This, result);
2072 *result = &This->nsIStandardURL_iface;
2073 }else if(IsEqualGUID(&IID_nsIStandardURL, riid)) {
2074 TRACE("(%p)->(IID_nsIStandardURL %p)\n", This, result);
2075 *result = &This->nsIStandardURL_iface;
2076 }else if(IsEqualGUID(&IID_nsWineURI, riid)) {
2077 TRACE("(%p)->(IID_nsWineURI %p)\n", This, result);
2078 *result = This;
2079 }
2080
2081 if(*result) {
2082 nsIFileURL_AddRef(&This->nsIFileURL_iface);
2083 return NS_OK;
2084 }
2085
2086 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
2087 return NS_NOINTERFACE;
2088}
@ URL_SCHEME_FILE
Definition: shlwapi.h:1155

◆ nsURI_Release()

static nsrefcnt NSAPI nsURI_Release ( nsIFileURL iface)
static

Definition at line 2100 of file nsio.c.

2101{
2104
2105 TRACE("(%p) ref=%d\n", This, ref);
2106
2107 if(!ref) {
2108 if(This->window_ref)
2109 windowref_release(This->window_ref);
2110 if(This->container)
2111 nsIWebBrowserChrome_Release(&This->container->nsIWebBrowserChrome_iface);
2112 if(This->uri)
2113 IUri_Release(This->uri);
2114 heap_free(This->origin_charset);
2115 heap_free(This);
2116 }
2117
2118 return ref;
2119}
static void windowref_release(windowref_t *ref)

◆ nsURI_Resolve()

static nsresult NSAPI nsURI_Resolve ( nsIFileURL iface,
const nsACString aRelativePath,
nsACString _retval 
)
static

Definition at line 2622 of file nsio.c.

2624{
2626 const char *patha;
2627 IUri *new_uri;
2628 WCHAR *path;
2629 char *reta;
2630 BSTR ret;
2631 HRESULT hres;
2632
2633 TRACE("(%p)->(%s %p)\n", This, debugstr_nsacstr(aRelativePath), _retval);
2634
2635 if(!ensure_uri(This))
2636 return NS_ERROR_UNEXPECTED;
2637
2638 nsACString_GetData(aRelativePath, &patha);
2639 path = heap_strdupUtoW(patha);
2640 if(!path)
2642
2643 hres = combine_url(This->uri, path, &new_uri);
2644 heap_free(path);
2645 if(FAILED(hres))
2646 return NS_ERROR_FAILURE;
2647
2648 hres = IUri_GetDisplayUri(new_uri, &ret);
2649 IUri_Release(new_uri);
2650 if(FAILED(hres))
2651 return NS_ERROR_FAILURE;
2652
2653 reta = heap_strdupWtoU(ret);
2655 if(!reta)
2657
2658 TRACE("returning %s\n", debugstr_a(reta));
2659 nsACString_SetData(_retval, reta);
2660 heap_free(reta);
2661 return NS_OK;
2662}
static WCHAR * heap_strdupUtoW(const char *str)

◆ nsURI_SchemeIs()

static nsresult NSAPI nsURI_SchemeIs ( nsIFileURL iface,
const char scheme,
cpp_bool _retval 
)
static

Definition at line 2578 of file nsio.c.

2579{
2583 HRESULT hres;
2584
2585 TRACE("(%p)->(%s %p)\n", This, debugstr_a(scheme), _retval);
2586
2587 if(!ensure_uri(This))
2588 return NS_ERROR_UNEXPECTED;
2589
2590 hres = IUri_GetSchemeName(This->uri, &scheme_name);
2591 if(FAILED(hres))
2592 return NS_ERROR_UNEXPECTED;
2593
2594 MultiByteToWideChar(CP_UTF8, 0, scheme, -1, buf, sizeof(buf)/sizeof(WCHAR));
2595 *_retval = !strcmpW(scheme_name, buf);
2597 return NS_OK;
2598}
WCHAR scheme_name[12]
Definition: url.c:65
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define strcmpW(s1, s2)
Definition: unicode.h:38
#define INTERNET_MAX_SCHEME_LENGTH
Definition: wininet.h:50

◆ nsURI_SetHost()

static nsresult NSAPI nsURI_SetHost ( nsIFileURL iface,
const nsACString aHost 
)
static

Definition at line 2450 of file nsio.c.

2451{
2453 const char *hosta;
2454 WCHAR *host;
2455 HRESULT hres;
2456
2457 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aHost));
2458
2460 return NS_ERROR_UNEXPECTED;
2461
2462 nsACString_GetData(aHost, &hosta);
2463 host = heap_strdupUtoW(hosta);
2464 if(!host)
2466
2467 hres = IUriBuilder_SetHost(This->uri_builder, host);
2468 heap_free(host);
2469 if(FAILED(hres))
2470 return NS_ERROR_UNEXPECTED;
2471
2472 return NS_OK;
2473}
static BOOL ensure_uri_builder(nsWineURI *This)
Definition: nsio.c:1997
char * host
Definition: whois.c:55

◆ nsURI_SetHostPort()

static nsresult NSAPI nsURI_SetHostPort ( nsIFileURL iface,
const nsACString aHostPort 
)
static

Definition at line 2431 of file nsio.c.

2432{
2434
2435 WARN("(%p)->(%s)\n", This, debugstr_nsacstr(aHostPort));
2436
2437 /* Not implemented by Gecko */
2439}

◆ nsURI_SetPassword()

static nsresult NSAPI nsURI_SetPassword ( nsIFileURL iface,
const nsACString aPassword 
)
static

Definition at line 2372 of file nsio.c.

2373{
2375 const char *passa;
2376 WCHAR *pass;
2377 HRESULT hres;
2378
2379 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aPassword));
2380
2382 return NS_ERROR_UNEXPECTED;
2383
2384 nsACString_GetData(aPassword, &passa);
2385 pass = heap_strdupUtoW(passa);
2386 if(!pass)
2388
2389 hres = IUriBuilder_SetPassword(This->uri_builder, pass);
2390 heap_free(pass);
2391 if(FAILED(hres))
2392 return NS_ERROR_UNEXPECTED;
2393
2394 return NS_OK;
2395}

◆ nsURI_SetPath()

static nsresult NSAPI nsURI_SetPath ( nsIFileURL iface,
const nsACString aPath 
)
static

Definition at line 2519 of file nsio.c.

2520{
2522 const char *patha;
2523 WCHAR *path;
2524 HRESULT hres;
2525
2526 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aPath));
2527
2529 return NS_ERROR_UNEXPECTED;
2530
2531 nsACString_GetData(aPath, &patha);
2532 path = heap_strdupUtoW(patha);
2533 if(!path)
2535
2536 hres = IUriBuilder_SetPath(This->uri_builder, path);
2537 heap_free(path);
2538 if(FAILED(hres))
2539 return NS_ERROR_UNEXPECTED;
2540
2541 return NS_OK;
2542}

◆ nsURI_SetPort()

static nsresult NSAPI nsURI_SetPort ( nsIFileURL iface,
LONG  aPort 
)
static

Definition at line 2496 of file nsio.c.

2497{
2499 HRESULT hres;
2500
2501 TRACE("(%p)->(%d)\n", This, aPort);
2502
2504 return NS_ERROR_UNEXPECTED;
2505
2506 hres = IUriBuilder_SetPort(This->uri_builder, aPort != -1, aPort);
2508}

◆ nsURI_SetScheme()

static nsresult NSAPI nsURI_SetScheme ( nsIFileURL iface,
const nsACString aScheme 
)
static

Definition at line 2231 of file nsio.c.

2232{
2234 const char *schemea;
2235 WCHAR *scheme;
2236 HRESULT hres;
2237
2238 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aScheme));
2239
2241 return NS_ERROR_UNEXPECTED;
2242
2243 nsACString_GetData(aScheme, &schemea);
2244 scheme = heap_strdupUtoW(schemea);
2245 if(!scheme)
2247
2248 hres = IUriBuilder_SetSchemeName(This->uri_builder, scheme);
2250 if(FAILED(hres))
2251 return NS_ERROR_UNEXPECTED;
2252
2253 return NS_OK;
2254}

◆ nsURI_SetSpec()

static nsresult NSAPI nsURI_SetSpec ( nsIFileURL iface,
const nsACString aSpec 
)
static

Definition at line 2130 of file nsio.c.

2131{
2133 const char *speca;
2134 WCHAR *spec;
2135 IUri *uri;
2136 HRESULT hres;
2137
2138 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aSpec));
2139
2140 if(!This->is_mutable)
2141 return NS_ERROR_UNEXPECTED;
2142
2143 nsACString_GetData(aSpec, &speca);
2144 spec = heap_strdupUtoW(speca);
2145 if(!spec)
2147
2148 hres = create_uri(spec, 0, &uri);
2149 heap_free(spec);
2150 if(FAILED(hres)) {
2151 WARN("create_uri failed: %08x\n", hres);
2152 return NS_ERROR_FAILURE;
2153 }
2154
2156 if(This->uri_builder) {
2157 IUriBuilder_Release(This->uri_builder);
2158 This->uri_builder = NULL;
2159 }
2160
2161 This->uri = uri;
2162 return NS_OK;
2163}

◆ nsURI_SetUsername()

static nsresult NSAPI nsURI_SetUsername ( nsIFileURL iface,
const nsACString aUsername 
)
static

Definition at line 2338 of file nsio.c.

2339{
2341 const char *usera;
2342 WCHAR *user;
2343 HRESULT hres;
2344
2345 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aUsername));
2346
2348 return NS_ERROR_UNEXPECTED;
2349
2350 nsACString_GetData(aUsername, &usera);
2351 user = heap_strdupUtoW(usera);
2352 if(!user)
2354
2355 hres = IUriBuilder_SetUserName(This->uri_builder, user);
2356 heap_free(user);
2357 if(FAILED(hres))
2358 return NS_ERROR_UNEXPECTED;
2359
2360 return NS_OK;
2361}

◆ nsURI_SetUserPass()

static nsresult NSAPI nsURI_SetUserPass ( nsIFileURL iface,
const nsACString aUserPass 
)
static

Definition at line 2288 of file nsio.c.

2289{
2291 WCHAR *user = NULL, *pass = NULL, *buf = NULL;
2292 const char *user_pass;
2293 HRESULT hres;
2294
2295 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aUserPass));
2296
2298 return NS_ERROR_UNEXPECTED;
2299
2300 nsACString_GetData(aUserPass, &user_pass);
2301 if(*user_pass) {
2302 WCHAR *ptr;
2303
2304 buf = heap_strdupUtoW(user_pass);
2305 if(!buf)
2307
2308 ptr = strchrW(buf, ':');
2309 if(!ptr) {
2310 user = buf;
2311 }else if(ptr != buf) {
2312 *ptr++ = 0;
2313 user = buf;
2314 if(*ptr)
2315 pass = ptr;
2316 }else {
2317 pass = buf+1;
2318 }
2319 }
2320
2321 hres = IUriBuilder_SetUserName(This->uri_builder, user);
2322 if(SUCCEEDED(hres))
2323 hres = IUriBuilder_SetPassword(This->uri_builder, pass);
2324
2325 heap_free(buf);
2327}

◆ nsuri_to_url()

HRESULT nsuri_to_url ( LPCWSTR  nsuri,
BOOL  ret_empty,
BSTR ret 
)

Definition at line 175 of file nsio.c.

176{
177 const WCHAR *ptr = nsuri;
178
179 static const WCHAR wine_prefixW[] = {'w','i','n','e',':'};
180
181 if(!strncmpW(nsuri, wine_prefixW, sizeof(wine_prefixW)/sizeof(WCHAR)))
182 ptr += sizeof(wine_prefixW)/sizeof(WCHAR);
183
184 if(*ptr || ret_empty) {
186 if(!*ret)
187 return E_OUTOFMEMORY;
188 }else {
189 *ret = NULL;
190 }
191
192 TRACE("%s -> %s\n", debugstr_w(nsuri), debugstr_w(*ret));
193 return S_OK;
194}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define strncmpW(s1, s2, n)
Definition: unicode.h:36

Referenced by HTMLAnchorElement_get_href(), HTMLFormElement_get_action(), HTMLImgElement_get_src(), and HTMLInputElement_get_src().

◆ nsURL_GetCommonBaseSpec()

static nsresult NSAPI nsURL_GetCommonBaseSpec ( nsIFileURL iface,
nsIURI aURIToCompare,
nsACString _retval 
)
static

Definition at line 3018 of file nsio.c.

3019{
3021 FIXME("(%p)->(%p %p)\n", This, aURIToCompare, _retval);
3023}

◆ nsURL_GetDirectory()

static nsresult NSAPI nsURL_GetDirectory ( nsIFileURL iface,
nsACString aDirectory 
)
static

Definition at line 2924 of file nsio.c.

2925{
2927 const WCHAR *file;
2928 BSTR path;
2929 nsresult nsres;
2930
2931 TRACE("(%p)->(%p)\n", This, aDirectory);
2932
2933 nsres = get_uri_path(This, &path, &file, NULL);
2934 if(NS_FAILED(nsres))
2935 return nsres;
2936
2937 nsres = return_wstr_nsacstr(aDirectory, path, file-path);
2939 return nsres;
2940}
static nsresult get_uri_path(nsWineURI *This, BSTR *path, const WCHAR **file, const WCHAR **ext)
Definition: nsio.c:2897

◆ nsURL_GetFileBaseName()

static nsresult NSAPI nsURL_GetFileBaseName ( nsIFileURL iface,
nsACString aFileBaseName 
)
static

Definition at line 2977 of file nsio.c.

2978{
2980 const WCHAR *file, *ext;
2981 BSTR path;
2982 nsresult nsres;
2983
2984 TRACE("(%p)->(%p)\n", This, aFileBaseName);
2985
2986 nsres = get_uri_path(This, &path, &file, &ext);
2987 if(NS_FAILED(nsres))
2988 return nsres;
2989
2990 nsres = return_wstr_nsacstr(aFileBaseName, file, ext-file);
2992 return nsres;
2993}

◆ nsURL_GetFileExtension()

static nsresult NSAPI nsURL_GetFileExtension ( nsIFileURL iface,
nsACString aFileExtension 
)
static

Definition at line 3002 of file nsio.c.

3003{
3005
3006 TRACE("(%p)->(%p)\n", This, aFileExtension);
3007
3008 return get_uri_string(This, Uri_PROPERTY_EXTENSION, aFileExtension);
3009}

◆ nsURL_GetFileName()

static nsresult NSAPI nsURL_GetFileName ( nsIFileURL iface,
nsACString aFileName 
)
static

Definition at line 2952 of file nsio.c.

2953{
2955 const WCHAR *file;
2956 BSTR path;
2957 nsresult nsres;
2958
2959 TRACE("(%p)->(%p)\n", This, aFileName);
2960
2961 nsres = get_uri_path(This, &path, &file, NULL);
2962 if(NS_FAILED(nsres))
2963 return nsres;
2964
2965 nsres = return_wstr_nsacstr(aFileName, file, -1);
2967 return nsres;
2968}

◆ nsURL_GetFilePath()

static nsresult NSAPI nsURL_GetFilePath ( nsIFileURL iface,
nsACString aFilePath 
)
static

Definition at line 2825 of file nsio.c.

2826{
2828
2829 TRACE("(%p)->(%p)\n", This, aFilePath);
2830
2831 return nsIFileURL_GetPath(&This->nsIFileURL_iface, aFilePath);
2832}

◆ nsURL_GetQuery()

static nsresult NSAPI nsURL_GetQuery ( nsIFileURL iface,
nsACString aQuery 
)
static

Definition at line 2846 of file nsio.c.

2847{
2849 WCHAR *ptr;
2850 BSTR query;
2851 nsresult nsres;
2852 HRESULT hres;
2853
2854 TRACE("(%p)->(%p)\n", This, aQuery);
2855
2856 if(!ensure_uri(This))
2857 return NS_ERROR_UNEXPECTED;
2858
2859 hres = IUri_GetQuery(This->uri, &query);
2860 if(FAILED(hres))
2861 return NS_ERROR_FAILURE;
2862
2863 ptr = query;
2864 if(ptr && *ptr == '?')
2865 ptr++;
2866
2867 nsres = return_wstr_nsacstr(aQuery, ptr, -1);
2869 return nsres;
2870}

◆ nsURL_GetRef()

static nsresult NSAPI nsURL_GetRef ( nsIFileURL iface,
nsACString aRef 
)
static

Definition at line 2692 of file nsio.c.

2693{
2695 char *refa = NULL;
2696 BSTR ref;
2697 HRESULT hres;
2698
2699 TRACE("(%p)->(%p)\n", This, aRef);
2700
2701 if(!ensure_uri(This))
2702 return NS_ERROR_UNEXPECTED;
2703
2704 hres = IUri_GetFragment(This->uri, &ref);
2705 if(FAILED(hres))
2706 return NS_ERROR_UNEXPECTED;
2707
2708 refa = heap_strdupWtoU(ref);
2710 if(ref && !refa)
2712
2713 nsACString_SetData(aRef, refa && *refa == '#' ? refa+1 : refa);
2714 heap_free(refa);
2715 return NS_OK;
2716}

◆ nsURL_GetRelativeSpec()

static nsresult NSAPI nsURL_GetRelativeSpec ( nsIFileURL iface,
nsIURI aURIToCompare,
nsACString _retval 
)
static

Definition at line 3025 of file nsio.c.

3026{
3028 FIXME("(%p)->(%p %p)\n", This, aURIToCompare, _retval);
3030}

◆ nsURL_SetDirectory()

static nsresult NSAPI nsURL_SetDirectory ( nsIFileURL iface,
const nsACString aDirectory 
)
static

Definition at line 2942 of file nsio.c.

2943{
2945
2946 WARN("(%p)->(%s)\n", This, debugstr_nsacstr(aDirectory));
2947
2948 /* Not implemented by Gecko */
2950}

◆ nsURL_SetFileBaseName()

static nsresult NSAPI nsURL_SetFileBaseName ( nsIFileURL iface,
const nsACString aFileBaseName 
)
static

Definition at line 2995 of file nsio.c.

2996{
2998 FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aFileBaseName));
3000}

◆ nsURL_SetFileExtension()

static nsresult NSAPI nsURL_SetFileExtension ( nsIFileURL iface,
const nsACString aFileExtension 
)
static

Definition at line 3011 of file nsio.c.

3012{
3014 FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aFileExtension));
3016}

◆ nsURL_SetFileName()

static nsresult NSAPI nsURL_SetFileName ( nsIFileURL iface,
const nsACString aFileName 
)
static

Definition at line 2970 of file nsio.c.

2971{
2973 FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aFileName));
2975}

◆ nsURL_SetFilePath()

static nsresult NSAPI nsURL_SetFilePath ( nsIFileURL iface,
const nsACString aFilePath 
)
static

Definition at line 2834 of file nsio.c.

2835{
2837
2838 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aFilePath));
2839
2840 if(!This->is_mutable)
2841 return NS_ERROR_UNEXPECTED;
2842
2843 return nsIFileURL_SetPath(&This->nsIFileURL_iface, aFilePath);
2844}

◆ nsURL_SetQuery()

static nsresult NSAPI nsURL_SetQuery ( nsIFileURL iface,
const nsACString aQuery 
)
static

Definition at line 2872 of file nsio.c.

2873{
2875 const char *querya;
2876 WCHAR *query;
2877 HRESULT hres;
2878
2879 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aQuery));
2880
2882 return NS_ERROR_UNEXPECTED;
2883
2884 nsACString_GetData(aQuery, &querya);
2885 query = heap_strdupUtoW(querya);
2886 if(!query)
2888
2889 hres = IUriBuilder_SetQuery(This->uri_builder, query);
2891 if(FAILED(hres))
2892 return NS_ERROR_UNEXPECTED;
2893
2894 return NS_OK;
2895}

◆ nsURL_SetRef()

static nsresult NSAPI nsURL_SetRef ( nsIFileURL iface,
const nsACString aRef 
)
static

Definition at line 2718 of file nsio.c.

2719{
2721 const char *refa;
2722 WCHAR *ref;
2723 HRESULT hres;
2724
2725 TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aRef));
2726
2728 return NS_ERROR_UNEXPECTED;
2729
2730 nsACString_GetData(aRef, &refa);
2731 ref = heap_strdupUtoW(refa);
2732 if(!ref)
2734
2735 hres = IUriBuilder_SetFragment(This->uri_builder, ref);
2736 heap_free(ref);
2737 if(FAILED(hres))
2738 return NS_ERROR_UNEXPECTED;
2739
2740 return NS_OK;
2741}

◆ on_start_uri_open()

nsresult on_start_uri_open ( NSContainer nscontainer,
nsIURI uri,
cpp_bool _retval 
)

Definition at line 4019 of file nsio.c.

4020{
4021 nsWineURI *wine_uri;
4022 nsresult nsres;
4023
4024 *_retval = FALSE;
4025
4026 nsres = nsIURI_QueryInterface(uri, &IID_nsWineURI, (void**)&wine_uri);
4027 if(NS_FAILED(nsres)) {
4028 WARN("Could not get nsWineURI: %08x\n", nsres);
4030 }
4031
4032 if(!wine_uri->is_doc_uri) {
4033 wine_uri->is_doc_uri = TRUE;
4034
4035 if(!wine_uri->container) {
4036 nsIWebBrowserChrome_AddRef(&nscontainer->nsIWebBrowserChrome_iface);
4037 wine_uri->container = nscontainer;
4038 }
4039
4040 if(nscontainer->doc)
4041 *_retval = translate_url(nscontainer->doc, wine_uri);
4042 }
4043
4044 nsIFileURL_Release(&wine_uri->nsIFileURL_iface);
4045 return NS_OK;
4046}
static BOOL translate_url(HTMLDocumentObj *doc, nsWineURI *uri)
Definition: nsio.c:3992
nsIWebBrowserChrome nsIWebBrowserChrome_iface
HTMLDocumentObj * doc
BOOL is_doc_uri
Definition: nsio.c:46
NSContainer * container
Definition: nsio.c:40

Referenced by nsURIContentListener_OnStartURIOpen().

◆ release_nsio()

void release_nsio ( void  )

Definition at line 4085 of file nsio.c.

4086{
4087 if(net_util) {
4088 nsINetUtil_Release(net_util);
4089 net_util = NULL;
4090 }
4091
4092 if(nsio) {
4093 nsIIOService_Release(nsio);
4094 nsio = NULL;
4095 }
4096}

Referenced by close_gecko().

◆ return_wstr_nsacstr()

static nsresult return_wstr_nsacstr ( nsACString ret_str,
const WCHAR str,
int  len 
)
static

Definition at line 150 of file nsio.c.

151{
152 char *stra;
153 int lena;
154
155 TRACE("returning %s\n", debugstr_wn(str, len));
156
157 if(!*str) {
158 nsACString_SetData(ret_str, "");
159 return NS_OK;
160 }
161
162 lena = WideCharToMultiByte(CP_UTF8, 0, str, len, NULL, 0, NULL, NULL);
163 stra = heap_alloc(lena+1);
164 if(!stra)
166
167 WideCharToMultiByte(CP_UTF8, 0, str, len, stra, lena, NULL, NULL);
168 stra[lena] = 0;
169
170 nsACString_SetData(ret_str, stra);
171 heap_free(stra);
172 return NS_OK;
173}
#define WideCharToMultiByte
Definition: compat.h:111
#define debugstr_wn
Definition: kernel32.h:33
const WCHAR * str

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

◆ set_channel_http_header()

static nsresult set_channel_http_header ( struct list headers,
const nsACString name_str,
const nsACString value_str 
)
static

Definition at line 417 of file nsio.c.

419{
420 const char *namea, *valuea;
421 WCHAR *name, *value;
423
424 nsACString_GetData(name_str, &namea);
425 name = heap_strdupAtoW(namea);
426 if(!name)
427 return NS_ERROR_UNEXPECTED;
428
430 value = heap_strdupAtoW(valuea);
431 if(!value) {
433 return NS_ERROR_UNEXPECTED;
434 }
435
437
441}
static UNICODE_STRING value_str
Definition: reg.c:1328

Referenced by nsChannel_SetRequestHeader().

◆ set_http_header()

HRESULT set_http_header ( struct list headers,
const WCHAR name,
int  name_len,
const WCHAR value,
int  value_len 
)

Definition at line 380 of file nsio.c.

382{
384
385 TRACE("%s: %s\n", debugstr_wn(name, name_len), debugstr_wn(value, value_len));
386
387 header = find_http_header(headers, name, name_len);
388 if(header) {
389 WCHAR *new_data;
390
391 new_data = heap_strndupW(value, value_len);
392 if(!new_data)
393 return E_OUTOFMEMORY;
394
395 heap_free(header->data);
396 header->data = new_data;
397 }else {
399 if(!header)
400 return E_OUTOFMEMORY;
401
402 header->header = heap_strndupW(name, name_len);
403 header->data = heap_strndupW(value, value_len);
404 if(!header->header || !header->data) {
405 heap_free(header->header);
406 heap_free(header->data);
408 return E_OUTOFMEMORY;
409 }
410
411 list_add_tail(headers, &header->entry);
412 }
413
414 return S_OK;
415}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static LPWSTR heap_strndupW(LPCWSTR str, unsigned len)

Referenced by nsUploadChannel_SetUploadStream(), parse_headers(), and set_channel_http_header().

◆ set_uri_nscontainer()

static void set_uri_nscontainer ( nsWineURI This,
NSContainer nscontainer 
)
static

Definition at line 301 of file nsio.c.

302{
303 if(This->container) {
304 if(This->container == nscontainer)
305 return;
306 TRACE("Changing %p -> %p\n", This->container, nscontainer);
307 nsIWebBrowserChrome_Release(&This->container->nsIWebBrowserChrome_iface);
308 }
309
310 if(nscontainer)
311 nsIWebBrowserChrome_AddRef(&nscontainer->nsIWebBrowserChrome_iface);
312 This->container = nscontainer;
313}

Referenced by create_nsuri(), and set_uri_window().

◆ set_uri_window()

static void set_uri_window ( nsWineURI This,
HTMLOuterWindow window 
)
static

Definition at line 315 of file nsio.c.

316{
317 if(This->window_ref) {
318 if(This->window_ref->window == window)
319 return;
320 TRACE("Changing %p -> %p\n", This->window_ref->window, window);
321 windowref_release(This->window_ref);
322 }
323
324 if(window) {
325 windowref_addref(window->window_ref);
326 This->window_ref = window->window_ref;
327
328 if(window->doc_obj)
329 set_uri_nscontainer(This, window->doc_obj->nscontainer);
330 }else {
331 This->window_ref = NULL;
332 }
333}
static void windowref_addref(windowref_t *ref)

Referenced by create_nsuri(), and nsChannel_AsyncOpen().

◆ start_binding_proc()

static void start_binding_proc ( task_t _task)
static

Definition at line 978 of file nsio.c.

979{
981
983}
HRESULT start_binding(HTMLInnerWindow *, BSCallback *, IBindCtx *) DECLSPEC_HIDDEN
Definition: navigate.c:762

Referenced by async_open().

◆ start_binding_task_destr()

static void start_binding_task_destr ( task_t _task)
static

Definition at line 985 of file nsio.c.

986{
988
989 IBindStatusCallback_Release(&task->bscallback->bsc.IBindStatusCallback_iface);
990 heap_free(task);
991}

Referenced by async_open().

◆ translate_url()

static BOOL translate_url ( HTMLDocumentObj doc,
nsWineURI uri 
)
static

Definition at line 3992 of file nsio.c.

3993{
3994 OLECHAR *new_url = NULL;
3995 WCHAR *url;
3996 BOOL ret = FALSE;
3997 HRESULT hres;
3998
3999 if(!doc->hostui || !ensure_uri(uri))
4000 return FALSE;
4001
4002 hres = IUri_GetDisplayUri(uri->uri, &url);
4003 if(FAILED(hres))
4004 return FALSE;
4005
4006 hres = IDocHostUIHandler_TranslateUrl(doc->hostui, 0, url, &new_url);
4007 if(hres == S_OK && new_url) {
4008 if(strcmpW(url, new_url)) {
4009 FIXME("TranslateUrl returned new URL %s -> %s\n", debugstr_w(url), debugstr_w(new_url));
4010 ret = TRUE;
4011 }
4012 CoTaskMemFree(new_url);
4013 }
4014
4016 return ret;
4017}
WCHAR OLECHAR
Definition: compat.h:2292
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
IDocHostUIHandler * hostui

Referenced by on_start_uri_open().

◆ visit_http_headers()

static nsresult visit_http_headers ( struct list headers,
nsIHttpHeaderVisitor visitor 
)
static

Definition at line 443 of file nsio.c.

444{
445 nsACString header_str, value_str;
446 char *header, *value;
447 http_header_t *iter;
448 nsresult nsres;
449
452 if(!header)
454
455 value = heap_strdupWtoA(iter->data);
456 if(!value) {
459 }
460
461 nsACString_InitDepend(&header_str, header);
463 nsres = nsIHttpHeaderVisitor_VisitHeader(visitor, &header_str, &value_str);
464 nsACString_Finish(&header_str);
468 if(NS_FAILED(nsres))
469 break;
470 }
471
472 return NS_OK;
473}
void nsACString_Finish(nsACString *) DECLSPEC_HIDDEN
Definition: nsembed.c:812
void nsACString_InitDepend(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:797

Referenced by nsChannel_VisitResponseHeaders().

Variable Documentation

◆ IID_nsWineURI

const IID IID_nsWineURI
static
Initial value:
=
{0x5088272e, 0x900b, 0x11da, {0xc6,0x87, 0x00,0x0f,0xea,0x57,0xf2,0x1a}}

Definition at line 26 of file nsio.c.

Referenced by get_window_from_load_group(), new_channel_from_uri(), nsIOService_NewURI(), nsURI_Equals(), nsURI_EqualsExceptRef(), nsURI_QueryInterface(), and on_start_uri_open().

◆ net_util

◆ NS_IOSERVICE_CID

const IID NS_IOSERVICE_CID
static
Initial value:
=
{0x9ac9e770, 0x18bc, 0x11d3, {0x93, 0x37, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40}}

Definition at line 24 of file nsio.c.

Referenced by init_nsio().

◆ nsChannelVtbl

const nsIHttpChannelVtbl nsChannelVtbl
static

Definition at line 1469 of file nsio.c.

Referenced by create_nschannel().

◆ nsFileURLVtbl

const nsIFileURLVtbl nsFileURLVtbl
static

Definition at line 3057 of file nsio.c.

Referenced by create_nsuri().

◆ nsHttpChannelInternalVtbl

const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl
static

Definition at line 1945 of file nsio.c.

Referenced by create_nschannel().

◆ nsio

◆ nsIOService

◆ nsIOServiceFactory

nsIFactory nsIOServiceFactory = { &nsIOServiceFactoryVtbl }
static

Definition at line 3990 of file nsio.c.

Referenced by init_nsio().

◆ nsIOServiceFactoryVtbl

const nsIFactoryVtbl nsIOServiceFactoryVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsIOServiceFactory_QueryInterface(nsIFactory *iface, nsIIDRef riid, void **result)
Definition: nsio.c:3938
static nsresult NSAPI nsIOServiceFactory_CreateInstance(nsIFactory *iface, nsISupports *aOuter, const nsIID *iid, void **result)
Definition: nsio.c:3970
static nsresult NSAPI nsIOServiceFactory_LockFactory(nsIFactory *iface, cpp_bool lock)
Definition: nsio.c:3976
static nsrefcnt NSAPI nsIOServiceFactory_AddRef(nsIFactory *iface)
Definition: nsio.c:3960
static nsrefcnt NSAPI nsIOServiceFactory_Release(nsIFactory *iface)
Definition: nsio.c:3965

Definition at line 3982 of file nsio.c.

◆ nsIOServiceVtbl

const nsIIOServiceVtbl nsIOServiceVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsIOService_QueryInterface(nsIIOService *, nsIIDRef, void **)
Definition: nsio.c:3917
static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval)
Definition: nsio.c:3545
static nsresult NSAPI nsIOService_GetOffline(nsIIOService *iface, cpp_bool *aOffline)
Definition: nsio.c:3705
static nsresult NSAPI nsIOService_IsAppOffline(nsIIOService *iface, UINT32 appId, cpp_bool *_retval)
Definition: nsio.c:3729
static nsrefcnt NSAPI nsIOService_Release(nsIIOService *iface)
Definition: nsio.c:3475
static nsresult NSAPI nsIOService_NewChannelFromURI2(nsIIOService *iface, nsIURI *aURI, nsIDOMNode *aLoadingNode, nsIPrincipal *aLoadingPrincipal, nsIPrincipal *aTriggeringPrincipal, UINT32 aSecurityFlags, UINT32 aContentPolicyType, nsIChannel **_retval)
Definition: nsio.c:3652
static nsresult NSAPI nsIOService_ExtractScheme(nsIIOService *iface, const nsACString *urlString, nsACString *_retval)
Definition: nsio.c:3748
static nsresult NSAPI nsIOService_SetOffline(nsIIOService *iface, cpp_bool aOffline)
Definition: nsio.c:3711
static nsresult NSAPI nsIOService_SetAppOffline(nsIIOService *iface, UINT32 appId, INT32 state)
Definition: nsio.c:3723
static nsresult NSAPI nsIOService_NewFileURI(nsIIOService *iface, nsIFile *aFile, nsIURI **_retval)
Definition: nsio.c:3618
static nsresult NSAPI nsIOService_AllowPort(nsIIOService *iface, LONG aPort, const char *aScheme, cpp_bool *_retval)
Definition: nsio.c:3741
static nsresult NSAPI nsIOService_GetProtocolHandler(nsIIOService *iface, const char *aScheme, nsIProtocolHandler **_retval)
Definition: nsio.c:3480
static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI *aURI, nsIChannel **_retval)
Definition: nsio.c:3681
static nsresult NSAPI nsIOService_GetProtocolFlags(nsIIOService *iface, const char *aScheme, UINT32 *_retval)
Definition: nsio.c:3518
static nsresult NSAPI nsIOService_NewChannel(nsIIOService *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIChannel **_retval)
Definition: nsio.c:3698
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)
Definition: nsio.c:3688
static nsresult NSAPI nsIOService_GetAppOfflineState(nsIIOService *iface, UINT32 appId, INT32 *_retval)
Definition: nsio.c:3735
static nsresult NSAPI nsIOService_GetConnectivity(nsIIOService *iface, cpp_bool *aConnectivity)
Definition: nsio.c:3717
static nsresult NSAPI nsIOService_NewChannelFromURIWithLoadInfo(nsIIOService *iface, nsIURI *aURI, nsILoadInfo *aLoadInfo, nsIChannel **_retval)
Definition: nsio.c:3674
static nsrefcnt NSAPI nsIOService_AddRef(nsIIOService *iface)
Definition: nsio.c:3470

Definition at line 3755 of file nsio.c.

◆ nsNetUtil

nsINetUtil nsNetUtil = { &nsNetUtilVtbl }
static

Definition at line 3915 of file nsio.c.

Referenced by nsIOService_QueryInterface().

◆ nsNetUtilVtbl

const nsINetUtilVtbl nsNetUtilVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsNetUtil_ProtocolHasFlags(nsINetUtil *iface, nsIURI *aURI, UINT32 aFlags, cpp_bool *_retval)
Definition: nsio.c:3834
static nsresult NSAPI nsNetUtil_ParseContentType(nsINetUtil *iface, const nsACString *aTypeHeader, nsACString *aCharset, cpp_bool *aHadCharset, nsACString *aContentType)
Definition: nsio.c:3796
static nsresult NSAPI nsNetUtil_QueryInterface(nsINetUtil *iface, nsIIDRef riid, void **result)
Definition: nsio.c:3780
static nsresult NSAPI nsNetUtil_URIChainHasFlags(nsINetUtil *iface, nsIURI *aURI, UINT32 aFlags, cpp_bool *_retval)
Definition: nsio.c:3841
static nsrefcnt NSAPI nsNetUtil_AddRef(nsINetUtil *iface)
Definition: nsio.c:3786
static nsresult NSAPI nsNetUtil_UnescapeString(nsINetUtil *iface, const nsACString *aStr, UINT32 aFlags, nsACString *_retval)
Definition: nsio.c:3883
static nsresult NSAPI nsNetUtil_ToImmutableURI(nsINetUtil *iface, nsIURI *aURI, nsIURI **_retval)
Definition: nsio.c:3853
static nsresult NSAPI nsNetUtil_EscapeString(nsINetUtil *iface, const nsACString *aString, UINT32 aEscapeType, nsACString *_retval)
Definition: nsio.c:3867
static nsresult NSAPI nsNetUtil_EscapeURL(nsINetUtil *iface, const nsACString *aStr, UINT32 aFlags, nsACString *_retval)
Definition: nsio.c:3875
static nsresult NSAPI nsNetUtil_NewSimpleNestedURI(nsINetUtil *iface, nsIURI *aURI, nsIURI **_retval)
Definition: nsio.c:3860
static nsrefcnt NSAPI nsNetUtil_Release(nsINetUtil *iface)
Definition: nsio.c:3791
static nsresult NSAPI nsNetUtil_ExtractCharsetFromContentType(nsINetUtil *iface, const nsACString *aTypeHeader, nsACString *aCharset, LONG *aCharsetStart, LONG *aCharsetEnd, cpp_bool *_retval)
Definition: nsio.c:3891

Definition at line 3900 of file nsio.c.

◆ nsProtocolHandlerVtbl

const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsProtocolHandler_GetProtocolFlags(nsIProtocolHandler *iface, UINT32 *aProtocolFlags)
Definition: nsio.c:3394
static nsrefcnt NSAPI nsProtocolHandler_AddRef(nsIProtocolHandler *iface)
Definition: nsio.c:3345
static nsresult NSAPI nsProtocolHandler_NewURI(nsIProtocolHandler *iface, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval)
Definition: nsio.c:3406
static nsresult NSAPI nsProtocolHandler_AllowPort(nsIProtocolHandler *iface, LONG port, const char *scheme, cpp_bool *_retval)
Definition: nsio.c:3443
static nsresult NSAPI nsProtocolHandler_GetDefaultPort(nsIProtocolHandler *iface, LONG *aDefaultPort)
Definition: nsio.c:3382
static nsrefcnt NSAPI nsProtocolHandler_Release(nsIProtocolHandler *iface)
Definition: nsio.c:3355
static nsresult NSAPI nsProtocolHandler_NewChannel2(nsIProtocolHandler *iface, nsIURI *aURI, nsILoadInfo *aLoadInfo, nsIChannel **_retval)
Definition: nsio.c:3419
static nsresult NSAPI nsProtocolHandler_GetScheme(nsIProtocolHandler *iface, nsACString *aScheme)
Definition: nsio.c:3371
static nsresult NSAPI nsProtocolHandler_NewChannel(nsIProtocolHandler *iface, nsIURI *aURI, nsIChannel **_retval)
Definition: nsio.c:3431
static nsresult NSAPI nsProtocolHandler_QueryInterface(nsIProtocolHandler *iface, nsIIDRef riid, void **result)
Definition: nsio.c:3318

Definition at line 3455 of file nsio.c.

Referenced by nsIOService_GetProtocolHandler().

◆ nsStandardURLVtbl

const nsIStandardURLVtbl nsStandardURLVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsStandardURL_SetMutable(nsIStandardURL *iface, cpp_bool aMutable)
Definition: nsio.c:3145
static nsresult NSAPI nsStandardURL_QueryInterface(nsIStandardURL *iface, nsIIDRef riid, void **result)
Definition: nsio.c:3116
static nsresult NSAPI nsStandardURL_GetMutable(nsIStandardURL *iface, cpp_bool *aMutable)
Definition: nsio.c:3135
static nsrefcnt NSAPI nsStandardURL_AddRef(nsIStandardURL *iface)
Definition: nsio.c:3123
static nsrefcnt NSAPI nsStandardURL_Release(nsIStandardURL *iface)
Definition: nsio.c:3129
static nsresult NSAPI nsStandardURL_Init(nsIStandardURL *iface, UINT32 aUrlType, LONG aDefaultPort, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI)
Definition: nsio.c:3155

Definition at line 3163 of file nsio.c.

Referenced by create_nsuri().

◆ nsUploadChannelVtbl

const nsIUploadChannelVtbl nsUploadChannelVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsUploadChannel_Release(nsIUploadChannel *iface)
Definition: nsio.c:1551
static nsresult NSAPI nsUploadChannel_SetUploadStream(nsIUploadChannel *iface, nsIInputStream *aStream, const nsACString *aContentType, INT64 aContentLength)
Definition: nsio.c:1557
static nsrefcnt NSAPI nsUploadChannel_AddRef(nsIUploadChannel *iface)
Definition: nsio.c:1545
static nsresult NSAPI nsUploadChannel_QueryInterface(nsIUploadChannel *iface, nsIIDRef riid, void **result)
Definition: nsio.c:1538
static nsresult NSAPI nsUploadChannel_GetUploadStream(nsIUploadChannel *iface, nsIInputStream **aUploadStream)
Definition: nsio.c:1599

Definition at line 1613 of file nsio.c.

Referenced by create_nschannel().

◆ request_method_strings

const char* request_method_strings[] = {"GET", "PUT", "POST"}
static

Definition at line 32 of file nsio.c.

Referenced by nsChannel_GetRequestMethod(), and nsChannel_SetRequestMethod().