OLD | NEW |
1 // Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2012 The Native Client 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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ | 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ |
6 #define NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ | 6 #define NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ |
7 | 7 |
8 #include "native_client/src/include/nacl_base.h" | 8 #include "native_client/src/include/nacl_base.h" |
9 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 9 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
10 #include "native_client/src/trusted/desc/nrd_xfer.h" | 10 #include "native_client/src/trusted/desc/nrd_xfer.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // We will doubtless want more specific factory methods. For now, | 45 // We will doubtless want more specific factory methods. For now, |
46 // we provide a wide-open method. | 46 // we provide a wide-open method. |
47 DescWrapper* MakeGeneric(struct NaClDesc* desc); | 47 DescWrapper* MakeGeneric(struct NaClDesc* desc); |
48 // Same as above but unrefs desc in case of failure | 48 // Same as above but unrefs desc in case of failure |
49 DescWrapper* MakeGenericCleanup(struct NaClDesc* desc); | 49 DescWrapper* MakeGenericCleanup(struct NaClDesc* desc); |
50 // Utility routine for importing sync socket | 50 // Utility routine for importing sync socket |
51 DescWrapper* ImportSyncSocketHandle(NaClHandle handle); | 51 DescWrapper* ImportSyncSocketHandle(NaClHandle handle); |
52 // Utility routine for importing Linux/Mac (posix) and Windows shared memory. | 52 // Utility routine for importing Linux/Mac (posix) and Windows shared memory. |
53 DescWrapper* ImportShmHandle(NaClHandle handle, size_t size); | 53 DescWrapper* ImportShmHandle(NaClHandle handle, size_t size); |
54 // Utility routine for importing SysV shared memory. | |
55 DescWrapper* ImportSysvShm(int key, size_t size); | |
56 | 54 |
57 private: | 55 private: |
58 // The common data from this instance of the wrapper. | 56 // The common data from this instance of the wrapper. |
59 DescWrapperCommon* common_data_; | 57 DescWrapperCommon* common_data_; |
60 | 58 |
61 DISALLOW_COPY_AND_ASSIGN(DescWrapperFactory); | 59 DISALLOW_COPY_AND_ASSIGN(DescWrapperFactory); |
62 }; | 60 }; |
63 | 61 |
64 // A wrapper around NaClDesc to provide slightly higher level abstractions for | 62 // A wrapper around NaClDesc to provide slightly higher level abstractions for |
65 // common operations. | 63 // common operations. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 184 |
187 DescWrapperCommon* common_data_; | 185 DescWrapperCommon* common_data_; |
188 struct NaClDesc* desc_; | 186 struct NaClDesc* desc_; |
189 | 187 |
190 DISALLOW_COPY_AND_ASSIGN(DescWrapper); | 188 DISALLOW_COPY_AND_ASSIGN(DescWrapper); |
191 }; | 189 }; |
192 | 190 |
193 } // namespace nacl | 191 } // namespace nacl |
194 | 192 |
195 #endif // NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ | 193 #endif // NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ |
OLD | NEW |