Back to index

lightning-sunbird  0.9+nobinonly
nsIWebBrowserPersist.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is the Mozilla browser.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications, Inc.
00020  * Portions created by the Initial Developer are Copyright (C) 1999
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Adam Lock <adamlock@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #include "nsICancelable.idl"
00041 
00042 interface nsIURI;
00043 interface nsIInputStream;
00044 interface nsIDOMDocument;
00045 interface nsIWebProgressListener;
00046 interface nsILocalFile;
00047 interface nsIChannel;
00048 
00054 [scriptable, uuid(dd4e0a6a-210f-419a-ad85-40e8543b9465)]
00055 interface nsIWebBrowserPersist : nsICancelable
00056 {
00058   const unsigned long PERSIST_FLAGS_NONE = 0;
00060   const unsigned long PERSIST_FLAGS_FROM_CACHE = 1;
00062   const unsigned long PERSIST_FLAGS_BYPASS_CACHE = 2;
00064   const unsigned long PERSIST_FLAGS_IGNORE_REDIRECTED_DATA = 4;
00066   const unsigned long PERSIST_FLAGS_IGNORE_IFRAMES = 8;
00068   const unsigned long PERSIST_FLAGS_NO_CONVERSION = 16;
00070   const unsigned long PERSIST_FLAGS_REPLACE_EXISTING_FILES = 32;
00072   const unsigned long PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS = 64;
00074   const unsigned long PERSIST_FLAGS_FIXUP_ORIGINAL_DOM = 128;
00076   const unsigned long PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION = 256;
00078   const unsigned long PERSIST_FLAGS_DONT_FIXUP_LINKS = 512;
00080   const unsigned long PERSIST_FLAGS_SERIALIZE_OUTPUT = 1024;
00082   const unsigned long PERSIST_FLAGS_DONT_CHANGE_FILENAMES = 2048;
00084   const unsigned long PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS = 4096;
00090   const unsigned long PERSIST_FLAGS_CLEANUP_ON_FAILURE = 8192;
00096   const unsigned long PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION = 16384;
00097 
00098 
00104   attribute unsigned long persistFlags;
00105     
00107   const unsigned long PERSIST_STATE_READY = 1;
00109   const unsigned long PERSIST_STATE_SAVING = 2;
00111   const unsigned long PERSIST_STATE_FINISHED = 3;
00112 
00116   readonly attribute unsigned long currentState;
00117 
00126   readonly attribute unsigned long result;
00127 
00137   attribute nsIWebProgressListener progressListener;
00138 
00164   void saveURI(in nsIURI aURI, in nsISupports aCacheKey,
00165       in nsIURI aReferrer, in nsIInputStream aPostData,
00166       in string aExtraHeaders, in nsISupports aFile);
00167 
00172   void saveChannel(in nsIChannel aChannel, in nsISupports aFile);
00173 
00175   const unsigned long ENCODE_FLAGS_SELECTION_ONLY = 1;
00181   const unsigned long ENCODE_FLAGS_FORMATTED = 2;
00186   const unsigned long ENCODE_FLAGS_RAW = 4;
00188   const unsigned long ENCODE_FLAGS_BODY_ONLY = 8;
00190   const unsigned long ENCODE_FLAGS_PREFORMATTED = 16;
00192   const unsigned long ENCODE_FLAGS_WRAP = 32;
00199   const unsigned long ENCODE_FLAGS_FORMAT_FLOWED = 64;
00201   const unsigned long ENCODE_FLAGS_ABSOLUTE_LINKS = 128;
00202 
00209   const unsigned long ENCODE_FLAGS_ENCODE_W3C_ENTITIES = 256;
00210 
00216   const unsigned long ENCODE_FLAGS_CR_LINEBREAKS = 512;
00222   const unsigned long ENCODE_FLAGS_LF_LINEBREAKS = 1024;
00224   const unsigned long ENCODE_FLAGS_NOSCRIPT_CONTENT = 2048;
00226   const unsigned long ENCODE_FLAGS_NOFRAMES_CONTENT = 4096;
00227 
00233   const unsigned long ENCODE_FLAGS_ENCODE_BASIC_ENTITIES = 8192;
00238   const unsigned long ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES = 16384;
00243   const unsigned long ENCODE_FLAGS_ENCODE_HTML_ENTITIES = 32768;
00244 
00274   void saveDocument(in nsIDOMDocument aDocument,
00275      in nsISupports aFile, in nsISupports aDataPath,
00276      in string aOutputContentType, in unsigned long aEncodingFlags,
00277      in unsigned long aWrapColumn);
00278 
00284   void cancelSave();
00285 };