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

Side by Side Diff: src/trusted/plugin/pnacl_srpc_lib.h

Issue 7799028: Remove src/trusted/plugin (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix gyp file for necessary -I Created 9 years, 3 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
« no previous file with comments | « src/trusted/plugin/pnacl_coordinator.cc ('k') | src/trusted/plugin/pnacl_srpc_lib.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_SRPC_LIB_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_SRPC_LIB_H_
7
8 // Routines to simplify SRPC invocations.
9
10 #include <stdarg.h>
11 #include "native_client/src/include/nacl_macros.h"
12 #include "native_client/src/include/nacl_string.h"
13 #include "native_client/src/include/portability.h"
14
15 namespace plugin {
16
17 class BrowserInterface;
18 class NaClSubprocess;
19 class SrpcParams;
20
21 // TODO(jvoung): See if anything can be shared between this and
22 // src/shared/srpc/invoke.c
23
24 // This is just a namespace to collect methods for setting up and invoking
25 // SPRC methods against a NaClSubprocess.
26 class PnaclSrpcLib {
27 public:
28 // Invoke an Srpc Method on the NaCl subprocess |subprocess|.
29 // |out_params| must be allocated and cleaned up outside of this function,
30 // but it will be initialized by this function, and on success
31 // any out-params (if any) will be placed in |out_params|.
32 // Input types must be listed in |input_signature|, with the actual
33 // arguments passed in as var-args.
34 // Returns |true| on success.
35 static bool InvokeSrpcMethod(BrowserInterface* browser_interface,
36 const NaClSubprocess* subprocess,
37 const nacl::string& method_name,
38 const nacl::string& input_signature,
39 SrpcParams* out_params,
40 ...);
41
42 private:
43 NACL_DISALLOW_COPY_AND_ASSIGN(PnaclSrpcLib);
44
45 static bool SetupSrpcInvocation(BrowserInterface* browser_interface,
46 const NaClSubprocess* subprocess,
47 const nacl::string& method_name,
48 SrpcParams* params,
49 uintptr_t* kMethodIdent);
50
51 static bool VInvokeSrpcMethod(BrowserInterface* browser_interface,
52 const NaClSubprocess* subprocess,
53 const nacl::string& method_name,
54 const nacl::string& signature,
55 SrpcParams* params,
56 va_list vl);
57 };
58
59 } // namespace plugin;
60
61 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_SRPC_LIB_H_
OLDNEW
« no previous file with comments | « src/trusted/plugin/pnacl_coordinator.cc ('k') | src/trusted/plugin/pnacl_srpc_lib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698