Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c

Issue 704133005: Pepper: Add support for multicast in PPB_UDPSocket API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests, thunk code auto generated Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index 1ceec96e3be6a6823bcacd4d4d8e52baebe722e0..b1a9a1f67905fdf9ba2d629a7829a3f7dcaeaa53 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -136,6 +136,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPSocket_1_2;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TextInputController_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_1_1;
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_1_2;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLLoader_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLRequestInfo_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLResponseInfo_1_0;
@@ -1783,6 +1784,60 @@ static int32_t Pnacl_M41_PPB_UDPSocket_SetOption(PP_Resource udp_socket, PP_UDPS
/* End wrapper methods for PPB_UDPSocket_1_1 */
+/* Begin wrapper methods for PPB_UDPSocket_1_2 */
+
+static PP_Resource Pnacl_M42_PPB_UDPSocket_Create(PP_Instance instance) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->Create(instance);
+}
+
+static PP_Bool Pnacl_M42_PPB_UDPSocket_IsUDPSocket(PP_Resource resource) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->IsUDPSocket(resource);
+}
+
+static int32_t Pnacl_M42_PPB_UDPSocket_Bind(PP_Resource udp_socket, PP_Resource addr, struct PP_CompletionCallback* callback) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->Bind(udp_socket, addr, *callback);
+}
+
+static PP_Resource Pnacl_M42_PPB_UDPSocket_GetBoundAddress(PP_Resource udp_socket) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->GetBoundAddress(udp_socket);
+}
+
+static int32_t Pnacl_M42_PPB_UDPSocket_RecvFrom(PP_Resource udp_socket, char* buffer, int32_t num_bytes, PP_Resource* addr, struct PP_CompletionCallback* callback) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->RecvFrom(udp_socket, buffer, num_bytes, addr, *callback);
+}
+
+static int32_t Pnacl_M42_PPB_UDPSocket_SendTo(PP_Resource udp_socket, const char* buffer, int32_t num_bytes, PP_Resource addr, struct PP_CompletionCallback* callback) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->SendTo(udp_socket, buffer, num_bytes, addr, *callback);
+}
+
+static void Pnacl_M42_PPB_UDPSocket_Close(PP_Resource udp_socket) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ iface->Close(udp_socket);
+}
+
+static int32_t Pnacl_M42_PPB_UDPSocket_SetOption(PP_Resource udp_socket, PP_UDPSocket_Option name, struct PP_Var* value, struct PP_CompletionCallback* callback) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->SetOption(udp_socket, name, *value, *callback);
+}
+
+static int32_t Pnacl_M42_PPB_UDPSocket_JoinGroup(PP_Resource udp_socket, PP_Resource group, struct PP_CompletionCallback* callback) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->JoinGroup(udp_socket, group, *callback);
+}
+
+static int32_t Pnacl_M42_PPB_UDPSocket_LeaveGroup(PP_Resource udp_socket, PP_Resource group, struct PP_CompletionCallback* callback) {
+ const struct PPB_UDPSocket_1_2 *iface = Pnacl_WrapperInfo_PPB_UDPSocket_1_2.real_iface;
+ return iface->LeaveGroup(udp_socket, group, *callback);
+}
+
+/* End wrapper methods for PPB_UDPSocket_1_2 */
+
/* Begin wrapper methods for PPB_URLLoader_1_0 */
static PP_Resource Pnacl_M14_PPB_URLLoader_Create(PP_Instance instance) {
@@ -4956,6 +5011,19 @@ static const struct PPB_UDPSocket_1_1 Pnacl_Wrappers_PPB_UDPSocket_1_1 = {
.SetOption = (int32_t (*)(PP_Resource udp_socket, PP_UDPSocket_Option name, struct PP_Var value, struct PP_CompletionCallback callback))&Pnacl_M41_PPB_UDPSocket_SetOption
};
+static const struct PPB_UDPSocket_1_2 Pnacl_Wrappers_PPB_UDPSocket_1_2 = {
+ .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M42_PPB_UDPSocket_Create,
+ .IsUDPSocket = (PP_Bool (*)(PP_Resource resource))&Pnacl_M42_PPB_UDPSocket_IsUDPSocket,
+ .Bind = (int32_t (*)(PP_Resource udp_socket, PP_Resource addr, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_UDPSocket_Bind,
+ .GetBoundAddress = (PP_Resource (*)(PP_Resource udp_socket))&Pnacl_M42_PPB_UDPSocket_GetBoundAddress,
+ .RecvFrom = (int32_t (*)(PP_Resource udp_socket, char* buffer, int32_t num_bytes, PP_Resource* addr, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_UDPSocket_RecvFrom,
+ .SendTo = (int32_t (*)(PP_Resource udp_socket, const char* buffer, int32_t num_bytes, PP_Resource addr, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_UDPSocket_SendTo,
+ .Close = (void (*)(PP_Resource udp_socket))&Pnacl_M42_PPB_UDPSocket_Close,
+ .SetOption = (int32_t (*)(PP_Resource udp_socket, PP_UDPSocket_Option name, struct PP_Var value, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_UDPSocket_SetOption,
+ .JoinGroup = (int32_t (*)(PP_Resource udp_socket, PP_Resource group, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_UDPSocket_JoinGroup,
+ .LeaveGroup = (int32_t (*)(PP_Resource udp_socket, PP_Resource group, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_UDPSocket_LeaveGroup
+};
+
static const struct PPB_URLLoader_1_0 Pnacl_Wrappers_PPB_URLLoader_1_0 = {
.Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M14_PPB_URLLoader_Create,
.IsURLLoader = (PP_Bool (*)(PP_Resource resource))&Pnacl_M14_PPB_URLLoader_IsURLLoader,
@@ -5980,6 +6048,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_1_1 = {
.real_iface = NULL
};
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_1_2 = {
+ .iface_macro = PPB_UDPSOCKET_INTERFACE_1_2,
+ .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_UDPSocket_1_2,
+ .real_iface = NULL
+};
+
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLLoader_1_0 = {
.iface_macro = PPB_URLLOADER_INTERFACE_1_0,
.wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_URLLoader_1_0,
@@ -6453,6 +6527,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_TextInputController_1_0,
&Pnacl_WrapperInfo_PPB_UDPSocket_1_0,
&Pnacl_WrapperInfo_PPB_UDPSocket_1_1,
+ &Pnacl_WrapperInfo_PPB_UDPSocket_1_2,
&Pnacl_WrapperInfo_PPB_URLLoader_1_0,
&Pnacl_WrapperInfo_PPB_URLRequestInfo_1_0,
&Pnacl_WrapperInfo_PPB_URLResponseInfo_1_0,

Powered by Google App Engine
This is Rietveld 408576698