michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIChannel.idl" michael@0: michael@0: /** michael@0: * A channel to manage all cache-related interactions for layout michael@0: * when it is dealing with dynamic pages created through michael@0: * document.write(). This interface provides methods that will michael@0: * help layout save dynamic pages in cache for future retrievals. michael@0: */ michael@0: michael@0: [scriptable, uuid (89b0674a-9e2f-4124-9b59-481444be841d)] michael@0: interface nsIWyciwygChannel : nsIChannel michael@0: { michael@0: /** michael@0: * Append data to the cache entry; opens the cache entry if necessary. michael@0: */ michael@0: void writeToCacheEntry(in AString aData); michael@0: michael@0: /** michael@0: * Close the cache entry; subsequent writes have undefined behavior. michael@0: */ michael@0: void closeCacheEntry(in nsresult reason); michael@0: michael@0: /** michael@0: * Set the wyciwyg channels security info michael@0: */ michael@0: void setSecurityInfo(in nsISupports aSecurityInfo); michael@0: michael@0: /** michael@0: * Store and read a charset and charset source on the wyciwyg channel. These michael@0: * are opaque values to the channel; consumers who set them should know what michael@0: * they mean. michael@0: */ michael@0: void setCharsetAndSource(in long aSource, in ACString aCharset); michael@0: /** michael@0: * The return value is the charset. Throws if either the charset or the michael@0: * source cannot be retrieved. This is guaranteed to return a nonzero source michael@0: * and a nonempty charset if it does not throw. michael@0: */ michael@0: ACString getCharsetAndSource(out long aSource); michael@0: };