@mozilla.org/embedding/browser/nsWebBrowserPersist;1

This component implements the following interfaces:

Constants

PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_NONE = 0
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_FROM_CACHE = 1
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_BYPASS_CACHE = 2
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_IGNORE_REDIRECTED_DATA = 4
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_IGNORE_IFRAMES = 8
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_NO_CONVERSION = 16
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_REPLACE_EXISTING_FILES = 32
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS = 64
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_FIXUP_ORIGINAL_DOM = 128
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION = 256
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_DONT_FIXUP_LINKS = 512
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_SERIALIZE_OUTPUT = 1024
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_DONT_CHANGE_FILENAMES = 2048
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS = 4096
Automatically cleanup after a failed or cancelled operation, deleting all created files and directories. This flag does nothing for failed upload operations to remote servers.
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_CLEANUP_ON_FAILURE = 8192
Let the WebBrowserPersist decide whether the incoming data is encoded and whether it needs to go through a content converter e.g. to decompress it.
PRUint32 nsIWebBrowserPersist.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION = 16384
PRUint32 nsIWebBrowserPersist.PERSIST_STATE_READY = 1
PRUint32 nsIWebBrowserPersist.PERSIST_STATE_SAVING = 2
PRUint32 nsIWebBrowserPersist.PERSIST_STATE_FINISHED = 3
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_SELECTION_ONLY = 1
For plaintext output. Convert html to plaintext that looks like the html. Implies wrap (except inside <pre>), since html wraps. HTML output: always do prettyprinting, ignoring existing formatting.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_FORMATTED = 2
Output without formatting or wrapping the content. This flag may be used to preserve the original formatting as much as possible.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_RAW = 4
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_BODY_ONLY = 8
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_PREFORMATTED = 16
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_WRAP = 32
For plaintext output. Output for format flowed (RFC 2646). This is used when converting to text for mail sending. This differs just slightly but in an important way from normal formatted, and that is that lines are space stuffed. This can't (correctly) be done later.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_FORMAT_FLOWED = 64
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_ABSOLUTE_LINKS = 128
Attempt to encode entities standardized at W3C (HTML, MathML, etc). This is a catch-all flag for documents with mixed contents. Beware of interoperability issues. See below for other flags which might likely do what you want.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_ENCODE_W3C_ENTITIES = 256
Output with carriage return line breaks. May also be combined with ENCODE_FLAGS_LF_LINEBREAKS and if neither is specified, the platform default format is used.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_CR_LINEBREAKS = 512
Output with linefeed line breaks. May also be combined with ENCODE_FLAGS_CR_LINEBREAKS and if neither is specified, the platform default format is used.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_LF_LINEBREAKS = 1024
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_NOSCRIPT_CONTENT = 2048
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_NOFRAMES_CONTENT = 4096
Encode basic entities, e.g. output   instead of character code 0xa0. The basic set is just   & < > " for interoperability with older products that don't support α and friends.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_ENCODE_BASIC_ENTITIES = 8192
Encode Latin1 entities. This includes the basic set and accented letters between 128 and 255.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES = 16384
Encode HTML4 entities. This includes the basic set, accented letters, greek letters and certain special markup symbols.
PRUint32 nsIWebBrowserPersist.ENCODE_FLAGS_ENCODE_HTML_ENTITIES = 32768

Properties

readonly PRUint32 nsIWebBrowserPersist.currentState

Current state of the persister object.

PRUint32 nsIWebBrowserPersist.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 nsIWebBrowserPersist.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 nsIWebBrowserPersist.result

Value indicating the success or failure of the persist operation.

Methods

InterfaceMethod
nsICancelable void cancel ( nsresult reason )
nsIWebBrowserPersist void cancelSave ( )
nsIInterfaceRequestor void getInterface ( nsIIDRef uuid , out nsQIResult* result )
nsISupportsWeakReference nsIWeakReference GetWeakReference ( )
nsIStreamListener void onDataAvailable ( nsIRequest request , nsISupports context , nsIInputStream inputStream , PRUint32 offset , PRUint32 count )
nsIProgressEventSink void onProgress ( nsIRequest request , nsISupports context , PRUint64 progress , PRUint64 progressMax )
nsIRequestObserver void onStartRequest ( nsIRequest request , nsISupports context )
nsIProgressEventSink void onStatus ( nsIRequest request , nsISupports context , nsresult status , PRUnichar* statusArg )
nsIRequestObserver void onStopRequest ( nsIRequest request , nsISupports context , nsresult statusCode )
nsIWebBrowserPersist void saveChannel ( nsIChannel channel , nsISupports file )
nsIWebBrowserPersist void saveDocument ( nsIDOMDocument document , nsISupports file , nsISupports dataPath , char* outputContentType , PRUint32 encodingFlags , PRUint32 wrapColumn )
nsIWebBrowserPersist void saveURI ( nsIURI URI , nsISupports cacheKey , nsIURI referrer , nsIInputStream postData , char* extraHeaders , nsISupports file )

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com