blob: ceeb8886c3423f1aab9fd7e5feb9ab8cf255dbd8 [file] [log] [blame]
Wade Guthriecc53f232013-03-05 13:22:23 -08001// 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 Guthriecc53f232013-03-05 13:22:23 -08008
Wade Guthrie89e6cb32013-03-07 08:03:45 -08009#include <base/basictypes.h>
Wade Guthriecc53f232013-03-05 13:22:23 -080010
11#include <gmock/gmock.h>
12
13#include "shill/netlink_socket.h"
14
Wade Guthriecc53f232013-03-05 13:22:23 -080015namespace shill {
16
17class ByteString;
18
19class 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 Guthriebee87c22013-03-06 11:00:46 -080026 MOCK_METHOD1(SubscribeToEvents, bool(uint32_t group_id));
Wade Guthriecc53f232013-03-05 13:22:23 -080027
28 private:
29 DISALLOW_COPY_AND_ASSIGN(MockNetlinkSocket);
30};
31
32} // namespace shill
33
34#endif // SHILL_MOCK_NETLINK_SOCKET_H_