Bug 601299: Find RegExpStatics in cx->globalObject if necessary. (r=mrbkap)
[mozilla-central.git] / netwerk / cache / nsICacheVisitor.idl
blob4c589f6daac61602abb4486099718a8e4ec1452f
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is nsICacheVisitor.idl, released
17 * February 23, 2001.
19 * The Initial Developer of the Original Code is
20 * Netscape Communications Corporation.
21 * Portions created by the Initial Developer are Copyright (C) 2001
22 * the Initial Developer. All Rights Reserved.
24 * Contributor(s):
25 * Gordon Sheridan <gordon@netscape.com>
26 * Patrick Beard <beard@netscape.com>
27 * Darin Fisher <darin@netscape.com>
29 * Alternatively, the contents of this file may be used under the terms of
30 * either the GNU General Public License Version 2 or later (the "GPL"), or
31 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
32 * in which case the provisions of the GPL or the LGPL are applicable instead
33 * of those above. If you wish to allow use of your version of this file only
34 * under the terms of either the GPL or the LGPL, and not to allow others to
35 * use your version of this file under the terms of the MPL, indicate your
36 * decision by deleting the provisions above and replace them with the notice
37 * and other provisions required by the GPL or the LGPL. If you do not delete
38 * the provisions above, a recipient may use your version of this file under
39 * the terms of any one of the MPL, the GPL or the LGPL.
41 * ***** END LICENSE BLOCK ***** */
43 #include "nsISupports.idl"
45 /* XXX we should define device and entry info as well (stats, etc) */
47 interface nsICacheDeviceInfo;
48 interface nsICacheEntryInfo;
51 [scriptable, uuid(f8c08c4b-d778-49d1-a59b-866fdc500d95)]
52 interface nsICacheVisitor : nsISupports
54 /**
55 * Called to provide information about a cache device.
57 * @param deviceID - specifies the device being visited.
58 * @param deviceInfo - specifies information about this device.
60 * @return true to start visiting all entries for this device.
61 * @return false to advance to the next device.
63 boolean visitDevice(in string deviceID,
64 in nsICacheDeviceInfo deviceInfo);
66 /**
67 * Called to provide information about a cache entry.
69 * @param deviceID - specifies the device being visited.
70 * @param entryInfo - specifies information about this entry.
72 * @return true to visit the next entry on the current device, or if the
73 * end of the device has been reached, advance to the next device.
74 * @return false to advance to the next device.
76 boolean visitEntry(in string deviceID,
77 in nsICacheEntryInfo entryInfo);
81 [scriptable, uuid(31d1c294-1dd2-11b2-be3a-c79230dca297)]
82 interface nsICacheDeviceInfo : nsISupports
84 /**
85 * Get a human readable description of the cache device.
87 readonly attribute string description;
89 /**
90 * Get a usage report, statistics, miscellaneous data about
91 * the cache device.
93 readonly attribute string usageReport;
95 /**
96 * Get the number of stored cache entries.
98 readonly attribute unsigned long entryCount;
101 * Get the total size of the stored cache entries.
103 readonly attribute unsigned long totalSize;
106 * Get the upper limit of the size of the data the cache can store.
108 readonly attribute unsigned long maximumSize;
112 [scriptable, uuid(fab51c92-95c3-4468-b317-7de4d7588254)]
113 interface nsICacheEntryInfo : nsISupports
116 * Get the client id associated with this cache entry.
118 readonly attribute string clientID;
121 * Get the id for the device that stores this cache entry.
123 readonly attribute string deviceID;
126 * Get the key identifying the cache entry.
128 readonly attribute ACString key;
131 * Get the number of times the cache entry has been opened.
133 readonly attribute long fetchCount;
136 * Get the last time the cache entry was opened (in seconds since the Epoch).
138 readonly attribute PRUint32 lastFetched;
141 * Get the last time the cache entry was modified (in seconds since the Epoch).
143 readonly attribute PRUint32 lastModified;
146 * Get the expiration time of the cache entry (in seconds since the Epoch).
148 readonly attribute PRUint32 expirationTime;
151 * Get the cache entry data size.
153 readonly attribute unsigned long dataSize;
156 * Find out whether or not the cache entry is stream based.
158 boolean isStreamBased();