diff options
Diffstat (limited to 'ppapi/c/private/ppb_net_address_private.h')
-rw-r--r-- | ppapi/c/private/ppb_net_address_private.h | 55 |
1 files changed, 48 insertions, 7 deletions
diff --git a/ppapi/c/private/ppb_net_address_private.h b/ppapi/c/private/ppb_net_address_private.h index 2929681..d5a5350 100644 --- a/ppapi/c/private/ppb_net_address_private.h +++ b/ppapi/c/private/ppb_net_address_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_net_address_private.idl, - * modified Tue Feb 14 17:56:23 2012. + * modified Wed Mar 21 11:10:47 2012. */ #ifndef PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ @@ -18,7 +18,8 @@ #define PPB_NETADDRESS_PRIVATE_INTERFACE_0_1 "PPB_NetAddress_Private;0.1" #define PPB_NETADDRESS_PRIVATE_INTERFACE_1_0 "PPB_NetAddress_Private;1.0" -#define PPB_NETADDRESS_PRIVATE_INTERFACE PPB_NETADDRESS_PRIVATE_INTERFACE_1_0 +#define PPB_NETADDRESS_PRIVATE_INTERFACE_1_1 "PPB_NetAddress_Private;1.1" +#define PPB_NETADDRESS_PRIVATE_INTERFACE PPB_NETADDRESS_PRIVATE_INTERFACE_1_1 /** * @file @@ -54,7 +55,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NetAddressFamily_Private, 4); * @{ */ /** - * This is an opaque type holding a network address. + * This is an opaque type holding a network address. Plugins must + * never access members of this struct directly. */ struct PP_NetAddress_Private { uint32_t size; @@ -73,7 +75,7 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_NetAddress_Private, 132); * The <code>PPB_NetAddress_Private</code> interface provides operations on * network addresses. */ -struct PPB_NetAddress_Private_1_0 { +struct PPB_NetAddress_Private_1_1 { /** * Returns PP_TRUE if the two addresses are equal (host and port). */ @@ -97,7 +99,7 @@ struct PPB_NetAddress_Private_1_0 { */ PP_Bool (*ReplacePort)(const struct PP_NetAddress_Private* src_addr, uint16_t port, - struct PP_NetAddress_Private* dest_addr); + struct PP_NetAddress_Private* addr_out); /** * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. */ @@ -121,9 +123,28 @@ struct PPB_NetAddress_Private_1_0 { PP_Bool (*GetAddress)(const struct PP_NetAddress_Private* addr, void* address, uint16_t address_size); + /** + * Returns ScopeID for IPv6 addresses or 0 for IPv4. + */ + uint32_t (*GetScopeID)(const struct PP_NetAddress_Private* addr); + /** + * Creates NetAddress with the specified IPv4 address and port + * number. + */ + void (*CreateFromIPv4Address)(const uint8_t ip[4], + uint16_t port, + struct PP_NetAddress_Private* addr_out); + /** + * Creates NetAddress with the specified IPv6 address, scope_id and + * port number. + */ + void (*CreateFromIPv6Address)(const uint8_t ip[16], + uint32_t scope_id, + uint16_t port, + struct PP_NetAddress_Private* addr_out); }; -typedef struct PPB_NetAddress_Private_1_0 PPB_NetAddress_Private; +typedef struct PPB_NetAddress_Private_1_1 PPB_NetAddress_Private; struct PPB_NetAddress_Private_0_1 { PP_Bool (*AreEqual)(const struct PP_NetAddress_Private* addr1, @@ -135,8 +156,28 @@ struct PPB_NetAddress_Private_0_1 { PP_Bool include_port); PP_Bool (*ReplacePort)(const struct PP_NetAddress_Private* src_addr, uint16_t port, - struct PP_NetAddress_Private* dest_addr); + struct PP_NetAddress_Private* addr_out); + void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr); +}; + +struct PPB_NetAddress_Private_1_0 { + PP_Bool (*AreEqual)(const struct PP_NetAddress_Private* addr1, + const struct PP_NetAddress_Private* addr2); + PP_Bool (*AreHostsEqual)(const struct PP_NetAddress_Private* addr1, + const struct PP_NetAddress_Private* addr2); + struct PP_Var (*Describe)(PP_Module module, + const struct PP_NetAddress_Private* addr, + PP_Bool include_port); + PP_Bool (*ReplacePort)(const struct PP_NetAddress_Private* src_addr, + uint16_t port, + struct PP_NetAddress_Private* addr_out); void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr); + PP_NetAddressFamily_Private (*GetFamily)( + const struct PP_NetAddress_Private* addr); + uint16_t (*GetPort)(const struct PP_NetAddress_Private* addr); + PP_Bool (*GetAddress)(const struct PP_NetAddress_Private* addr, + void* address, + uint16_t address_size); }; /** * @} |