]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/utils.h
Move files to prepare for assimilation into core
[libs/core.git] / source / io / utils.h
diff --git a/source/io/utils.h b/source/io/utils.h
new file mode 100644 (file)
index 0000000..8d4f9dd
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef MSP_IO_UTILS_H_
+#define MSP_IO_UTILS_H_
+
+namespace Msp {
+namespace IO {
+
+class Base;
+
+/** Reads data from an object.  Does not return until the requested amount of
+data is read, regardless of the blocking mode of the object.
+
+Note: If the data is not immediately available and the object is in non-blocking
+mode, this function effectively becomes a busyloop until it can get more
+data. */
+unsigned read_all(Base &, char *, unsigned);
+
+} // namespace IO
+} // namespace Msp
+
+#endif