OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2010 The Native Client Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can | |
4 * be found in the LICENSE file. | |
5 */ | |
6 | |
7 // A representation of a shared memory buffer abstraction. These are used | |
8 // to communicate between the renderer and the service runtime. | |
9 | |
10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_STREAM_SHM_BUFFER_H_ | |
11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_STREAM_SHM_BUFFER_H_ | |
12 | |
13 #include "native_client/src/include/portability.h" | |
14 #include "native_client/src/include/nacl_macros.h" | |
15 | |
16 struct NaClGioShmUnbounded; | |
17 struct NaClDesc; | |
18 | |
19 namespace plugin { | |
20 | |
21 class StreamShmBuffer { | |
22 public: | |
23 StreamShmBuffer(); | |
24 ~StreamShmBuffer(); | |
25 int32_t read(int32_t offset, int32_t len, void* buf); | |
26 int32_t write(int32_t offset, int32_t len, void* buf); | |
27 NaClDesc* shm(int32_t* size) const; | |
28 | |
29 private: | |
30 NACL_DISALLOW_COPY_AND_ASSIGN(StreamShmBuffer); | |
31 NaClGioShmUnbounded* shmbufp_; | |
32 }; | |
33 | |
34 } // namespace plugin | |
35 | |
36 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_STREAM_SHM_BUFFER_H_ | |
OLD | NEW |