mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-20 20:08:30 -04:00
Add automatic JSON serialization/deserialization
Abstract serialization concept to pure virtaul class RsSerializable from which every other serializable class must inherit from Use RapidJSON for JSON manipulation Add TO_JSON and FROM_JSON SerializeJob Deprecate unused SerializationFormat Remove some unused old piece of code Adjust many lines to max 80 columns for better readability on little screens Clean up documentation and code, remove old cruft Add copyright notice on edited files that miss it
This commit is contained in:
parent
49cacc41a1
commit
5cdc5aa58d
12 changed files with 1384 additions and 405 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GXS Mailing Service
|
||||
* Copyright (C) 2016-2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
* Copyright (C) 2016-2018 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
@ -38,11 +38,15 @@ OutgoingRecord::OutgoingRecord( RsGxsId rec, GxsTransSubServices cs,
|
|||
memcpy(&mailData[0], data, size);
|
||||
}
|
||||
|
||||
// for mailItem
|
||||
RS_REGISTER_SERIALIZABLE_TYPE_DEF(RsGxsTransMailItem)
|
||||
|
||||
RS_REGISTER_ITEM_TYPE(RsGxsTransMailItem) // for mailItem
|
||||
RS_REGISTER_ITEM_TYPE(RsNxsTransPresignedReceipt) // for presignedReceipt
|
||||
// for presignedReceipt
|
||||
RS_REGISTER_SERIALIZABLE_TYPE_DEF(RsNxsTransPresignedReceipt)
|
||||
|
||||
void OutgoingRecord_deprecated::serial_process(RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext& ctx)
|
||||
void OutgoingRecord_deprecated::serial_process(
|
||||
RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx )
|
||||
{
|
||||
RS_REGISTER_SERIAL_MEMBER_TYPED(status, uint8_t);
|
||||
RS_REGISTER_SERIAL_MEMBER(recipient);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue