mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-20 23:10:39 -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,11 +26,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "serialiser/rstlvtypes.h"
|
||||
#include "serialiser/rstlvitem.h"
|
||||
|
||||
#if 0
|
||||
#include <map>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
/**** TLV *****
|
||||
|
@ -44,11 +47,11 @@ class RsTlvParamRef: public RsTlvItem
|
|||
public:
|
||||
RsTlvParamRef(uint16_t param_type, T &p): mParamType(param_type), mParam(p) {}
|
||||
virtual ~RsTlvParamRef() { 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 mParamType;
|
||||
T &mParam;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue