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

Unified Diff: native_client_sdk/src/libraries/nacl_io/fifo_interface.h

Issue 23498015: [NaCl SDK] Support non blocking TCP/UDP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 3 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
Index: native_client_sdk/src/libraries/nacl_io/fifo_interface.h
diff --git a/native_client_sdk/src/libraries/nacl_io/fifo_interface.h b/native_client_sdk/src/libraries/nacl_io/fifo_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..46d4e821bd1ddc334448afbc232b365f2c693253
--- /dev/null
+++ b/native_client_sdk/src/libraries/nacl_io/fifo_interface.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2013 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 LIBRARIES_NACL_IO_FIFO_INTERFACE_H_
+#define LIBRARIES_NACL_IO_FIFO_INTERFACE_H_
+
+#include <stdint.h>
+#include <stdlib.h>
+
+namespace nacl_io {
+
+// FIFOInterface
+//
+// FIFOInterface provides a common interface for Emitters to update their
+// signalled state. FIFOs do not have any internal locking and instead
+// reply on a parent (usually an emitter) to lock for them as appropriate.
+class FIFOInterface {
+ public:
+ virtual ~FIFOInterface() {};
+
+ virtual bool IsEmpty() = 0;
+ virtual bool IsFull() = 0;
+ virtual bool Resize(size_t len) = 0;
+
+ virtual uint32_t ReadAvailable() = 0;
+ virtual uint32_t WriteAvailable() = 0;
+};
+
+} // namespace nacl_io
+
+#endif // LIBRARIES_NACL_IO_FIFO_INTERFACE_H_
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/fifo_char.cc ('k') | native_client_sdk/src/libraries/nacl_io/fifo_null.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698