mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Enable JSON conversion for RsGxsImage via MemBlockProxy
This commit is contained in:
parent
afeb408f7a
commit
afb92999d8
4 changed files with 50 additions and 16 deletions
|
@ -50,7 +50,7 @@ struct RsGxsFile : RsSerializable
|
|||
}
|
||||
};
|
||||
|
||||
struct RsGxsImage
|
||||
struct RsGxsImage : RsSerializable
|
||||
{
|
||||
RsGxsImage();
|
||||
~RsGxsImage();
|
||||
|
@ -70,8 +70,16 @@ struct RsGxsImage
|
|||
void clear(); // Frees.
|
||||
void shallowClear(); // Clears Pointer.
|
||||
|
||||
uint8_t *mData;
|
||||
uint32_t mSize;
|
||||
uint8_t* mData;
|
||||
|
||||
/// @see RsSerializable
|
||||
virtual void serial_process( RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx )
|
||||
{
|
||||
RsTypeSerializer::TlvMemBlock_proxy b(mData, mSize);
|
||||
RsTypeSerializer::serial_process(j, ctx, b, "mData");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue