summaryrefslogtreecommitdiff
path: root/include/object/xdrinput.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-10-15 16:30:58 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-10-15 16:30:58 +0200
commita1bbc3b6f2707fa808d19ad0baa035c3bac3f641 (patch)
tree7e5052ee3aec7e1b368a6098179d4fdfd4cc53ee /include/object/xdrinput.h
parent5471509e033abcddb078383cc4656af06c265ce6 (diff)
add preliminary xdr input driver
Diffstat (limited to 'include/object/xdrinput.h')
-rw-r--r--include/object/xdrinput.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/object/xdrinput.h b/include/object/xdrinput.h
new file mode 100644
index 0000000..f869a13
--- /dev/null
+++ b/include/object/xdrinput.h
@@ -0,0 +1,22 @@
+#ifndef XDRINPUT_H
+#define XDRINPUT_H
+
+#include <stdint.h>
+
+class XDRInput {
+ private:
+ XDRInput(const XDRInput& copy);
+ char *data;
+ uint32_t pos;
+
+ public:
+ XDRInput(char *d) : pos(0) { data = d; }
+ uint32_t get_uint32();
+ int32_t get_int32();
+ uint64_t get_uint64();
+ int64_t get_int64();
+ uint32_t get_opaque_length();
+ char* get_opaque(uint32_t length);
+};
+
+#endif