#ifndef HELPERS_H #define HELPERS_H #include #include #include "gatouuid.h" template inline T read_le(const uchar *src) { return qFromLittleEndian(src); } template inline T read_le(const char *src) { return qFromLittleEndian(reinterpret_cast(src)); } template void write_le(T src, uchar *dst) { qToLittleEndian(src, dst); } template void write_le(T src, char *dst) { qToLittleEndian(src, reinterpret_cast(dst)); } GatoUUID bytearray_to_gatouuid(const QByteArray &ba); QByteArray gatouuid_to_bytearray(const GatoUUID &uuid, bool use_uuid16, bool use_uuid32); void write_gatouuid(QDataStream &s, const GatoUUID &uuid, bool use_uuid16, bool use_uuid32); #endif // HELPERS_H