michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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: #ifndef nsReadConfig_h michael@0: #define nsReadConfig_h michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIReadConfig.h" michael@0: #include "nsIAutoConfig.h" michael@0: #include "nsIObserver.h" michael@0: michael@0: michael@0: class nsReadConfig : public nsIReadConfig, michael@0: public nsIObserver michael@0: { michael@0: michael@0: public: michael@0: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSIREADCONFIG michael@0: NS_DECL_NSIOBSERVER michael@0: michael@0: nsReadConfig(); michael@0: virtual ~nsReadConfig(); michael@0: michael@0: nsresult Init(); michael@0: michael@0: protected: michael@0: michael@0: nsresult readConfigFile(); michael@0: nsresult openAndEvaluateJSFile(const char *aFileName, int32_t obscureValue, michael@0: bool isEncoded, bool isBinDir); michael@0: bool mRead; michael@0: private: michael@0: nsCOMPtr mAutoConfig; michael@0: }; michael@0: michael@0: #endif