• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2014 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef SHILL_STUB_STORAGE_H_
18 #define SHILL_STUB_STORAGE_H_
19 
20 #include <set>
21 #include <string>
22 #include <vector>
23 
24 #include "shill/store_interface.h"
25 
26 namespace shill {
27 
28 // A stub implementation of StoreInterface.
29 class StubStorage : public StoreInterface {
30  public:
~StubStorage()31   ~StubStorage() override {}
32 
IsNonEmpty()33   bool IsNonEmpty() const override { return false; }
Open()34   bool Open() override { return false; }
Close()35   bool Close() override { return false; }
Flush()36   bool Flush() override { return false; }
MarkAsCorrupted()37   bool MarkAsCorrupted() override { return false; }
GetGroups()38   std::set<std::string> GetGroups() const override { return {}; }
GetGroupsWithKey(const std::string & key)39   std::set<std::string> GetGroupsWithKey(
40       const std::string& key) const override {
41     return {};
42   }
GetGroupsWithProperties(const KeyValueStore & properties)43   std::set<std::string> GetGroupsWithProperties(
44       const KeyValueStore& properties) const override {
45     return {};
46   }
ContainsGroup(const std::string & group)47   bool ContainsGroup(const std::string& group) const override {
48     return false;
49   }
DeleteKey(const std::string & group,const std::string & key)50   bool DeleteKey(const std::string& group, const std::string& key)
51       override { return false; }
DeleteGroup(const std::string & group)52   bool DeleteGroup(const std::string& group) override { return false; }
SetHeader(const std::string & header)53   bool SetHeader(const std::string& header) override { return false; }
GetString(const std::string & group,const std::string & key,std::string * value)54   bool GetString(const std::string& group,
55                  const std::string& key,
56                  std::string* value) const override {
57     return false;
58   }
SetString(const std::string & group,const std::string & key,const std::string & value)59   bool SetString(const std::string& group,
60                  const std::string& key,
61                  const std::string& value) override {
62     return false;
63   }
GetBool(const std::string & group,const std::string & key,bool * value)64   bool GetBool(const std::string& group,
65                const std::string& key,
66                bool* value) const override {
67     return false;
68   }
SetBool(const std::string & group,const std::string & key,bool value)69   bool SetBool(const std::string& group,
70                const std::string& key,
71                bool value) override {
72     return false;
73   }
GetInt(const std::string & group,const std::string & key,int * value)74   bool GetInt(const std::string& group,
75               const std::string& key,
76               int* value) const override {
77     return false;
78   }
SetInt(const std::string & group,const std::string & key,int value)79   bool SetInt(const std::string& group,
80               const std::string& key,
81               int value) override {
82     return false;
83   }
GetUint64(const std::string & group,const std::string & key,uint64_t * value)84   bool GetUint64(const std::string& group,
85                  const std::string& key,
86                  uint64_t* value) const override {
87     return false;
88   }
SetUint64(const std::string & group,const std::string & key,uint64_t value)89   bool SetUint64(const std::string& group,
90                  const std::string& key,
91                  uint64_t value) override {
92     return false;
93   }
GetStringList(const std::string & group,const std::string & key,std::vector<std::string> * value)94   bool GetStringList(const std::string& group,
95                      const std::string& key,
96                      std::vector<std::string>* value) const override {
97     return false;
98   }
SetStringList(const std::string & group,const std::string & key,const std::vector<std::string> & value)99   bool SetStringList(const std::string& group,
100                      const std::string& key,
101                      const std::vector<std::string>& value) override {
102     return false;
103   }
GetCryptedString(const std::string & group,const std::string & key,std::string * value)104   bool GetCryptedString(const std::string& group,
105                         const std::string& key,
106                         std::string* value) override {
107     return false;
108   }
SetCryptedString(const std::string & group,const std::string & key,const std::string & value)109   bool SetCryptedString(const std::string& group,
110                         const std::string& key,
111                         const std::string& value) override {
112     return false;
113   }
114 };
115 
116 }  // namespace shill
117 
118 #endif  // SHILL_STUB_STORAGE_H_
119