nsIWebBrowserPersist
IID: | dd4e0a6a-210f-419a-ad85-40e8543b9465 |
Inherits From: | nsICancelable |
Status: | UNDER_REVIEW |
Interface for persisting DOM documents and URIs to local or remote storage.
This interface is implemented by the following components:
Constants
Properties
readonly PRUint32 currentState
Current state of the persister object.
PRUint32 persistFlags
Flags governing how data is fetched and saved from the network. It is best to set this value explicitly unless you are prepared to accept the default values.
nsIWebProgressListener progressListener
Callback listener for progress notifications. The object that the embbedder supplies may also implement nsIInterfaceRequestor and be prepared to return nsIAuthPrompt or other interfaces that may be required to download data.
readonly PRUint32 result
Value indicating the success or failure of the persist operation.
Methods
void cancelSave ( )
void saveChannel ( nsIChannel channel , nsISupports file )
void saveDocument ( nsIDOMDocument document , nsISupports file , nsISupports dataPath , char* outputContentType , PRUint32 encodingFlags , PRUint32 wrapColumn )
void saveURI ( nsIURI URI , nsISupports cacheKey , nsIURI referrer , nsIInputStream postData , char* extraHeaders , nsISupports file )
Cancels the current operation. The caller is responsible for cleaning up partially written files or directories. This has the same effect as calling cancel with an argument of NS_BINDING_ABORTED.
void saveChannel ( nsIChannel channel , nsISupports file )
Save a channel to a file. It must not be opened yet.
- Arguments:
- channel
- file
void saveDocument ( nsIDOMDocument document , nsISupports file , nsISupports dataPath , char* outputContentType , PRUint32 encodingFlags , PRUint32 wrapColumn )
Save the specified DOM document to file and optionally all linked files (e.g. images, CSS, JS & subframes). Do not call this method until the document has finished loading!
- Arguments:
- document: Document to save to file. Some implementations of this interface may also support
nsnull
to imply the currently loaded document. - file: Target local file. This may be a nsILocalFile object or an nsIURI object with a file scheme or a scheme that supports uploading (e.g. ftp).
- dataPath: Path to directory where URIs linked to the document are saved or nsnull if no linked URIs should be saved. This may be a nsILocalFile object or an nsIURI object with a file scheme.
- outputContentType: The desired MIME type format to save the document and all subdocuments into or nsnull to use the default behaviour.
- encodingFlags: Flags to pass to the encoder.
- wrapColumn: For text documents, indicates the desired width to wrap text at. Parameter is ignored if wrapping is not specified by the encoding flags.
- Returns:
- NS_ERROR_INVALID_ARG One or more arguments was invalid.
void saveURI ( nsIURI URI , nsISupports cacheKey , nsIURI referrer , nsIInputStream postData , char* extraHeaders , nsISupports file )
Save the specified URI to file.
- Arguments:
- URI: URI to save to file. Some implementations of this interface may also support
nsnull
to imply the currently loaded URI. - cacheKey: An object representing the URI in the cache or
nsnull
. - referrer: The referrer URI to pass with an HTTP request or
nsnull
. - postData: Post data to pass with an HTTP request or
nsnull
. - extraHeaders: Additional headers to supply with an HTTP request or
nsnull
. - file: Target file. This may be a nsILocalFile object or an nsIURI object with a file scheme or a scheme that supports uploading (e.g. ftp).
- Returns:
- NS_ERROR_INVALID_ARG One or more arguments was invalid.
Reference documentation is generated from Mozilla's source.