mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
More Improvements to FileTransfer:
* Added TlvShallowClear() to serialisers * Added RsQueueThread for periodic queue processes. * Completed ftDataMultiplex which replaces ftServer/ClientModules. * Added Server Queue / Thread to ftDataMultiplex. * Added ftdataplextest to exercise ftDataMultiplex. * Generalised ftFileSearch to handle an array of ftSearch classes. * Tweaked rsfiles.h #defines to match new ftFileSearch scheme. * Added Generic ftData Interfaces for Testing. * added ftDataSend/Recv Interfaces to ftServer + ftDataMultiplex respectively. * Completed much of ftServer (External Interface), but not yet done. * Extra debugging and small changes to ftExtraList * Integrated new ftTransferModule with minor interface changes. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@660 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d584516859
commit
5c6e558942
22 changed files with 1355 additions and 326 deletions
|
@ -33,6 +33,10 @@
|
|||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
void RsTlvItem::TlvShallowClear()
|
||||
{
|
||||
TlvClear(); /* unless overloaded! */
|
||||
}
|
||||
|
||||
std::ostream &RsTlvItem::printBase(std::ostream &out, std::string clsName, uint16_t indent)
|
||||
{
|
||||
|
@ -102,6 +106,11 @@ void RsTlvBinaryData::TlvClear()
|
|||
{
|
||||
free(bin_data);
|
||||
}
|
||||
TlvShallowClear();
|
||||
}
|
||||
|
||||
void RsTlvBinaryData::TlvShallowClear()
|
||||
{
|
||||
bin_data = NULL;
|
||||
bin_len = 0;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ class RsTlvItem
|
|||
virtual ~RsTlvItem() { return; }
|
||||
virtual uint16_t TlvSize() = 0;
|
||||
virtual void TlvClear() = 0;
|
||||
virtual void TlvShallowClear(); /*! Don't delete allocated data */
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) = 0; /* serialise */
|
||||
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset) = 0; /* deserialise */
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent) = 0;
|
||||
|
@ -66,6 +67,8 @@ class RsTlvBinaryData: public RsTlvItem
|
|||
virtual ~RsTlvBinaryData();
|
||||
virtual uint16_t TlvSize();
|
||||
virtual void TlvClear(); /*! Initialize fields to empty legal values ( "0", "", etc) */
|
||||
virtual void TlvShallowClear(); /*! Don't delete the binary data */
|
||||
|
||||
/// Serialise.
|
||||
/*! Serialise Tlv to buffer(*data) of 'size' bytes starting at *offset */
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue