[not part of build] Added file attribute to nsICacheEntryDescriptor, added STORE_ON_DISK_AS_FILE to nsICache.

This commit is contained in:
beard%netscape.com 2001-03-07 01:37:42 +00:00
parent c49a15e1f8
commit d4c0c120f1
2 changed files with 19 additions and 10 deletions

View File

@ -117,17 +117,20 @@ interface nsICache
* it belongs. See nsICacheSession and nsICacheEntryDescriptor for more
* details.
*
* STORE_ANYWHERE - Allows the cache entry to be stored in any device.
* The cache service decides which cache device to use
* based on "some resource management calculation."
* STORE_IN_MEMORY - Requires the cache entry to reside in non-persistent
* storage (ie. typically in system RAM).
* STORE_ON_DISK - Requires the cache entry to reside in persistent
* storage (ie. typically on a system's hard disk).
* STORE_ANYWHERE - Allows the cache entry to be stored in any device.
* The cache service decides which cache device to use
* based on "some resource management calculation."
* STORE_IN_MEMORY - Requires the cache entry to reside in non-persistent
* storage (ie. typically in system RAM).
* STORE_ON_DISK - Requires the cache entry to reside in persistent
* storage (ie. typically on a system's hard disk).
* STORE_ON_DISK_AS_DISK - Requires the cache entry to reside in persistent
* storage, and in a specific file.
*/
const nsCacheStoragePolicy STORE_ANYWHERE = 0;
const nsCacheStoragePolicy STORE_IN_MEMORY = 1;
const nsCacheStoragePolicy STORE_ON_DISK = 2;
const nsCacheStoragePolicy STORE_ANYWHERE = 0;
const nsCacheStoragePolicy STORE_IN_MEMORY = 1;
const nsCacheStoragePolicy STORE_ON_DISK = 2;
const nsCacheStoragePolicy STORE_ON_DISK_AS_FILE = 3;
/**
* All entries for a cache session are stored as streams of data or

View File

@ -29,6 +29,7 @@
interface nsISimpleEnumerator;
interface nsICacheListener;
interface nsIFile;
[scriptable, uuid(49c1a11d-f5d2-4f09-8262-551e64908ada)]
interface nsICacheEntryDescriptor : nsISupports
@ -94,6 +95,11 @@ interface nsICacheEntryDescriptor : nsISupports
* the definitions of the storage policies.
*/
attribute nsCacheStoragePolicy storagePolicy;
/**
* Get the disk file associated with the cache entry.
*/
readonly attribute nsIFile file;
/**
* Doom the cache entry this descriptor references in order to slate it for