blob: e4d16a9dcb2f73eabb5088c035a39bb2a69a598b [file] [log] [blame]
Vitaly Buka4615e0d2015-10-14 15:35:12 -07001// Copyright 2015 The Weave Authors. All rights reserved.
Vitaly Buka17b0a8a2015-08-31 19:12:35 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Johan Euphrosine3523fdd2015-10-14 20:46:05 -07005#ifndef LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_
6#define LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_
Vitaly Buka17b0a8a2015-08-31 19:12:35 -07007
8#include <map>
9#include <string>
10#include <vector>
11
Vitaly Buka1e363672015-09-25 14:01:16 -070012#include <weave/provider/config_store.h>
Vitaly Buka17b0a8a2015-08-31 19:12:35 -070013
14namespace weave {
15namespace examples {
16
Vitaly Buka1e363672015-09-25 14:01:16 -070017class FileConfigStore : public provider::ConfigStore {
Vitaly Buka17b0a8a2015-08-31 19:12:35 -070018 public:
Vitaly Buka41a90d62015-09-29 16:58:39 -070019 explicit FileConfigStore(bool disable_security);
20
Vitaly Buka17b0a8a2015-08-31 19:12:35 -070021 bool LoadDefaults(Settings* settings) override;
22 std::string LoadSettings() override;
23 void SaveSettings(const std::string& settings) override;
Vitaly Buka41a90d62015-09-29 16:58:39 -070024
25 private:
26 bool disable_security_{false};
Vitaly Buka17b0a8a2015-08-31 19:12:35 -070027};
28
29} // namespace examples
30} // namespace weave
31
Johan Euphrosine3523fdd2015-10-14 20:46:05 -070032#endif // LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_