blob: 578f940f0ccbbcd5a76271f90083e062bf2e6fd6 [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:
Paul Westbrook15a832e2015-12-08 23:00:29 -080019 FileConfigStore(bool disable_security, const std::string& model_id);
Vitaly Buka41a90d62015-09-29 16:58:39 -070020
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:
Paul Westbrook15a832e2015-12-08 23:00:29 -080026 const bool disable_security_;
27 const std::string model_id_;
28 const std::string settings_path_;
Vitaly Buka17b0a8a2015-08-31 19:12:35 -070029};
30
31} // namespace examples
32} // namespace weave
33
Johan Euphrosine3523fdd2015-10-14 20:46:05 -070034#endif // LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_