blob: 8764cc561334b7e141c3a9d5acfe31dc71839759 [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 Westbrook321dae62015-11-16 09:31:35 -080019 explicit 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:
26 bool disable_security_{false};
Paul Westbrook321dae62015-11-16 09:31:35 -080027 std::string model_id_{"AAAAA"};
Vitaly Buka17b0a8a2015-08-31 19:12:35 -070028};
29
30} // namespace examples
31} // namespace weave
32
Johan Euphrosine3523fdd2015-10-14 20:46:05 -070033#endif // LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_