Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
mukesh agrawal | 7ec7131 | 2011-11-10 02:08:26 +0000 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SHILL_MOCK_WIFI_SERVICE_ |
| 6 | #define SHILL_MOCK_WIFI_SERVICE_ |
| 7 | |
Hristo Stefanov | ed2c28c | 2011-11-29 15:37:30 -0800 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
mukesh agrawal | 7ec7131 | 2011-11-10 02:08:26 +0000 | [diff] [blame] | 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/wifi_service.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
| 17 | class MockWiFiService : public WiFiService { |
| 18 | public: |
| 19 | MockWiFiService(ControlInterface *control_interface, |
| 20 | EventDispatcher *dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 21 | Metrics *metrics, |
mukesh agrawal | 7ec7131 | 2011-11-10 02:08:26 +0000 | [diff] [blame] | 22 | Manager *manager, |
Paul Stewart | 3c50401 | 2013-01-17 17:49:58 -0800 | [diff] [blame] | 23 | WiFiProvider *provider, |
mukesh agrawal | 7ec7131 | 2011-11-10 02:08:26 +0000 | [diff] [blame] | 24 | const std::vector<uint8_t> &ssid, |
| 25 | const std::string &mode, |
| 26 | const std::string &security, |
| 27 | bool hidden_ssid); |
| 28 | virtual ~MockWiFiService(); |
| 29 | |
Paul Stewart | d2e1c36 | 2013-03-03 19:06:07 -0800 | [diff] [blame] | 30 | MOCK_METHOD2(Configure, void(const KeyValueStore &args, Error *error)); |
mukesh agrawal | cf24a24 | 2012-05-21 16:46:11 -0700 | [diff] [blame] | 31 | MOCK_METHOD1(SetFailure, void(ConnectFailure failure)); |
mukesh agrawal | 56e3220 | 2012-07-26 16:32:11 -0700 | [diff] [blame] | 32 | MOCK_METHOD1(SetFailureSilent, void(ConnectFailure failure)); |
mukesh agrawal | 7ec7131 | 2011-11-10 02:08:26 +0000 | [diff] [blame] | 33 | MOCK_METHOD1(SetState, void(ConnectState state)); |
Paul Stewart | bc6e739 | 2012-05-24 07:07:48 -0700 | [diff] [blame] | 34 | MOCK_METHOD2(AddEAPCertification, bool(const std::string &name, |
| 35 | size_t depth)); |
Paul Stewart | a47c3c6 | 2012-12-18 12:14:29 -0800 | [diff] [blame] | 36 | MOCK_METHOD0(HasRecentConnectionIssues, bool()); |
Paul Stewart | 3c50401 | 2013-01-17 17:49:58 -0800 | [diff] [blame] | 37 | MOCK_METHOD1(AddEndpoint, |
| 38 | void(const WiFiEndpointConstRefPtr &endpoint)); |
| 39 | MOCK_METHOD1(RemoveEndpoint, |
| 40 | void(const WiFiEndpointConstRefPtr &endpoint)); |
| 41 | MOCK_METHOD1(NotifyCurrentEndpoint, |
| 42 | void(const WiFiEndpointConstRefPtr &endpoint)); |
| 43 | MOCK_METHOD1(NotifyEndpointUpdated, |
| 44 | void(const WiFiEndpointConstRefPtr &endpoint)); |
| 45 | MOCK_METHOD2(DisconnectWithFailure, |
| 46 | void(ConnectFailure failure, Error *error)); |
| 47 | MOCK_CONST_METHOD0(IsConnected, bool()); |
| 48 | MOCK_CONST_METHOD0(IsConnecting, bool()); |
| 49 | MOCK_CONST_METHOD0(GetEndpointCount, int()); |
| 50 | MOCK_CONST_METHOD0(HasEndpoints, bool()); |
| 51 | MOCK_CONST_METHOD0(IsRemembered, bool()); |
| 52 | MOCK_METHOD0(ResetWiFi, void()); |
mukesh agrawal | 7ec7131 | 2011-11-10 02:08:26 +0000 | [diff] [blame] | 53 | |
| 54 | private: |
| 55 | DISALLOW_COPY_AND_ASSIGN(MockWiFiService); |
| 56 | }; |
| 57 | |
| 58 | } // namespace shill |
| 59 | |
| 60 | #endif // SHILL_MOCK_WIFI_SERVICE_ |