Struct xpcom::interfaces::nsIWebBrowserPersist
[−]
[src]
#[repr(C)]pub struct nsIWebBrowserPersist { /* fields omitted */ }
interface nsIWebBrowserPersist : nsICancelable
/**
* Interface for persisting DOM documents and URIs to local or remote storage.
*/
Methods
impl nsIWebBrowserPersist
[src]
pub fn coerce<T: nsIWebBrowserPersistCoerce>(&self) -> &T
[src]
Cast this nsIWebBrowserPersist
to one of its base interfaces.
impl nsIWebBrowserPersist
[src]
pub const PERSIST_FLAGS_NONE: i64
PERSIST_FLAGS_NONE: i64 = 0
/** No special persistence behaviour. */
pub const PERSIST_FLAGS_FROM_CACHE: i64
PERSIST_FLAGS_FROM_CACHE: i64 = 1
/** Use cached data if present (skipping validation), else load from network */
pub const PERSIST_FLAGS_BYPASS_CACHE: i64
PERSIST_FLAGS_BYPASS_CACHE: i64 = 2
/** Bypass the cached data. */
pub const PERSIST_FLAGS_IGNORE_REDIRECTED_DATA: i64
PERSIST_FLAGS_IGNORE_REDIRECTED_DATA: i64 = 4
/** Ignore any redirected data (usually adverts). */
pub const PERSIST_FLAGS_IGNORE_IFRAMES: i64
PERSIST_FLAGS_IGNORE_IFRAMES: i64 = 8
/** Ignore IFRAME content (usually adverts). */
pub const PERSIST_FLAGS_NO_CONVERSION: i64
PERSIST_FLAGS_NO_CONVERSION: i64 = 16
/** Do not run the incoming data through a content converter e.g. to decompress it */
pub const PERSIST_FLAGS_REPLACE_EXISTING_FILES: i64
PERSIST_FLAGS_REPLACE_EXISTING_FILES: i64 = 32
/** Replace existing files on the disk (use with due diligence!) */
pub const PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS: i64
PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS: i64 = 64
/** Don't modify or add base tags */
pub const PERSIST_FLAGS_FIXUP_ORIGINAL_DOM: i64
PERSIST_FLAGS_FIXUP_ORIGINAL_DOM: i64 = 128
/** Make changes to original dom rather than cloning nodes */
pub const PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION: i64
PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION: i64 = 256
/** Fix links relative to destination location (not origin) */
pub const PERSIST_FLAGS_DONT_FIXUP_LINKS: i64
PERSIST_FLAGS_DONT_FIXUP_LINKS: i64 = 512
/** Don't make any adjustments to links */
pub const PERSIST_FLAGS_SERIALIZE_OUTPUT: i64
PERSIST_FLAGS_SERIALIZE_OUTPUT: i64 = 1024
/** Force serialization of output (one file at a time; not concurrent) */
pub const PERSIST_FLAGS_DONT_CHANGE_FILENAMES: i64
PERSIST_FLAGS_DONT_CHANGE_FILENAMES: i64 = 2048
/** Don't make any adjustments to filenames */
pub const PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS: i64
PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS: i64 = 4096
/** Fail on broken inline links */
pub const PERSIST_FLAGS_CLEANUP_ON_FAILURE: i64
PERSIST_FLAGS_CLEANUP_ON_FAILURE: i64 = 8192
/**
* 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.
*/
pub const PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION: i64
PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION: i64 = 16384
/**
* 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.
*/
pub const PERSIST_FLAGS_APPEND_TO_FILE: i64
PERSIST_FLAGS_APPEND_TO_FILE: i64 = 32768
/**
* Append the downloaded data to the target file.
* This can only be used when persisting to a local file.
*/
pub const PERSIST_FLAGS_FORCE_ALLOW_COOKIES: i64
PERSIST_FLAGS_FORCE_ALLOW_COOKIES: i64 = 65536
/**
* Force relevant cookies to be sent with this load even if normally they
* wouldn't be.
*/
pub const PERSIST_STATE_READY: i64
PERSIST_STATE_READY: i64 = 1
/** Persister is ready to save data */
pub const PERSIST_STATE_SAVING: i64
PERSIST_STATE_SAVING: i64 = 2
/** Persister is saving data */
pub const PERSIST_STATE_FINISHED: i64
PERSIST_STATE_FINISHED: i64 = 3
/** Persister has finished saving data */
pub const ENCODE_FLAGS_SELECTION_ONLY: i64
ENCODE_FLAGS_SELECTION_ONLY: i64 = 1
/** Output only the current selection as opposed to the whole document. */
pub const ENCODE_FLAGS_FORMATTED: i64
ENCODE_FLAGS_FORMATTED: i64 = 2
/**
* 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.
*/
pub const ENCODE_FLAGS_RAW: i64
ENCODE_FLAGS_RAW: i64 = 4
/**
* Output without formatting or wrapping the content. This flag
* may be used to preserve the original formatting as much as possible.
*/
pub const ENCODE_FLAGS_BODY_ONLY: i64
ENCODE_FLAGS_BODY_ONLY: i64 = 8
/** Output only the body section, no HTML tags. */
pub const ENCODE_FLAGS_PREFORMATTED: i64
ENCODE_FLAGS_PREFORMATTED: i64 = 16
/** Wrap even if when not doing formatted output (e.g. for text fields). */
pub const ENCODE_FLAGS_WRAP: i64
ENCODE_FLAGS_WRAP: i64 = 32
/** Wrap documents at the specified column. */
pub const ENCODE_FLAGS_FORMAT_FLOWED: i64
ENCODE_FLAGS_FORMAT_FLOWED: i64 = 64
/**
* 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.
*/
pub const ENCODE_FLAGS_ABSOLUTE_LINKS: i64
ENCODE_FLAGS_ABSOLUTE_LINKS: i64 = 128
/** Convert links to absolute links where possible. */
pub const ENCODE_FLAGS_CR_LINEBREAKS: i64
ENCODE_FLAGS_CR_LINEBREAKS: i64 = 512
/**
* 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.
*/
pub const ENCODE_FLAGS_LF_LINEBREAKS: i64
ENCODE_FLAGS_LF_LINEBREAKS: i64 = 1024
/**
* 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.
*/
pub const ENCODE_FLAGS_NOSCRIPT_CONTENT: i64
ENCODE_FLAGS_NOSCRIPT_CONTENT: i64 = 2048
/** For plaintext output. Output the content of noscript elements. */
pub const ENCODE_FLAGS_NOFRAMES_CONTENT: i64
ENCODE_FLAGS_NOFRAMES_CONTENT: i64 = 4096
/** For plaintext output. Output the content of noframes elements. */
pub const ENCODE_FLAGS_ENCODE_BASIC_ENTITIES: i64
ENCODE_FLAGS_ENCODE_BASIC_ENTITIES: i64 = 8192
/**
* 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.
*/
pub unsafe fn GetPersistFlags(&self, aPersistFlags: *mut uint32_t) -> nsresult
[src]
/**
* 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.
*/
attribute unsigned long persistFlags;
pub unsafe fn SetPersistFlags(&self, aPersistFlags: uint32_t) -> nsresult
[src]
/**
* 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.
*/
attribute unsigned long persistFlags;
pub unsafe fn GetCurrentState(&self, aCurrentState: *mut uint32_t) -> nsresult
[src]
/**
* Current state of the persister object.
*/
readonly attribute unsigned long currentState;
pub unsafe fn GetResult(&self, aResult: *mut nsresult) -> nsresult
[src]
/**
* Value indicating the success or failure of the persist
* operation.
*
* @throws NS_BINDING_ABORTED Operation cancelled.
* @throws NS_ERROR_FAILURE Non-specific failure.
*/
readonly attribute nsresult result;
pub unsafe fn GetProgressListener(
&self,
aProgressListener: *mut *const nsIWebProgressListener
) -> nsresult
[src]
&self,
aProgressListener: *mut *const nsIWebProgressListener
) -> nsresult
/**
* 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.
*
* @see nsIAuthPrompt
* @see nsIInterfaceRequestor
*/
attribute nsIWebProgressListener progressListener;
pub unsafe fn SetProgressListener(
&self,
aProgressListener: *const nsIWebProgressListener
) -> nsresult
[src]
&self,
aProgressListener: *const nsIWebProgressListener
) -> nsresult
/**
* 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.
*
* @see nsIAuthPrompt
* @see nsIInterfaceRequestor
*/
attribute nsIWebProgressListener progressListener;
pub unsafe fn SaveURI(
&self,
aURI: *const nsIURI,
aCacheKey: *const nsISupports,
aReferrer: *const nsIURI,
aReferrerPolicy: uint32_t,
aPostData: *const nsIInputStream,
aExtraHeaders: *const c_char,
aFile: *const nsISupports,
aPrivacyContext: *const nsILoadContext
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aCacheKey: *const nsISupports,
aReferrer: *const nsIURI,
aReferrerPolicy: uint32_t,
aPostData: *const nsIInputStream,
aExtraHeaders: *const c_char,
aFile: *const nsISupports,
aPrivacyContext: *const nsILoadContext
) -> nsresult
/**
* Save the specified URI to file.
*
* @param aURI URI to save to file. Some implementations of this interface
* may also support <CODE>nullptr</CODE> to imply the currently
* loaded URI.
* @param aCacheKey An object representing the URI in the cache or
* <CODE>nullptr</CODE>. This can be a necko cache key,
* an nsIWebPageDescriptor, or the currentDescriptor of an
* nsIWebPageDescriptor.
* @param aReferrer The referrer URI to pass with an HTTP request or
* <CODE>nullptr</CODE>.
* @param aReferrerPolicy The referrer policy for when and what to send via
* HTTP Referer header. Ignored if aReferrer is
* <CODE>nullptr</CODE>. Taken from REFERRER_POLICY
* constants in nsIHttpChannel.
* @param aPostData Post data to pass with an HTTP request or
* <CODE>nullptr</CODE>.
* @param aExtraHeaders Additional headers to supply with an HTTP request
* or <CODE>nullptr</CODE>.
* @param aFile Target file. This may be a nsIFile object or an
* nsIURI object with a file scheme or a scheme that
* supports uploading (e.g. ftp).
* @param aPrivacyContext A context from which the privacy status of this
* save operation can be determined. Must only be null
* in situations in which no such context is available
* (eg. the operation has no logical association with any
* window or document)
*
* @see nsIFile
* @see nsIURI
* @see nsIInputStream
*
* @throws NS_ERROR_INVALID_ARG One or more arguments was invalid.
*/
void saveURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile, in nsILoadContext aPrivacyContext);
pub unsafe fn SavePrivacyAwareURI(
&self,
aURI: *const nsIURI,
aCacheKey: *const nsISupports,
aReferrer: *const nsIURI,
aReferrerPolicy: uint32_t,
aPostData: *const nsIInputStream,
aExtraHeaders: *const c_char,
aFile: *const nsISupports,
aIsPrivate: bool
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aCacheKey: *const nsISupports,
aReferrer: *const nsIURI,
aReferrerPolicy: uint32_t,
aPostData: *const nsIInputStream,
aExtraHeaders: *const c_char,
aFile: *const nsISupports,
aIsPrivate: bool
) -> nsresult
/**
* @param aIsPrivate Treat the save operation as private (ie. with
* regards to networking operations and persistence
* of intermediate data, etc.)
* @see saveURI for all other parameter descriptions
*/
void savePrivacyAwareURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile, in boolean aIsPrivate);
pub unsafe fn SaveChannel(
&self,
aChannel: *const nsIChannel,
aFile: *const nsISupports
) -> nsresult
[src]
&self,
aChannel: *const nsIChannel,
aFile: *const nsISupports
) -> nsresult
/**
* Save a channel to a file. It must not be opened yet.
* @see saveURI
*/
void saveChannel (in nsIChannel aChannel, in nsISupports aFile);
pub unsafe fn SaveDocument(
&self,
aDocument: *const nsISupports,
aFile: *const nsISupports,
aDataPath: *const nsISupports,
aOutputContentType: *const c_char,
aEncodingFlags: uint32_t,
aWrapColumn: uint32_t
) -> nsresult
[src]
&self,
aDocument: *const nsISupports,
aFile: *const nsISupports,
aDataPath: *const nsISupports,
aOutputContentType: *const c_char,
aEncodingFlags: uint32_t,
aWrapColumn: uint32_t
) -> nsresult
/**
* 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!
*
* @param aDocument Document to save to file. Some implementations of
* this interface may also support <CODE>nullptr</CODE>
* to imply the currently loaded document. Can be an
* nsIWebBrowserPersistDocument or nsIDOMDocument.
* @param aFile Target local file. This may be a nsIFile object or an
* nsIURI object with a file scheme or a scheme that
* supports uploading (e.g. ftp).
* @param aDataPath Path to directory where URIs linked to the document
* are saved or nullptr if no linked URIs should be saved.
* This may be a nsIFile object or an nsIURI object
* with a file scheme.
* @param aOutputContentType The desired MIME type format to save the
* document and all subdocuments into or nullptr to use
* the default behaviour.
* @param aEncodingFlags Flags to pass to the encoder.
* @param aWrapColumn For text documents, indicates the desired width to
* wrap text at. Parameter is ignored if wrapping is not
* specified by the encoding flags.
*
* @see nsIWebBrowserPersistDocument
* @see nsIWebBrowserPersistable
* @see nsIFile
* @see nsIURI
*
* @throws NS_ERROR_INVALID_ARG One or more arguments was invalid.
*/
void saveDocument (in nsISupports aDocument, in nsISupports aFile, in nsISupports aDataPath, in string aOutputContentType, in unsigned long aEncodingFlags, in unsigned long aWrapColumn);
pub unsafe fn CancelSave(&self) -> nsresult
[src]
/**
* 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 cancelSave ();
Methods from Deref<Target = nsICancelable>
pub fn coerce<T: nsICancelableCoerce>(&self) -> &T
[src]
Cast this nsICancelable
to one of its base interfaces.
pub unsafe fn Cancel(&self, aReason: nsresult) -> nsresult
[src]
/**
* Call this method to request that this object abort whatever operation it
* may be performing.
*
* @param aReason
* Pass a failure code to indicate the reason why this operation is
* being canceled. It is an error to pass a success code.
*/
void cancel (in nsresult aReason);
Trait Implementations
impl XpCom for nsIWebBrowserPersist
[src]
const IID: nsIID
IID: nsIID = nsID(2362921636, 24753, 17091, [168, 25, 101, 199, 161, 19, 138, 40])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIWebBrowserPersist
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIWebBrowserPersist
[src]
type Target = nsICancelable
The resulting type after dereferencing.
fn deref(&self) -> &nsICancelable
[src]
Dereferences the value.