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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc

Issue 9119001: srpcgen: Use 'const char*' for string parameters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased; update year in copyright header srpcgen emits Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 5 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
6 // 6 //
7 // Automatically generated code. See srpcgen.py 7 // Automatically generated code. See srpcgen.py
8 // 8 //
9 // NaCl Simple Remote Procedure Call interface abstractions. 9 // NaCl Simple Remote Procedure Call interface abstractions.
10 10
11 #include "untrusted/srpcgen/ppb_rpc.h" 11 #include "untrusted/srpcgen/ppb_rpc.h"
12 #ifdef __native_client__ 12 #ifdef __native_client__
13 #ifndef UNREFERENCED_PARAMETER 13 #ifndef UNREFERENCED_PARAMETER
14 #define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0) 14 #define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0)
15 #endif // UNREFERENCED_PARAMETER 15 #endif // UNREFERENCED_PARAMETER
16 #else 16 #else
17 #include "native_client/src/include/portability.h" 17 #include "native_client/src/include/portability.h"
18 #endif // __native_client__ 18 #endif // __native_client__
19 #include "native_client/src/shared/platform/nacl_check.h" 19 #include "native_client/src/shared/platform/nacl_check.h"
20 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" 20 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
21 #include "native_client/src/shared/srpc/nacl_srpc.h" 21 #include "native_client/src/shared/srpc/nacl_srpc.h"
22 #include "ppapi/c/pp_instance.h" 22 #include "ppapi/c/pp_instance.h"
23 #include "ppapi/c/pp_module.h" 23 #include "ppapi/c/pp_module.h"
24 #include "ppapi/c/pp_resource.h" 24 #include "ppapi/c/pp_resource.h"
25 #include "ppapi/c/ppb_core.h" 25 #include "ppapi/c/ppb_core.h"
26 26
27 NaClSrpcError NaClFileRpcClient::StreamAsFile( 27 NaClSrpcError NaClFileRpcClient::StreamAsFile(
28 NaClSrpcChannel* channel, 28 NaClSrpcChannel* channel,
29 PP_Instance instance, 29 PP_Instance instance,
30 char* url, 30 const char* url,
31 int32_t callback_id) { 31 int32_t callback_id) {
32 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(), 32 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
33 ("%s: PPAPI calls are not supported off the main thread\n", 33 ("%s: PPAPI calls are not supported off the main thread\n",
34 __FUNCTION__)); 34 __FUNCTION__));
35 NaClSrpcError retval; 35 NaClSrpcError retval;
36 retval = NaClSrpcInvokeBySignature( 36 retval = NaClSrpcInvokeBySignature(
37 channel, 37 channel,
38 "StreamAsFile:isi:", 38 "StreamAsFile:isi:",
39 instance, 39 instance,
40 url, 40 url,
41 callback_id 41 callback_id
42 ); 42 );
43 return retval; 43 return retval;
44 } 44 }
45 45
46 NaClSrpcError NaClFileRpcClient::GetFileDesc( 46 NaClSrpcError NaClFileRpcClient::GetFileDesc(
47 NaClSrpcChannel* channel, 47 NaClSrpcChannel* channel,
48 PP_Instance instance, 48 PP_Instance instance,
49 char* url, 49 const char* url,
50 NaClSrpcImcDescType* file_desc) { 50 NaClSrpcImcDescType* file_desc) {
51 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(), 51 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
52 ("%s: PPAPI calls are not supported off the main thread\n", 52 ("%s: PPAPI calls are not supported off the main thread\n",
53 __FUNCTION__)); 53 __FUNCTION__));
54 NaClSrpcError retval; 54 NaClSrpcError retval;
55 retval = NaClSrpcInvokeBySignature( 55 retval = NaClSrpcInvokeBySignature(
56 channel, 56 channel,
57 "GetFileDesc:is:h", 57 "GetFileDesc:is:h",
58 instance, 58 instance,
59 url, 59 url,
60 file_desc 60 file_desc
61 ); 61 );
62 return retval; 62 return retval;
63 } 63 }
64 64
65 NaClSrpcError PpbRpcClient::PPB_GetInterface( 65 NaClSrpcError PpbRpcClient::PPB_GetInterface(
66 NaClSrpcChannel* channel, 66 NaClSrpcChannel* channel,
67 char* interface_name, 67 const char* interface_name,
68 int32_t* exports_interface_name) { 68 int32_t* exports_interface_name) {
69 NaClSrpcError retval; 69 NaClSrpcError retval;
70 retval = NaClSrpcInvokeBySignature( 70 retval = NaClSrpcInvokeBySignature(
71 channel, 71 channel,
72 "PPB_GetInterface:s:i", 72 "PPB_GetInterface:s:i",
73 interface_name, 73 interface_name,
74 exports_interface_name 74 exports_interface_name
75 ); 75 );
76 return retval; 76 return retval;
77 } 77 }
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 "PPB_TCPSocket_Private_IsTCPSocket:i:i", 2315 "PPB_TCPSocket_Private_IsTCPSocket:i:i",
2316 resource, 2316 resource,
2317 is_tcp_socket 2317 is_tcp_socket
2318 ); 2318 );
2319 return retval; 2319 return retval;
2320 } 2320 }
2321 2321
2322 NaClSrpcError PpbTCPSocketPrivateRpcClient::PPB_TCPSocket_Private_Connect( 2322 NaClSrpcError PpbTCPSocketPrivateRpcClient::PPB_TCPSocket_Private_Connect(
2323 NaClSrpcChannel* channel, 2323 NaClSrpcChannel* channel,
2324 PP_Resource tcp_socket, 2324 PP_Resource tcp_socket,
2325 char* host, 2325 const char* host,
2326 int32_t port, 2326 int32_t port,
2327 int32_t callback_id, 2327 int32_t callback_id,
2328 int32_t* pp_error) { 2328 int32_t* pp_error) {
2329 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(), 2329 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
2330 ("%s: PPAPI calls are not supported off the main thread\n", 2330 ("%s: PPAPI calls are not supported off the main thread\n",
2331 __FUNCTION__)); 2331 __FUNCTION__));
2332 NaClSrpcError retval; 2332 NaClSrpcError retval;
2333 retval = NaClSrpcInvokeBySignature( 2333 retval = NaClSrpcInvokeBySignature(
2334 channel, 2334 channel,
2335 "PPB_TCPSocket_Private_Connect:isii:i", 2335 "PPB_TCPSocket_Private_Connect:isii:i",
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 tcp_socket, 2397 tcp_socket,
2398 remote_addr_bytes, remote_addr, 2398 remote_addr_bytes, remote_addr,
2399 success 2399 success
2400 ); 2400 );
2401 return retval; 2401 return retval;
2402 } 2402 }
2403 2403
2404 NaClSrpcError PpbTCPSocketPrivateRpcClient::PPB_TCPSocket_Private_SSLHandshake( 2404 NaClSrpcError PpbTCPSocketPrivateRpcClient::PPB_TCPSocket_Private_SSLHandshake(
2405 NaClSrpcChannel* channel, 2405 NaClSrpcChannel* channel,
2406 PP_Resource tcp_socket, 2406 PP_Resource tcp_socket,
2407 char* server_name, 2407 const char* server_name,
2408 int32_t server_port, 2408 int32_t server_port,
2409 int32_t callback_id, 2409 int32_t callback_id,
2410 int32_t* pp_error) { 2410 int32_t* pp_error) {
2411 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(), 2411 VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
2412 ("%s: PPAPI calls are not supported off the main thread\n", 2412 ("%s: PPAPI calls are not supported off the main thread\n",
2413 __FUNCTION__)); 2413 __FUNCTION__));
2414 NaClSrpcError retval; 2414 NaClSrpcError retval;
2415 retval = NaClSrpcInvokeBySignature( 2415 retval = NaClSrpcInvokeBySignature(
2416 channel, 2416 channel,
2417 "PPB_TCPSocket_Private_SSLHandshake:isii:i", 2417 "PPB_TCPSocket_Private_SSLHandshake:isii:i",
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 channel, 3191 channel,
3192 "PPB_Zoom_ZoomLimitsChanged:idd:", 3192 "PPB_Zoom_ZoomLimitsChanged:idd:",
3193 instance, 3193 instance,
3194 minimum_factor, 3194 minimum_factor,
3195 maximum_factor 3195 maximum_factor
3196 ); 3196 );
3197 return retval; 3197 return retval;
3198 } 3198 }
3199 3199
3200 3200
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698