|
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #include "nsIInputStream.idl" |
|
8 #include "nsISupports.idl" |
|
9 #include "nsIObserver.idl" |
|
10 #include "nsIObjectOutputStream.idl" |
|
11 |
|
12 [uuid(25957820-90a1-428c-8739-b0845d3cc534)] |
|
13 interface nsIStartupCache : nsISupports |
|
14 { |
|
15 |
|
16 /** This interface is provided for testing purposes only, basically |
|
17 * just to solve link vagaries. See docs in StartupCache.h |
|
18 * GetBuffer, PutBuffer, and InvalidateCache act as described |
|
19 * in that file. */ |
|
20 |
|
21 uint32_t getBuffer(in string aID, out charPtr aBuffer); |
|
22 void putBuffer(in string aID, in string aBuffer, |
|
23 in uint32_t aLength); |
|
24 |
|
25 void invalidateCache(); |
|
26 |
|
27 void ignoreDiskCache(); |
|
28 |
|
29 /** In debug builds, wraps this object output stream with a stream that will |
|
30 * detect and prevent the write of a multiply-referenced non-singleton object |
|
31 * during serialization. In non-debug, returns an add-ref'd pointer to |
|
32 * original stream, unwrapped. */ |
|
33 nsIObjectOutputStream getDebugObjectOutputStream(in nsIObjectOutputStream aStream); |
|
34 |
|
35 /* Allows clients to check whether the one-time writeout after startup |
|
36 * has finished yet, and also to set this variable as needed (so test |
|
37 * code can fire mulitple startup writes if needed). |
|
38 */ |
|
39 boolean startupWriteComplete(); |
|
40 void resetStartupWriteTimer(); |
|
41 |
|
42 /* Instruct clients to always post cache ages to Telemetry, even in |
|
43 cases where it would not normally make sense. */ |
|
44 void recordAgesAlways(); |
|
45 |
|
46 /* Allows clients to simulate the behavior of ObserverService. */ |
|
47 readonly attribute nsIObserver observer; |
|
48 }; |
|
49 |