user type unpacking implemented, unpack code reorganized

This commit is contained in:
romixlab
2014-09-19 23:26:24 +04:00
parent 640f6fa155
commit 39a26510dc
7 changed files with 396 additions and 357 deletions
+8
View File
@@ -4,7 +4,15 @@
#include <QVariant>
namespace MsgPack {
/**
* pack some variant to byte array data
* when write == false only calculates and returns size
* when write == true writes bytes to data, and returns the same size
* return type size
*/
typedef quint32 (*pack_user_f)(const QVariant &variant, QByteArray &data, bool write);
typedef QVariant (*unpack_user_f)(QByteArray &data);
}
#endif // COMMON_H