mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 1 | // 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 Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 5 | #ifndef SHILL_STUB_STORAGE_H_ |
| 6 | #define SHILL_STUB_STORAGE_H_ |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 7 | |
| 8 | #include <set> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | #include "shill/store_interface.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | // A stub implementation of StoreInterface. |
| 17 | class StubStorage : public StoreInterface { |
| 18 | public: |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 19 | ~StubStorage() override {} |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 20 | |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 21 | bool Flush() override { return false; } |
| 22 | std::set<std::string> GetGroups() const override { return {}; } |
| 23 | std::set<std::string> GetGroupsWithKey( |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 24 | const std::string &key) const override { |
| 25 | return {}; |
| 26 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 27 | std::set<std::string> GetGroupsWithProperties( |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 28 | const KeyValueStore &properties) const override { |
| 29 | return {}; |
| 30 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 31 | bool ContainsGroup(const std::string &group) const override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 32 | return false; |
| 33 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 34 | bool DeleteKey(const std::string &group, const std::string &key) |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 35 | override { return false; } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 36 | 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 agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 41 | return false; |
| 42 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 43 | bool SetString(const std::string &group, |
| 44 | const std::string &key, |
| 45 | const std::string &value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 46 | return false; |
| 47 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 48 | bool GetBool(const std::string &group, |
| 49 | const std::string &key, |
| 50 | bool *value) const override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 51 | return false; |
| 52 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 53 | bool SetBool(const std::string &group, |
| 54 | const std::string &key, |
| 55 | bool value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 56 | return false; |
| 57 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 58 | bool GetInt(const std::string &group, |
| 59 | const std::string &key, |
| 60 | int *value) const override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 61 | return false; |
| 62 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 63 | bool SetInt(const std::string &group, |
| 64 | const std::string &key, |
| 65 | int value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 66 | return false; |
| 67 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 68 | bool GetUint64(const std::string &group, |
| 69 | const std::string &key, |
| 70 | uint64_t *value) const override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 71 | return false; |
| 72 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 73 | bool SetUint64(const std::string &group, |
| 74 | const std::string &key, |
| 75 | uint64_t value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 76 | return false; |
| 77 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 78 | bool GetStringList(const std::string &group, |
| 79 | const std::string &key, |
| 80 | std::vector<std::string> *value) const override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 81 | return false; |
| 82 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 83 | bool SetStringList(const std::string &group, |
| 84 | const std::string &key, |
| 85 | const std::vector<std::string> &value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 86 | return false; |
| 87 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 88 | bool GetCryptedString(const std::string &group, |
| 89 | const std::string &key, |
| 90 | std::string *value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 91 | return false; |
| 92 | } |
Alex Vakulenko | 016fa0e | 2014-08-11 15:59:58 -0700 | [diff] [blame] | 93 | bool SetCryptedString(const std::string &group, |
| 94 | const std::string &key, |
| 95 | const std::string &value) override { |
mukesh agrawal | 92496a4 | 2014-04-08 16:04:43 -0700 | [diff] [blame] | 96 | return false; |
| 97 | } |
| 98 | }; |
| 99 | |
| 100 | } // namespace shill |
| 101 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 102 | #endif // SHILL_STUB_STORAGE_H_ |