1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/image/public/imgICache.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIURI; 1.13 +interface imgIRequest; 1.14 +interface nsIProperties; 1.15 + 1.16 +/** 1.17 + * imgICache interface 1.18 + * 1.19 + * @author Stuart Parmenter <pavlov@netscape.com> 1.20 + * @version 0.1 1.21 + * @see imagelib2 1.22 + */ 1.23 +[scriptable, builtinclass, uuid(b06e0fa5-d6e2-4fa3-8fc0-7775aed96522)] 1.24 +interface imgICache : nsISupports 1.25 +{ 1.26 + /** 1.27 + * Evict images from the cache. 1.28 + * 1.29 + * @param chrome If TRUE, evict only chrome images. 1.30 + * If FALSE, evict everything except chrome images. 1.31 + */ 1.32 + void clearCache(in boolean chrome); 1.33 + 1.34 + /** 1.35 + * Evict images from the cache. 1.36 + * 1.37 + * @param uri The URI to remove. 1.38 + * @throws NS_ERROR_NOT_AVAILABLE if \a uri was unable to be removed from the cache. 1.39 + */ 1.40 + void removeEntry(in nsIURI uri); 1.41 + 1.42 + /** 1.43 + * Find Properties 1.44 + * Used to get properties such as 'type' and 'content-disposition' 1.45 + * 'type' is a nsISupportsCString containing the images' mime type such as 'image/png' 1.46 + * 'content-disposition' will be a nsISupportsCString containing the header 1.47 + * If you call this before any data has been loaded from a URI, it will succeed, 1.48 + * but come back empty. 1.49 + * 1.50 + * Hopefully this will be removed with bug 805119 1.51 + * 1.52 + * @param uri The URI to look up. 1.53 + * @returns NULL if the URL was not found in the cache 1.54 + */ 1.55 + nsIProperties findEntryProperties(in nsIURI uri); 1.56 + 1.57 + /** 1.58 + * Make this cache instance respect private browsing notifications. This entails clearing 1.59 + * the chrome and content caches whenever the last-pb-context-exited notification is 1.60 + * observed. 1.61 + */ 1.62 + void respectPrivacyNotifications(); 1.63 +};