Wade Guthrie | cc53f23 | 2013-03-05 13:22:23 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 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 | |
| 5 | #ifndef SHILL_MOCK_NETLINK_SOCKET_H_ |
| 6 | #define SHILL_MOCK_NETLINK_SOCKET_H_ |
| 7 | |
Wade Guthrie | cc53f23 | 2013-03-05 13:22:23 -0800 | [diff] [blame] | 8 | |
Wade Guthrie | 89e6cb3 | 2013-03-07 08:03:45 -0800 | [diff] [blame] | 9 | #include <base/basictypes.h> |
Wade Guthrie | cc53f23 | 2013-03-05 13:22:23 -0800 | [diff] [blame] | 10 | |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/netlink_socket.h" |
| 14 | |
Wade Guthrie | cc53f23 | 2013-03-05 13:22:23 -0800 | [diff] [blame] | 15 | namespace shill { |
| 16 | |
| 17 | class ByteString; |
| 18 | |
| 19 | class MockNetlinkSocket : public NetlinkSocket { |
| 20 | public: |
| 21 | MockNetlinkSocket() {} |
| 22 | MOCK_METHOD0(Init, bool()); |
| 23 | |
| 24 | virtual bool SendMessage(const ByteString &out_string); |
| 25 | uint32 GetLastSequenceNumber() const { return sequence_number_; } |
Wade Guthrie | bee87c2 | 2013-03-06 11:00:46 -0800 | [diff] [blame] | 26 | MOCK_METHOD1(SubscribeToEvents, bool(uint32_t group_id)); |
Wade Guthrie | cc53f23 | 2013-03-05 13:22:23 -0800 | [diff] [blame] | 27 | |
| 28 | private: |
| 29 | DISALLOW_COPY_AND_ASSIGN(MockNetlinkSocket); |
| 30 | }; |
| 31 | |
| 32 | } // namespace shill |
| 33 | |
| 34 | #endif // SHILL_MOCK_NETLINK_SOCKET_H_ |