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

Unified Diff: mojo/edk/system/entrypoint_class.h

Issue 1941883002: Move the Dispatcher::EntrypointClass enum out of Dispatcher to its own file. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/message_pipe_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/entrypoint_class.h
diff --git a/mojo/edk/system/entrypoint_class.h b/mojo/edk/system/entrypoint_class.h
new file mode 100644
index 0000000000000000000000000000000000000000..05c172b77028e8c068e30dea0d2e4b4c3f934a12
--- /dev/null
+++ b/mojo/edk/system/entrypoint_class.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_
+#define MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_
+
+namespace mojo {
+namespace system {
+
+// Classes of "entrypoints"/"syscalls": Each dispatcher should support entire
+// classes of methods (and if they don't support a given class, they should
+// return |MOJO_RESULT_INVALID_ARGUMENT| for all the methods in that class).
+// Warning: A dispatcher method may be called even if the dispatcher's
+// |SupportsEntrypointClass()| indicates that the method's class is not
+// supported.
+enum class EntrypointClass {
+ // |Dispatcher::ReadMessage()|, |Dispatcher::WriteMessage()|:
+ MESSAGE_PIPE,
+
+ // |Dispatcher::SetDataPipeProducerOptions()|,
+ // |Dispatcher::GetDataPipeProducerOptions()|,
+ // |Dispatcher::WriteData()|, |Dispatcher::BeginWriteData()|,
+ // |Dispatcher::EndWriteData()|:
+ DATA_PIPE_PRODUCER,
+
+ // |Dispatcher::SetDataPipeConsumerOptions()|,
+ // |Dispatcher::GetDataPipeConsumerOptions()|, |Dispatcher::ReadData()|,
+ // |Dispatcher::BeginReadData()|, |Dispatcher::EndReadData()|:
+ DATA_PIPE_CONSUMER,
+
+ // |Dispatcher::DuplicateBufferHandle()|,
+ // |Dispatcher::GetBufferInformation()|, |Dispatcher::MapBuffer()|:
+ BUFFER,
+};
+
+} // namespace system
+} // namespace mojo
+
+#endif // MOJO_EDK_SYSTEM_ENTRYPOINT_CLASS_H_
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/message_pipe_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698