aboutsummaryrefslogtreecommitdiff
path: root/py/stream.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-05 21:58:03 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-05 22:06:52 +0300
commite6a4d4e23c5e3d31436d3cebfabc894d5772c0d8 (patch)
tree1a6b09a3a339daaf2183730d7922fd7de121f843 /py/stream.h
parente4cb7c61582e0908f5c461b297f0387aa9c33785 (diff)
py: Move stream-related declarations from obj.h to stream.h.
Diffstat (limited to 'py/stream.h')
-rw-r--r--py/stream.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/py/stream.h b/py/stream.h
index 2354fd3c0..8e7f8af63 100644
--- a/py/stream.h
+++ b/py/stream.h
@@ -28,6 +28,19 @@
#include "py/obj.h"
+#define MP_STREAM_ERROR ((mp_uint_t)-1)
+
+// Stream ioctl request codes
+#define MP_STREAM_FLUSH (1)
+#define MP_STREAM_SEEK (2)
+#define MP_STREAM_POLL (3)
+
+// Argument structure for MP_STREAM_SEEK
+struct mp_stream_seek_t {
+ mp_off_t offset;
+ int whence;
+};
+
MP_DECLARE_CONST_FUN_OBJ(mp_stream_read_obj);
MP_DECLARE_CONST_FUN_OBJ(mp_stream_readinto_obj);
MP_DECLARE_CONST_FUN_OBJ(mp_stream_readall_obj);