OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium 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 PPAPI_CPP_DEV_NET_ADDRESS_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_NET_ADDRESS_DEV_H_ |
| 7 |
| 8 #include "ppapi/c/dev/ppb_net_address_dev.h" |
| 9 #include "ppapi/cpp/pass_ref.h" |
| 10 #include "ppapi/cpp/resource.h" |
| 11 #include "ppapi/cpp/var.h" |
| 12 |
| 13 namespace pp { |
| 14 |
| 15 class InstanceHandle; |
| 16 |
| 17 class NetAddress_Dev : public Resource { |
| 18 public: |
| 19 NetAddress_Dev(); |
| 20 |
| 21 NetAddress_Dev(PassRef, PP_Resource resource); |
| 22 |
| 23 NetAddress_Dev(const InstanceHandle& instance, |
| 24 const PP_NetAddress_IPv4_Dev& ipv4_addr); |
| 25 |
| 26 NetAddress_Dev(const InstanceHandle& instance, |
| 27 const PP_NetAddress_IPv6_Dev& ipv6_addr); |
| 28 |
| 29 NetAddress_Dev(const NetAddress_Dev& other); |
| 30 |
| 31 virtual ~NetAddress_Dev(); |
| 32 |
| 33 NetAddress_Dev& operator=(const NetAddress_Dev& other); |
| 34 |
| 35 /// Static function for determining whether the browser supports the required |
| 36 /// NetAddress interface. |
| 37 /// |
| 38 /// @return true if the interface is available, false otherwise. |
| 39 static bool IsAvailable(); |
| 40 |
| 41 PP_NetAddress_Family_Dev GetFamily() const; |
| 42 |
| 43 Var DescribeAsString(PP_Bool include_port) const; |
| 44 |
| 45 PP_Bool DescribeAsIPv4Address(PP_NetAddress_IPv4_Dev* ipv4_addr) const; |
| 46 |
| 47 PP_Bool DescribeAsIPv6Address(PP_NetAddress_IPv6_Dev* ipv6_addr) const; |
| 48 }; |
| 49 |
| 50 } // namespace pp |
| 51 |
| 52 #endif // PPAPI_CPP_DEV_NET_ADDRESS_DEV_H_ |
OLD | NEW |