mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-09 09:35:32 -04:00
fixed up tlv serialisers:
- Added RsTvlUnit: public RsTlvItem, which handles some of the infrstructure. - made TlvSize() SetTlv() and print() const. - split rstlvtypes into its bits and cleaned up header files. - added templated RsTlvList, imilar to cyrils id one. - removed GXS_GEN_TESTNET - cleanedup rsserviceids. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7215 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1042744685
commit
600639db51
86 changed files with 2464 additions and 2444 deletions
|
@ -26,13 +26,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "serialiser/rstlvtypes.h"
|
||||
#include "serialiser/rstlvitem.h"
|
||||
#include "serialiser/rstlvgenericparam.h"
|
||||
|
||||
#if 0
|
||||
#include <map>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "serialiser/rstlvgenericparam.h"
|
||||
#endif
|
||||
|
||||
/*********************************** RsTlvGenericPairRef ***********************************/
|
||||
|
||||
|
@ -46,11 +49,11 @@ class RsTlvGenericPairRef: public RsTlvItem
|
|||
mValueType(value_type), mKey(k), mValue(v) { return; }
|
||||
|
||||
virtual ~RsTlvGenericPairRef() { return; }
|
||||
virtual uint32_t TlvSize();
|
||||
virtual uint32_t TlvSize() const;
|
||||
virtual void TlvClear();
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset); /* serialise */
|
||||
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset); /* deserialise */
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
|
||||
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset);
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
|
||||
|
||||
uint16_t mPairType;
|
||||
uint16_t mKeyType;
|
||||
|
@ -72,11 +75,11 @@ class RsTlvGenericMapRef: public RsTlvItem
|
|||
mKeyType(key_type), mValueType(value_type), mRefMap(refmap) { return; }
|
||||
|
||||
virtual ~RsTlvGenericMapRef() { return; }
|
||||
virtual uint32_t TlvSize();
|
||||
virtual uint32_t TlvSize() const;
|
||||
virtual void TlvClear();
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset); /* serialise */
|
||||
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset); /* deserialise */
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
|
||||
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset);
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
|
||||
|
||||
uint16_t mMapType;
|
||||
uint16_t mPairType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue