Readonly
connectivityReturns false if there are no interfaces for a network request
While this is set, IOService will monitor an nsINetworkLinkService (if available) and set its offline status to "true" whenever isLinkUp is false.
Applications that want to control changes to the IOService's offline status should set this to false, watch for network:link-status-changed broadcasts, and change nsIIOService::offline as they see fit. Note that this means during application startup, IOService may be offline if there is no link, until application code runs and can turn off this management.
Returns true if networking is in "offline" mode. When in offline mode, attempts to access the network will fail (although this does not necessarily correlate with whether there is actually a network available -- that's hard to detect without causing the dialer to come up).
Changing this fires observer notifications ... see below.
Readonly
socketThe pid for socket process.
Readonly
socketReturn true if socket process is launched.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Checks if a port number is banned. This involves consulting a list of unsafe ports, corresponding to network services that may be easily exploitable. If the given port is considered unsafe, then the protocol handler (corresponding to aScheme) will be asked whether it wishes to override the IO service's decision to block the port. This gives the protocol handler ultimate control over its own security policy while ensuring reasonable, default protection.
nsIProtocolHandler::allowPort
Utility to extract the scheme from a URL string, consistently and according to spec (see RFC 2396).
NOTE: Most URL parsing is done via nsIURI, and in fact the scheme can also be extracted from a URL string via nsIURI. This method is provided purely as an optimization.
URL scheme, lowercase
NS_ERROR_MALFORMED_URI if URL string is not of the right form.
Checks if a URI host is a shared IPv4 address literal.
true if the URI hostname is a shared IP address
Equivalent to newChannelFromURI(newURI(...))
Creates a channel for a given URI.
reference to the new nsIChannel object
Please note, if you provide both a loadingNode and a loadingPrincipal, then loadingPrincipal must be equal to loadingNode->NodePrincipal(). But less error prone is to just supply a loadingNode.
Keep in mind that URIs coming from a webpage should never use the systemPrincipal as the loadingPrincipal.
nsIURI from which to make a channel
These will be used as values for the nsILoadInfo object on the created channel. For details, see nsILoadInfo in nsILoadInfo.idl
Creates a channel for a given URI.
reference to the new nsIChannel object
Please note, if you provide both a loadingNode and a loadingPrincipal, then loadingPrincipal must be equal to loadingNode->NodePrincipal(). But less error prone is to just supply a loadingNode.
nsIURI from which to make a channel
nsIURI to use for proxy resolution. Can be null in which case aURI is used
flags from nsIProtocolProxyService to use when resolving proxies for this new channel
These will be used as values for the nsILoadInfo object on the created channel. For details, see nsILoadInfo in nsILoadInfo.idl
This method constructs a new URI from a nsIFile.
reference to a new nsIURI object
Note: in the future, for perf reasons we should allow callers to specify whether this is a file or directory by splitting this into newDirURI() and newActualFileURI().
specifies the file path
This method constructs a new URI based on the scheme of the URI spec. QueryInterface can be used on the resulting URI object to obtain a more specific type of URI.
Register a protocol handler at runtime, given protocol flags and a default port.
Statically registered protocol handlers cannot be overridden, and an error will be returned if that is attempted.
Runtime registered protocol handlers are never QueryInterface-ed into
nsIProtocolHandlerWithDynamicFlags
, so that interface will be ignored.
the scheme handled by the protocol handler.
the protocol handler instance.
protocol flags for this protocol, see nsIProtocolHandler for values.
default port for this scheme, or -1.
Generated using TypeDoc
nsIIOService provides a set of network utility functions. This interface duplicates many of the nsIProtocolHandler methods in a protocol handler independent way (e.g., NewURI inspects the scheme in order to delegate creation of the new URI to the appropriate protocol handler). nsIIOService also provides a set of URL parsing utility functions. These are provided as a convenience to the programmer and in some cases to improve performance by eliminating intermediate data structures and interfaces.