Index: ppapi/c/private/ppb_udp_socket_private.h |
diff --git a/ppapi/c/private/ppb_udp_socket_private.h b/ppapi/c/private/ppb_udp_socket_private.h |
index 78722e0998b558cdad81901ebb9c4f7361594d9e..047be46df350951d73b31675d64feb2a72afcd09 100644 |
--- a/ppapi/c/private/ppb_udp_socket_private.h |
+++ b/ppapi/c/private/ppb_udp_socket_private.h |
@@ -3,7 +3,7 @@ |
* found in the LICENSE file. |
*/ |
-/* From private/ppb_udp_socket_private.idl modified Wed Nov 16 15:27:20 2011. */ |
+/* From private/ppb_udp_socket_private.idl modified Wed Feb 8 18:02:19 2012. */ |
#ifndef PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ |
#define PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ |
@@ -17,7 +17,8 @@ |
#include "ppapi/c/private/ppb_net_address_private.h" |
#define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2 "PPB_UDPSocket_Private;0.2" |
-#define PPB_UDPSOCKET_PRIVATE_INTERFACE PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2 |
+#define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3 "PPB_UDPSocket_Private;0.3" |
+#define PPB_UDPSOCKET_PRIVATE_INTERFACE PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3 |
/** |
* @file |
@@ -29,7 +30,7 @@ |
* @addtogroup Interfaces |
* @{ |
*/ |
-struct PPB_UDPSocket_Private_0_2 { |
+struct PPB_UDPSocket_Private_0_3 { |
/** |
* Creates a UDP socket resource. |
*/ |
@@ -42,6 +43,12 @@ struct PPB_UDPSocket_Private_0_2 { |
int32_t (*Bind)(PP_Resource udp_socket, |
const struct PP_NetAddress_Private* addr, |
struct PP_CompletionCallback callback); |
+ /* Returns the address that the socket has bound to. A successful |
+ * call to Bind must be called first. Returns PP_FALSE if Bind |
+ * fails, or if Close has been called. |
+ */ |
+ PP_Bool (*GetBoundAddress)(PP_Resource udp_socket, |
+ struct PP_NetAddress_Private* addr); |
/* Performs a non-blocking recvfrom call on socket. |
* Bind must be called first. |callback| is invoked when recvfrom |
* reads data. You must call GetRecvFromAddress to recover the |
@@ -69,7 +76,27 @@ struct PPB_UDPSocket_Private_0_2 { |
void (*Close)(PP_Resource udp_socket); |
}; |
-typedef struct PPB_UDPSocket_Private_0_2 PPB_UDPSocket_Private; |
+typedef struct PPB_UDPSocket_Private_0_3 PPB_UDPSocket_Private; |
+ |
+struct PPB_UDPSocket_Private_0_2 { |
+ PP_Resource (*Create)(PP_Instance instance_id); |
+ PP_Bool (*IsUDPSocket)(PP_Resource resource_id); |
+ int32_t (*Bind)(PP_Resource udp_socket, |
+ const struct PP_NetAddress_Private* addr, |
+ struct PP_CompletionCallback callback); |
+ int32_t (*RecvFrom)(PP_Resource udp_socket, |
+ char* buffer, |
+ int32_t num_bytes, |
+ struct PP_CompletionCallback callback); |
+ PP_Bool (*GetRecvFromAddress)(PP_Resource udp_socket, |
+ struct PP_NetAddress_Private* addr); |
+ int32_t (*SendTo)(PP_Resource udp_socket, |
+ const char* buffer, |
+ int32_t num_bytes, |
+ const struct PP_NetAddress_Private* addr, |
+ struct PP_CompletionCallback callback); |
+ void (*Close)(PP_Resource udp_socket); |
+}; |
/** |
* @} |
*/ |