tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsReadConfig.h (847B)


      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef nsReadConfig_h
      7 #define nsReadConfig_h
      8 
      9 #include "mozilla/RefPtr.h"
     10 #include "nsAutoConfig.h"
     11 #include "nsIObserver.h"
     12 
     13 class nsReadConfig final : public nsIObserver {
     14 public:
     15  NS_DECL_THREADSAFE_ISUPPORTS
     16  NS_DECL_NSIOBSERVER
     17 
     18  nsReadConfig();
     19 
     20  nsresult Init();
     21 
     22 protected:
     23  virtual ~nsReadConfig();
     24 
     25  nsresult readConfigFile();
     26  nsresult openAndEvaluateJSFile(const char* aFileName, int32_t obscureValue,
     27                                 bool isEncoded, bool isBinDir);
     28  bool mRead;
     29 
     30 private:
     31  RefPtr<nsAutoConfig> mAutoConfig;
     32 };
     33 
     34 #endif