blob: 2af2bceb08195d3cba63dc0afed3dcdd69d4f005 [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:
19 virtual ~StubStorage() {}
20
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(
mukesh agrawal92496a42014-04-08 16:04:43 -070024 const std::string &key) const override {
25 return {};
26 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070027 std::set<std::string> GetGroupsWithProperties(
mukesh agrawal92496a42014-04-08 16:04:43 -070028 const KeyValueStore &properties) const override {
29 return {};
30 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070031 bool ContainsGroup(const std::string &group) const override {
mukesh agrawal92496a42014-04-08 16:04:43 -070032 return false;
33 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070034 bool DeleteKey(const std::string &group, const std::string &key)
mukesh agrawal92496a42014-04-08 16:04:43 -070035 override { return false; }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070053 bool SetBool(const std::string &group,
54 const std::string &key,
55 bool value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070056 return false;
57 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070063 bool SetInt(const std::string &group,
64 const std::string &key,
65 int value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070066 return false;
67 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -070073 bool SetUint64(const std::string &group,
74 const std::string &key,
75 uint64_t value) override {
mukesh agrawal92496a42014-04-08 16:04:43 -070076 return false;
77 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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 }
Alex Vakulenko016fa0e2014-08-11 15:59:58 -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_