aboutsummaryrefslogtreecommitdiff
path: root/src/primitive/mod.rs
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2020-04-29 00:00:44 +0200
committerMax Audron <audron@cocaine.farm>2020-04-29 00:00:44 +0200
commitfc64e11cdd35051a2ea87237f548ae0497a2f7f9 (patch)
treec57937731898b0ffd66d1d95bb0f181cae568c37 /src/primitive/mod.rs
parentfinish parsing of primitive types (diff)
refactor everything
Diffstat (limited to 'src/primitive/mod.rs')
-rw-r--r--src/primitive/mod.rs70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/primitive/mod.rs b/src/primitive/mod.rs
new file mode 100644
index 0000000..a3d2dcd
--- /dev/null
+++ b/src/primitive/mod.rs
@@ -0,0 +1,70 @@
+mod bufferinfo;
+mod datetime;
+mod message;
+mod signedint;
+mod string;
+mod stringlist;
+mod unsignedint;
+mod variant;
+mod variantlist;
+mod variantmap;
+
+pub use bufferinfo::*;
+pub use datetime::*;
+pub use message::*;
+pub use signedint::*;
+pub use string::*;
+pub use stringlist::*;
+pub use unsignedint::*;
+pub use variant::*;
+pub use variantlist::*;
+pub use variantmap::*;
+
+/// Byte Representation of the type used in Variant to identify it
+pub const VOID: u32 = 0x00000000;
+/// Byte Representation of the type used in Variant to identify it
+pub const BOOL: u32 = 0x00000001;
+/// Byte Representation of the type used in Variant to identify it
+pub const QCHAR: u32 = 0x00000007;
+
+/// Byte Representation of the type used in Variant to identify it
+pub const QVARIANT: u32 = 0x00000090;
+/// Byte Representation of the type used in Variant to identify it
+pub const QVARIANTMAP: u32 = 0x00000008;
+/// Byte Representation of the type used in Variant to identify it
+pub const QVARIANTLIST: u32 = 0x00000009;
+
+/// Byte Representation of the type used in Variant to identify it
+pub const QSTRING: u32 = 0x0000000a;
+/// Byte Representation of the type used in Variant to identify it
+pub const QSTRINGLIST: u32 = 0x0000000b;
+/// Byte Representation of the type used in Variant to identify it
+pub const QBYTEARRAY: u32 = 0x0000000c;
+
+/// Byte Representation of the type used in Variant to identify it
+pub const QDATE: u32 = 0x0000000e;
+/// Byte Representation of the type used in Variant to identify it
+pub const QTIME: u32 = 0x0000000f;
+/// Byte Representation of the type used in Variant to identify it
+pub const QDATETIME: u32 = 0x00000010;
+/// Byte Representation of the type used in Variant to identify it
+pub const USERTYPE: u32 = 0x0000007f;
+
+// Basic types
+/// Byte Representation of the type used in Variant to identify it
+pub const LONG: u32 = 0x00000081; // int64_t
+/// Byte Representation of the type used in Variant to identify it
+pub const INT: u32 = 0x00000002; // int32_t
+/// Byte Representation of the type used in Variant to identify it
+pub const SHORT: u32 = 0x00000082; // int16_t
+/// Byte Representation of the type used in Variant to identify it
+pub const CHAR: u32 = 0x00000083; // int8_t
+
+/// Byte Representation of the type used in Variant to identify it
+pub const ULONG: u32 = 0x00000084; // uint64_t
+/// Byte Representation of the type used in Variant to identify it
+pub const UINT: u32 = 0x00000003; // uint32_t
+/// Byte Representation of the type used in Variant to identify it
+pub const USHORT: u32 = 0x00000085; // uint16_t
+/// Byte Representation of the type used in Variant to identify it
+pub const UCHAR: u32 = 0x00000086; // uint8_t