OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_DISPATCHER_H_ |
6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 scoped_refptr<Dispatcher> dispatcher; | 47 scoped_refptr<Dispatcher> dispatcher; |
48 MojoHandle local_handle; | 48 MojoHandle local_handle; |
49 }; | 49 }; |
50 | 50 |
51 enum class Type { | 51 enum class Type { |
52 UNKNOWN = 0, | 52 UNKNOWN = 0, |
53 MESSAGE_PIPE, | 53 MESSAGE_PIPE, |
54 DATA_PIPE_PRODUCER, | 54 DATA_PIPE_PRODUCER, |
55 DATA_PIPE_CONSUMER, | 55 DATA_PIPE_CONSUMER, |
56 SHARED_BUFFER, | 56 SHARED_BUFFER, |
57 WAIT_SET, | |
58 WATCHER, | 57 WATCHER, |
59 | 58 |
60 // "Private" types (not exposed via the public interface): | 59 // "Private" types (not exposed via the public interface): |
61 PLATFORM_HANDLE = -1, | 60 PLATFORM_HANDLE = -1, |
62 }; | 61 }; |
63 | 62 |
64 // All Dispatchers must minimally implement these methods. | 63 // All Dispatchers must minimally implement these methods. |
65 | 64 |
66 virtual Type GetType() const = 0; | 65 virtual Type GetType() const = 0; |
67 virtual MojoResult Close() = 0; | 66 virtual MojoResult Close() = 0; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // So logging macros and |DCHECK_EQ()|, etc. work. | 236 // So logging macros and |DCHECK_EQ()|, etc. work. |
238 MOJO_SYSTEM_IMPL_EXPORT inline std::ostream& operator<<(std::ostream& out, | 237 MOJO_SYSTEM_IMPL_EXPORT inline std::ostream& operator<<(std::ostream& out, |
239 Dispatcher::Type type) { | 238 Dispatcher::Type type) { |
240 return out << static_cast<int>(type); | 239 return out << static_cast<int>(type); |
241 } | 240 } |
242 | 241 |
243 } // namespace edk | 242 } // namespace edk |
244 } // namespace mojo | 243 } // namespace mojo |
245 | 244 |
246 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ | 245 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ |
OLD | NEW |