blob: 0bae2ccc220446596ab5b5c8c9def18c5e99d8ed [file] [log] [blame]
mukesh agrawal92496a42014-04-08 16:04:43 -07001// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ben Chanc45688b2014-07-02 23:50:45 -07005#ifndef SHILL_STUB_STORAGE_H_
6#define SHILL_STUB_STORAGE_H_
mukesh agrawal92496a42014-04-08 16:04:43 -07007
8#include <set>
9#include <string>
10#include <vector>
11
12#include "shill/store_interface.h"
13
14namespace shill {
15
16// A stub implementation of StoreInterface.
17class StubStorage : public StoreInterface {
18 public:
Ben Chan5ea763b2014-08-13 11:07:54 -070019 ~StubStorage() override {}
mukesh agrawal92496a42014-04-08 16:04:43 -070020
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070021 bool Flush() override { return false; }
22 std::set<std::string> GetGroups() const override { return {}; }
23 std::set<std::string> GetGroupsWithKey(
Paul Stewart1a212a62015-06-16 13:13:10 -070024 const std::string& key) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070025 return {};
26 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070027 std::set<std::string> GetGroupsWithProperties(
Paul Stewart1a212a62015-06-16 13:13:10 -070028 const KeyValueStore& properties) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070029 return {};
30 }
Paul Stewart1a212a62015-06-16 13:13:10 -070031 bool ContainsGroup(const std::string& group) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070032 return false;
33 }
Paul Stewart1a212a62015-06-16 13:13:10 -070034 bool DeleteKey(const std::string& group, const std::string& key)
mukesh agrawal92496a42014-04-08 16:04:43 -070035 override { return false; }
Paul Stewart1a212a62015-06-16 13:13:10 -070036 bool DeleteGroup(const std::string& group) override { return false; }
37 bool SetHeader(const std::string& header) override { return false; }
38 bool GetString(const std::string& group,
39 const std::string& key,
40 std::string* value) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070041 return false;
42 }
Paul Stewart1a212a62015-06-16 13:13:10 -070043 bool SetString(const std::string& group,
44 const std::string& key,
45 const std::string& value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070046 return false;
47 }
Paul Stewart1a212a62015-06-16 13:13:10 -070048 bool GetBool(const std::string& group,
49 const std::string& key,
50 bool* value) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070051 return false;
52 }
Paul Stewart1a212a62015-06-16 13:13:10 -070053 bool SetBool(const std::string& group,
54 const std::string& key,
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070055 bool value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070056 return false;
57 }
Paul Stewart1a212a62015-06-16 13:13:10 -070058 bool GetInt(const std::string& group,
59 const std::string& key,
60 int* value) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070061 return false;
62 }
Paul Stewart1a212a62015-06-16 13:13:10 -070063 bool SetInt(const std::string& group,
64 const std::string& key,
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070065 int value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070066 return false;
67 }
Paul Stewart1a212a62015-06-16 13:13:10 -070068 bool GetUint64(const std::string& group,
69 const std::string& key,
70 uint64_t* value) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070071 return false;
72 }
Paul Stewart1a212a62015-06-16 13:13:10 -070073 bool SetUint64(const std::string& group,
74 const std::string& key,
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070075 uint64_t value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070076 return false;
77 }
Paul Stewart1a212a62015-06-16 13:13:10 -070078 bool GetStringList(const std::string& group,
79 const std::string& key,
80 std::vector<std::string>* value) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070081 return false;
82 }
Paul Stewart1a212a62015-06-16 13:13:10 -070083 bool SetStringList(const std::string& group,
84 const std::string& key,
85 const std::vector<std::string>& value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070086 return false;
87 }
Paul Stewart1a212a62015-06-16 13:13:10 -070088 bool GetCryptedString(const std::string& group,
89 const std::string& key,
90 std::string* value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070091 return false;
92 }
Paul Stewart1a212a62015-06-16 13:13:10 -070093 bool SetCryptedString(const std::string& group,
94 const std::string& key,
95 const std::string& value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070096 return false;
97 }
98};
99
100} // namespace shill
101
Ben Chanc45688b2014-07-02 23:50:45 -0700102#endif // SHILL_STUB_STORAGE_H_