michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIInputStream.idl" michael@0: #include "nsISupports.idl" michael@0: #include "nsIObserver.idl" michael@0: #include "nsIObjectOutputStream.idl" michael@0: michael@0: [uuid(25957820-90a1-428c-8739-b0845d3cc534)] michael@0: interface nsIStartupCache : nsISupports michael@0: { michael@0: michael@0: /** This interface is provided for testing purposes only, basically michael@0: * just to solve link vagaries. See docs in StartupCache.h michael@0: * GetBuffer, PutBuffer, and InvalidateCache act as described michael@0: * in that file. */ michael@0: michael@0: uint32_t getBuffer(in string aID, out charPtr aBuffer); michael@0: void putBuffer(in string aID, in string aBuffer, michael@0: in uint32_t aLength); michael@0: michael@0: void invalidateCache(); michael@0: michael@0: void ignoreDiskCache(); michael@0: michael@0: /** In debug builds, wraps this object output stream with a stream that will michael@0: * detect and prevent the write of a multiply-referenced non-singleton object michael@0: * during serialization. In non-debug, returns an add-ref'd pointer to michael@0: * original stream, unwrapped. */ michael@0: nsIObjectOutputStream getDebugObjectOutputStream(in nsIObjectOutputStream aStream); michael@0: michael@0: /* Allows clients to check whether the one-time writeout after startup michael@0: * has finished yet, and also to set this variable as needed (so test michael@0: * code can fire mulitple startup writes if needed). michael@0: */ michael@0: boolean startupWriteComplete(); michael@0: void resetStartupWriteTimer(); michael@0: michael@0: /* Instruct clients to always post cache ages to Telemetry, even in michael@0: cases where it would not normally make sense. */ michael@0: void recordAgesAlways(); michael@0: michael@0: /* Allows clients to simulate the behavior of ObserverService. */ michael@0: readonly attribute nsIObserver observer; michael@0: }; michael@0: