OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_ | 5 #ifndef MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_ |
6 #define MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_ | 6 #define MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_ |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 namespace system { | 9 namespace system { |
10 | 10 |
11 // Classes of "entrypoints"/"syscalls": Each dispatcher should support entire | 11 // Classes of "entrypoints"/"syscalls": Each dispatcher should support entire |
12 // classes of methods (and if they don't support a given class, they should | 12 // classes of methods (and if they don't support a given class, they should |
13 // return |MOJO_RESULT_INVALID_ARGUMENT| for all the methods in that class). | 13 // return |MOJO_RESULT_INVALID_ARGUMENT| for all the methods in that class). |
14 // Warning: A dispatcher method may be called even if the dispatcher's | 14 // Warning: A dispatcher method may be called even if the dispatcher's |
15 // |SupportsEntrypointClass()| indicates that the method's class is not | 15 // |SupportsEntrypointClass()| indicates that the method's class is not |
16 // supported. | 16 // supported. |
17 enum class EntrypointClass { | 17 enum class EntrypointClass { |
| 18 // Not an entrypoint; all implementations of |
| 19 // |Dispatcher::SupportsEntrypointClass()| should return true for this: |
| 20 NONE, |
| 21 |
18 // |Dispatcher::ReadMessage()|, |Dispatcher::WriteMessage()|: | 22 // |Dispatcher::ReadMessage()|, |Dispatcher::WriteMessage()|: |
19 MESSAGE_PIPE, | 23 MESSAGE_PIPE, |
20 | 24 |
21 // |Dispatcher::SetDataPipeProducerOptions()|, | 25 // |Dispatcher::SetDataPipeProducerOptions()|, |
22 // |Dispatcher::GetDataPipeProducerOptions()|, | 26 // |Dispatcher::GetDataPipeProducerOptions()|, |
23 // |Dispatcher::WriteData()|, |Dispatcher::BeginWriteData()|, | 27 // |Dispatcher::WriteData()|, |Dispatcher::BeginWriteData()|, |
24 // |Dispatcher::EndWriteData()|: | 28 // |Dispatcher::EndWriteData()|: |
25 DATA_PIPE_PRODUCER, | 29 DATA_PIPE_PRODUCER, |
26 | 30 |
27 // |Dispatcher::SetDataPipeConsumerOptions()|, | 31 // |Dispatcher::SetDataPipeConsumerOptions()|, |
28 // |Dispatcher::GetDataPipeConsumerOptions()|, |Dispatcher::ReadData()|, | 32 // |Dispatcher::GetDataPipeConsumerOptions()|, |Dispatcher::ReadData()|, |
29 // |Dispatcher::BeginReadData()|, |Dispatcher::EndReadData()|: | 33 // |Dispatcher::BeginReadData()|, |Dispatcher::EndReadData()|: |
30 DATA_PIPE_CONSUMER, | 34 DATA_PIPE_CONSUMER, |
31 | 35 |
32 // |Dispatcher::DuplicateBufferHandle()|, | 36 // |Dispatcher::DuplicateBufferHandle()|, |
33 // |Dispatcher::GetBufferInformation()|, |Dispatcher::MapBuffer()|: | 37 // |Dispatcher::GetBufferInformation()|, |Dispatcher::MapBuffer()|: |
34 BUFFER, | 38 BUFFER, |
35 }; | 39 }; |
36 | 40 |
37 } // namespace system | 41 } // namespace system |
38 } // namespace mojo | 42 } // namespace mojo |
39 | 43 |
40 #endif // MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_ | 44 #endif // MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_ |
OLD | NEW |