mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 02:36:23 -04:00
moved code of rsservicerserialiser into rsserializer.h/cc and renamed it into RsRawSerializer
This commit is contained in:
parent
e401b90e02
commit
14076de1e0
8 changed files with 230 additions and 111 deletions
|
@ -65,24 +65,7 @@ const uint8_t RS_PKT_CLASS_CONFIG = 0x02;
|
|||
const uint8_t RS_PKT_SUBTYPE_DEFAULT = 0x01; /* if only one subtype */
|
||||
|
||||
class RsItem ;
|
||||
|
||||
class RsSerialType
|
||||
{
|
||||
public:
|
||||
RsSerialType(uint32_t t); /* only uses top 24bits */
|
||||
RsSerialType(uint8_t ver, uint8_t cls, uint8_t t);
|
||||
RsSerialType(uint8_t ver, uint16_t service);
|
||||
|
||||
virtual ~RsSerialType();
|
||||
|
||||
virtual uint32_t size(RsItem *);
|
||||
virtual bool serialise (RsItem *item, void *data, uint32_t *size);
|
||||
virtual RsItem * deserialise(void *data, uint32_t *size);
|
||||
|
||||
uint32_t PacketId() const;
|
||||
private:
|
||||
uint32_t type;
|
||||
};
|
||||
class RsSerialType ;
|
||||
|
||||
|
||||
class RsSerialiser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue