OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TESTS_NACL_IO_TEST_FAKE_NET_ADDRESS_INTERFACE_H_ | 5 #ifndef TESTS_NACL_IO_TEST_FAKE_NET_ADDRESS_INTERFACE_H_ |
6 #define TESTS_NACL_IO_TEST_FAKE_NET_ADDRESS_INTERFACE_H_ | 6 #define TESTS_NACL_IO_TEST_FAKE_NET_ADDRESS_INTERFACE_H_ |
7 | 7 |
8 #include <ppapi/c/ppb_host_resolver.h> | 8 #include <ppapi/c/ppb_host_resolver.h> |
9 | 9 |
10 #include "nacl_io/pepper_interface.h" | 10 #include "nacl_io/pepper_interface.h" |
11 #include "sdk_util/macros.h" | 11 #include "sdk_util/macros.h" |
12 | 12 |
13 class FakeVarManager; | |
14 class FakePepperInterface; | 13 class FakePepperInterface; |
15 | 14 |
16 class FakeNetAddressInterface : public nacl_io::NetAddressInterface { | 15 class FakeNetAddressInterface : public nacl_io::NetAddressInterface { |
17 public: | 16 public: |
18 explicit FakeNetAddressInterface(FakePepperInterface* ppapi); | 17 explicit FakeNetAddressInterface(FakePepperInterface* ppapi); |
19 | 18 |
20 virtual PP_Resource CreateFromIPv4Address(PP_Instance, PP_NetAddress_IPv4*); | 19 virtual PP_Resource CreateFromIPv4Address(PP_Instance, PP_NetAddress_IPv4*); |
21 virtual PP_Resource CreateFromIPv6Address(PP_Instance, PP_NetAddress_IPv6*); | 20 virtual PP_Resource CreateFromIPv6Address(PP_Instance, PP_NetAddress_IPv6*); |
22 virtual PP_Bool IsNetAddress(PP_Resource); | 21 virtual PP_Bool IsNetAddress(PP_Resource); |
23 virtual PP_NetAddress_Family GetFamily(PP_Resource); | 22 virtual PP_NetAddress_Family GetFamily(PP_Resource); |
24 virtual PP_Bool DescribeAsIPv4Address(PP_Resource, PP_NetAddress_IPv4*); | 23 virtual PP_Bool DescribeAsIPv4Address(PP_Resource, PP_NetAddress_IPv4*); |
25 virtual PP_Bool DescribeAsIPv6Address(PP_Resource, PP_NetAddress_IPv6*); | 24 virtual PP_Bool DescribeAsIPv6Address(PP_Resource, PP_NetAddress_IPv6*); |
26 virtual PP_Var DescribeAsString(PP_Resource, PP_Bool); | 25 virtual PP_Var DescribeAsString(PP_Resource, PP_Bool); |
27 | 26 |
28 private: | 27 private: |
29 FakePepperInterface* ppapi_; | 28 FakePepperInterface* ppapi_; |
30 | 29 |
31 DISALLOW_COPY_AND_ASSIGN(FakeNetAddressInterface); | 30 DISALLOW_COPY_AND_ASSIGN(FakeNetAddressInterface); |
32 }; | 31 }; |
33 | 32 |
34 #endif // TESTS_NACL_IO_TEST_FAKE_NET_ADDRESS_INTERFACE_H_ | 33 #endif // TESTS_NACL_IO_TEST_FAKE_NET_ADDRESS_INTERFACE_H_ |
OLD | NEW |