Vitaly Buka | 4615e0d | 2015-10-14 15:35:12 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Weave Authors. All rights reserved. |
Vitaly Buka | 17b0a8a | 2015-08-31 19:12:35 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Johan Euphrosine | 3523fdd | 2015-10-14 20:46:05 -0700 | [diff] [blame] | 5 | #ifndef LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_ |
| 6 | #define LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_ |
Vitaly Buka | 17b0a8a | 2015-08-31 19:12:35 -0700 | [diff] [blame] | 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
Vitaly Buka | 1e36367 | 2015-09-25 14:01:16 -0700 | [diff] [blame] | 12 | #include <weave/provider/config_store.h> |
Vitaly Buka | 17b0a8a | 2015-08-31 19:12:35 -0700 | [diff] [blame] | 13 | |
| 14 | namespace weave { |
| 15 | namespace examples { |
| 16 | |
Vitaly Buka | 1e36367 | 2015-09-25 14:01:16 -0700 | [diff] [blame] | 17 | class FileConfigStore : public provider::ConfigStore { |
Vitaly Buka | 17b0a8a | 2015-08-31 19:12:35 -0700 | [diff] [blame] | 18 | public: |
Vitaly Buka | 41a90d6 | 2015-09-29 16:58:39 -0700 | [diff] [blame] | 19 | explicit FileConfigStore(bool disable_security); |
| 20 | |
Vitaly Buka | 17b0a8a | 2015-08-31 19:12:35 -0700 | [diff] [blame] | 21 | bool LoadDefaults(Settings* settings) override; |
| 22 | std::string LoadSettings() override; |
| 23 | void SaveSettings(const std::string& settings) override; |
Vitaly Buka | 41a90d6 | 2015-09-29 16:58:39 -0700 | [diff] [blame] | 24 | |
| 25 | private: |
| 26 | bool disable_security_{false}; |
Vitaly Buka | 17b0a8a | 2015-08-31 19:12:35 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | } // namespace examples |
| 30 | } // namespace weave |
| 31 | |
Johan Euphrosine | 3523fdd | 2015-10-14 20:46:05 -0700 | [diff] [blame] | 32 | #endif // LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_ |