1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 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 #ifndef NSPRINTERPOSER_H_ 8 #define NSPRINTERPOSER_H_ 9 10 namespace mozilla { 11 12 /** 13 * Initialize IO interposing for NSPR. This will report NSPR read, writes and 14 * fsyncs to the IOInterposerObserver. It is only safe to call this from the 15 * main-thread when no other threads are running. 16 */ 17 void InitNSPRIOInterposing(); 18 19 /** 20 * Removes interception of NSPR IO methods as setup by InitNSPRIOInterposing. 21 * Note, that it is only safe to call this on the main-thread when all other 22 * threads have stopped. Which is typically the case at shutdown. 23 */ 24 void ClearNSPRIOInterposing(); 25 26 } // namespace mozilla 27 28 #endif // NSPRINTERPOSER_H_ 29