| 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 d6e283c42cce9b9d417796be9c136f5b553bbc83..e809140234838c3d4ee819c0b487ecf350196016 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 Mon Jun 24 09:53:43 2013. */
|
| +/* From private/ppb_udp_socket_private.idl modified Mon Dec 15 17:47:37 2014. */
|
|
|
| #ifndef PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_
|
| #define PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_
|
| @@ -20,7 +20,8 @@
|
| #define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2 "PPB_UDPSocket_Private;0.2"
|
| #define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3 "PPB_UDPSocket_Private;0.3"
|
| #define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4 "PPB_UDPSocket_Private;0.4"
|
| -#define PPB_UDPSOCKET_PRIVATE_INTERFACE PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4
|
| +#define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_5 "PPB_UDPSocket_Private;0.5"
|
| +#define PPB_UDPSOCKET_PRIVATE_INTERFACE PPB_UDPSOCKET_PRIVATE_INTERFACE_0_5
|
|
|
| /**
|
| * @file
|
| @@ -40,9 +41,29 @@ typedef enum {
|
| /* Allow sending and receiving packets sent to and from broadcast
|
| * addresses. Value's type should be PP_VARTYPE_BOOL. */
|
| PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1,
|
| + /* Whether multicast packets sent from the host to the multicast group should
|
| + * be looped back to the host or not. Value's type should be PP_VARTYPE_BOOL.
|
| + * This is only supported in version 0.5 of the API (Chrome 41) and later. */
|
| + PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_LOOP = 2,
|
| + /* Set time-to-live for multicast packets, from 0 to 255. Value's type should
|
| + * be PP_VARTYPE_INT32.
|
| + * This is only supported in version 0.5 of the API (Chrome 41) and later. */
|
| + PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_TTL = 3,
|
| + /* Set network interface from which the multicast packets will be sent and
|
| + * received. Value's type should be PP_VARTYPE_INT32.
|
| + * This is only supported in version 0.5 of the API (Chrome 41) and later. */
|
| + PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_IF = 4,
|
| + /* Join a multicast group and start receiving packets. Value's type should be
|
| + * PP_VARTYPE_RESOURCE.
|
| + * This is only supported in version 0.5 of the API (Chrome 41) and later. */
|
| + PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_JOIN = 5,
|
| + /* Leave a multicast group previously joined. Value's type should be
|
| + * PP_VARTYPE_RESOURCE.
|
| + * This is only supported in version 0.5 of the API (Chrome 41) and later. */
|
| + PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_LEAVE = 6,
|
| /* Special value for counting the number of available
|
| * features. Should not be passed to SetSocketFeature(). */
|
| - PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 2
|
| + PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 7
|
| } PP_UDPSocketFeature_Private;
|
| PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocketFeature_Private, 4);
|
| /**
|
| @@ -53,7 +74,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocketFeature_Private, 4);
|
| * @addtogroup Interfaces
|
| * @{
|
| */
|
| -struct PPB_UDPSocket_Private_0_4 {
|
| +struct PPB_UDPSocket_Private_0_5 {
|
| /**
|
| * Creates a UDP socket resource.
|
| */
|
| @@ -111,7 +132,7 @@ struct PPB_UDPSocket_Private_0_4 {
|
| void (*Close)(PP_Resource udp_socket);
|
| };
|
|
|
| -typedef struct PPB_UDPSocket_Private_0_4 PPB_UDPSocket_Private;
|
| +typedef struct PPB_UDPSocket_Private_0_5 PPB_UDPSocket_Private;
|
|
|
| struct PPB_UDPSocket_Private_0_2 {
|
| PP_Resource (*Create)(PP_Instance instance_id);
|
| @@ -154,6 +175,31 @@ struct PPB_UDPSocket_Private_0_3 {
|
| struct PP_CompletionCallback callback);
|
| void (*Close)(PP_Resource udp_socket);
|
| };
|
| +
|
| +struct PPB_UDPSocket_Private_0_4 {
|
| + PP_Resource (*Create)(PP_Instance instance_id);
|
| + PP_Bool (*IsUDPSocket)(PP_Resource resource_id);
|
| + int32_t (*SetSocketFeature)(PP_Resource udp_socket,
|
| + PP_UDPSocketFeature_Private_0_4 name,
|
| + struct PP_Var value);
|
| + int32_t (*Bind)(PP_Resource udp_socket,
|
| + const struct PP_NetAddress_Private* addr,
|
| + struct PP_CompletionCallback callback);
|
| + PP_Bool (*GetBoundAddress)(PP_Resource udp_socket,
|
| + struct PP_NetAddress_Private* addr);
|
| + 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);
|
| +};
|
| /**
|
| * @}
|
| */
|
|
|