From a1bbc3b6f2707fa808d19ad0baa035c3bac3f641 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 15 Oct 2018 16:30:58 +0200 Subject: add preliminary xdr input driver --- include/object/xdrinput.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/object/xdrinput.h (limited to 'include/object/xdrinput.h') 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 + +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 -- cgit v1.2.3