mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-20 20:08:30 -04:00
Safer and elgant serial helper macros
This commit is contained in:
parent
7409de5170
commit
13d4a2c916
8 changed files with 133 additions and 115 deletions
|
@ -48,24 +48,24 @@ void OutgoingRecord_deprecated::serial_process(
|
|||
RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx )
|
||||
{
|
||||
RS_PROCESS_SERIAL_MEMBER_TYPED(status, uint8_t);
|
||||
RS_PROCESS_SERIAL_MEMBER(recipient);
|
||||
RS_PROCESS_SERIAL_MEMBER(mailItem);
|
||||
RS_PROCESS_SERIAL_MEMBER(mailData);
|
||||
RS_PROCESS_SERIAL_MEMBER_TYPED(clientService, uint16_t);
|
||||
RS_PROCESS_SERIAL_MEMBER(presignedReceipt);
|
||||
RS_SERIAL_PROCESS(status);
|
||||
RS_SERIAL_PROCESS(recipient);
|
||||
RS_SERIAL_PROCESS(mailItem);
|
||||
RS_SERIAL_PROCESS(mailData);
|
||||
RS_SERIAL_PROCESS(clientService);
|
||||
RS_SERIAL_PROCESS(presignedReceipt);
|
||||
}
|
||||
|
||||
void OutgoingRecord::serial_process(RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
RS_PROCESS_SERIAL_MEMBER_TYPED(status, uint8_t);
|
||||
RS_PROCESS_SERIAL_MEMBER(recipient);
|
||||
RS_PROCESS_SERIAL_MEMBER(author);
|
||||
RS_PROCESS_SERIAL_MEMBER(group_id);
|
||||
RS_PROCESS_SERIAL_MEMBER(sent_ts);
|
||||
RS_PROCESS_SERIAL_MEMBER(mailItem);
|
||||
RS_PROCESS_SERIAL_MEMBER(mailData);
|
||||
RS_PROCESS_SERIAL_MEMBER_TYPED(clientService, uint16_t);
|
||||
RS_PROCESS_SERIAL_MEMBER(presignedReceipt);
|
||||
RS_SERIAL_PROCESS(status);
|
||||
RS_SERIAL_PROCESS(recipient);
|
||||
RS_SERIAL_PROCESS(author);
|
||||
RS_SERIAL_PROCESS(group_id);
|
||||
RS_SERIAL_PROCESS(sent_ts);
|
||||
RS_SERIAL_PROCESS(mailItem);
|
||||
RS_SERIAL_PROCESS(mailData);
|
||||
RS_SERIAL_PROCESS(clientService);
|
||||
RS_SERIAL_PROCESS(presignedReceipt);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx )
|
||||
{ RS_PROCESS_SERIAL_MEMBER_TYPED(mailId, uint64_t); }
|
||||
{ RS_SERIAL_PROCESS(mailId); }
|
||||
};
|
||||
|
||||
class RsGxsTransPresignedReceipt : public RsGxsTransBaseMsgItem
|
||||
|
@ -140,9 +140,9 @@ public:
|
|||
RsGenericSerializer::SerializeContext& ctx )
|
||||
{
|
||||
RsGxsTransBaseMsgItem::serial_process(j, ctx);
|
||||
RS_PROCESS_SERIAL_MEMBER_TYPED(cryptoType, uint8_t);
|
||||
RS_PROCESS_SERIAL_MEMBER(recipientHint);
|
||||
RS_PROCESS_SERIAL_MEMBER(payload);
|
||||
RS_SERIAL_PROCESS(cryptoType);
|
||||
RS_SERIAL_PROCESS(recipientHint);
|
||||
RS_SERIAL_PROCESS(payload);
|
||||
}
|
||||
|
||||
void clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue