1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/protocol/wyciwyg/nsIWyciwygChannel.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsIChannel.idl" 1.10 + 1.11 +/** 1.12 + * A channel to manage all cache-related interactions for layout 1.13 + * when it is dealing with dynamic pages created through 1.14 + * document.write(). This interface provides methods that will 1.15 + * help layout save dynamic pages in cache for future retrievals. 1.16 + */ 1.17 + 1.18 +[scriptable, uuid (89b0674a-9e2f-4124-9b59-481444be841d)] 1.19 +interface nsIWyciwygChannel : nsIChannel 1.20 +{ 1.21 + /** 1.22 + * Append data to the cache entry; opens the cache entry if necessary. 1.23 + */ 1.24 + void writeToCacheEntry(in AString aData); 1.25 + 1.26 + /** 1.27 + * Close the cache entry; subsequent writes have undefined behavior. 1.28 + */ 1.29 + void closeCacheEntry(in nsresult reason); 1.30 + 1.31 + /** 1.32 + * Set the wyciwyg channels security info 1.33 + */ 1.34 + void setSecurityInfo(in nsISupports aSecurityInfo); 1.35 + 1.36 + /** 1.37 + * Store and read a charset and charset source on the wyciwyg channel. These 1.38 + * are opaque values to the channel; consumers who set them should know what 1.39 + * they mean. 1.40 + */ 1.41 + void setCharsetAndSource(in long aSource, in ACString aCharset); 1.42 + /** 1.43 + * The return value is the charset. Throws if either the charset or the 1.44 + * source cannot be retrieved. This is guaranteed to return a nonzero source 1.45 + * and a nonempty charset if it does not throw. 1.46 + */ 1.47 + ACString getCharsetAndSource(out long aSource); 1.48 +};