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

Side by Side Diff: src/untrusted/init/process_lib.h

Issue 25147002: nacl_init Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 2 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/untrusted/init/name_service.cc ('k') | src/untrusted/init/process_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) 2013 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_UNTRUSTED_INIT_PROCESS_H_
6 #define NATIVE_CLIENT_SRC_UNTRUSTED_INIT_PROCESS_H_
7
8 #include "native_client/src/shared/srpc/nacl_srpc.h"
9
10 #include <string>
11 #include <vector>
12
13 // NaClErrorCode
14 #include "native_client/src/trusted/service_runtime/nacl_error_code.h"
15
16 namespace nacl {
17
18 class SrpcClientConnection {
19 public:
20 SrpcClientConnection();
21 virtual ~SrpcClientConnection();
22
23 // takes ownership of desc
24 bool InitializeFromConnectedDesc(int desc);
25
26 // uses cap to derive desc, but caller retains ownership
27 bool InitializeFromConnectionCapability(int cap);
28
29 bool initialized() const { return initialized_; }
30 NaClSrpcChannel *chan() { return &chan_; }
31
32 private:
33 bool initialized_;
34 int desc_;
35 NaClSrpcChannel chan_; // POD
36 };
37
38 class ServiceRuntimeClient : public SrpcClientConnection {
39 public:
40 ServiceRuntimeClient() {}
41
42 // Returns an NaClErrorCode -- LOAD_OK (0) is okay, non-zero is an error.
43 NaClErrorCode RunNaClModule(int module_descriptor);
44 // module_descriptor must be a valid descriptor.
45 // irt_descriptor may be -1 if no IRT is desired.
46 };
47
48 } // namespace nacl
49
50 #endif
OLDNEW
« no previous file with comments | « src/untrusted/init/name_service.cc ('k') | src/untrusted/init/process_lib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698