Inheritance diagram for pp::NetAddress:

List of all members.

Public Member Functions

 NetAddress ()
 NetAddress (PassRef, PP_Resource resource)
 NetAddress (const InstanceHandle &instance, const PP_NetAddress_IPv4 &ipv4_addr)
 NetAddress (const InstanceHandle &instance, const PP_NetAddress_IPv6 &ipv6_addr)
 NetAddress (const NetAddress &other)
virtual ~NetAddress ()
NetAddressoperator= (const NetAddress &other)
PP_NetAddress_Family GetFamily () const
Var DescribeAsString (bool include_port) const
bool DescribeAsIPv4Address (PP_NetAddress_IPv4 *ipv4_addr) const
bool DescribeAsIPv6Address (PP_NetAddress_IPv6 *ipv6_addr) const

Static Public Member Functions

static bool IsAvailable ()

Detailed Description

The NetAddress class represents a network address.


Constructor & Destructor Documentation

Default constructor for creating an is_null() NetAddress object.

pp::NetAddress::NetAddress(PassRef ,
PP_Resource resource 
)

A constructor used when you have received a PP_Resource as a return value that has had 1 ref added for you.

Parameters:
[in]resourceA PPB_NetAddress resource.
pp::NetAddress::NetAddress(const InstanceHandleinstance,
const PP_NetAddress_IPv4 & ipv4_addr 
)

A constructor used to create a NetAddress object with the specified IPv4 address.

Parameters:
[in]instanceThe instance with which this resource will be associated.
[in]ipv4_addrAn IPv4 address.
pp::NetAddress::NetAddress(const InstanceHandleinstance,
const PP_NetAddress_IPv6 & ipv6_addr 
)

A constructor used to create a NetAddress object with the specified IPv6 address.

Parameters:
[in]instanceThe instance with which this resource will be associated.
[in]ipv6_addrAn IPv6 address.

The copy constructor for NetAddress.

Parameters:
[in]otherA reference to another NetAddress.
virtual pp::NetAddress::~NetAddress()[virtual]

The destructor.


Member Function Documentation

bool pp::NetAddress::DescribeAsIPv4Address(PP_NetAddress_IPv4 * ipv4_addr)const

Fills a PP_NetAddress_IPv4 structure if the network address is of PP_NETADDRESS_FAMILY_IPV4 address family.

Note that passing a network address of PP_NETADDRESS_FAMILY_IPV6 address family will fail even if the address is an IPv4-mapped IPv6 address.

Parameters:
[out]ipv4_addrA PP_NetAddress_IPv4 structure to store the result.
Returns:
A boolean value indicating whether the operation succeeded.
bool pp::NetAddress::DescribeAsIPv6Address(PP_NetAddress_IPv6 * ipv6_addr)const

Fills a PP_NetAddress_IPv6 structure if the network address is of PP_NETADDRESS_FAMILY_IPV6 address family.

Note that passing a network address of PP_NETADDRESS_FAMILY_IPV4 address family will fail - this method doesn't map it to an IPv6 address.

Parameters:
[out]ipv6_addrA PP_NetAddress_IPv6 structure to store the result.
Returns:
A boolean value indicating whether the operation succeeded.
Var pp::NetAddress::DescribeAsString(bool include_port)const

Returns a human-readable description of the network address.

The description is in the form of host [ ":" port ] and conforms to http://tools.ietf.org/html/rfc3986#section-3.2 for IPv4 and IPv6 addresses (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80").

Parameters:
[in]include_portWhether to include the port number in the description.
Returns:
A string Var on success; an undefined Var on failure.
PP_NetAddress_Family pp::NetAddress::GetFamily()const

Gets the address family.

Returns:
The address family on success; PP_NETADDRESS_FAMILY_UNSPECIFIED on failure.
static bool pp::NetAddress::IsAvailable()[static]

Static function for determining whether the browser supports the PPB_NetAddress interface.

Returns:
true if the interface is available, false otherwise.
NetAddress& pp::NetAddress::operator=(const NetAddressother)

The assignment operator for NetAddress.

Parameters:
[in]otherA reference to another NetAddress.
Returns:
A reference to this NetAddress object.

The documentation for this class was generated from the following file:
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.