Fix typo in 9b54bd30006c008b4a951331b273613d5bac3abf
[pm.git] / startupcache / nsIStartupCache.idl
blobece38b4edb65433806e160b090ec2d47ea40f9cf
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
7 #include "nsIInputStream.idl"
8 #include "nsISupports.idl"
9 #include "nsIObserver.idl"
10 #include "nsIObjectOutputStream.idl"
12 [uuid(25957820-90a1-428c-8739-b0845d3cc534)]
13 interface nsIStartupCache : nsISupports
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. */
21 uint32_t getBuffer(in string aID, out charPtr aBuffer);
22 void putBuffer(in string aID, in string aBuffer,
23 in uint32_t aLength);
25 void invalidateCache();
27 void ignoreDiskCache();
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);
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).
39 boolean startupWriteComplete();
40 void resetStartupWriteTimer();
42 /* Instruct clients to always post cache ages to Telemetry, even in
43 cases where it would not normally make sense. */
44 void recordAgesAlways();
46 /* Allows clients to simulate the behavior of ObserverService. */
47 readonly attribute nsIObserver observer;