mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
merged remaining of v0.6-IdCleaning branch (7180->7213) to incorporate global router stuff in trunk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7214 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0e6302ac6a
commit
1042744685
53 changed files with 2387 additions and 1904 deletions
|
@ -1380,9 +1380,13 @@ void RsMsgItem::clear()
|
|||
subject.clear();
|
||||
message.clear();
|
||||
|
||||
msgto.TlvClear();
|
||||
msgcc.TlvClear();
|
||||
msgbcc.TlvClear();
|
||||
rspeerid_msgto.TlvClear();
|
||||
rspeerid_msgcc.TlvClear();
|
||||
rspeerid_msgbcc.TlvClear();
|
||||
|
||||
rsgxsid_msgto.TlvClear();
|
||||
rsgxsid_msgcc.TlvClear();
|
||||
rsgxsid_msgbcc.TlvClear();
|
||||
|
||||
attachment.TlvClear();
|
||||
}
|
||||
|
@ -1403,15 +1407,18 @@ std::ostream &RsMsgItem::print(std::ostream &out, uint16_t indent)
|
|||
|
||||
printIndent(out, int_Indent);
|
||||
out << "Message To: " << std::endl;
|
||||
msgto.print(out, int_Indent);
|
||||
rspeerid_msgto.print(out, int_Indent);
|
||||
rsgxsid_msgto.print(out, int_Indent);
|
||||
|
||||
printIndent(out, int_Indent);
|
||||
out << "Message CC: " << std::endl;
|
||||
msgcc.print(out, int_Indent);
|
||||
rspeerid_msgcc.print(out, int_Indent);
|
||||
rsgxsid_msgcc.print(out, int_Indent);
|
||||
|
||||
printIndent(out, int_Indent);
|
||||
out << "Message BCC: " << std::endl;
|
||||
msgbcc.print(out, int_Indent);
|
||||
rspeerid_msgbcc.print(out, int_Indent);
|
||||
rsgxsid_msgbcc.print(out, int_Indent);
|
||||
|
||||
printIndent(out, int_Indent);
|
||||
std::string cnv_subject(subject.begin(), subject.end());
|
||||
|
@ -1514,9 +1521,14 @@ uint32_t RsMsgItem::serial_size(bool m_bConfiguration)
|
|||
s += GetTlvStringSize(subject);
|
||||
s += GetTlvStringSize(message);
|
||||
|
||||
s += msgto.TlvSize();
|
||||
s += msgcc.TlvSize();
|
||||
s += msgbcc.TlvSize();
|
||||
s += rspeerid_msgto.TlvSize();
|
||||
s += rspeerid_msgcc.TlvSize();
|
||||
s += rspeerid_msgbcc.TlvSize();
|
||||
|
||||
s += rsgxsid_msgto.TlvSize();
|
||||
s += rsgxsid_msgcc.TlvSize();
|
||||
s += rsgxsid_msgbcc.TlvSize();
|
||||
|
||||
s += attachment.TlvSize();
|
||||
|
||||
if (m_bConfiguration) {
|
||||
|
@ -1558,9 +1570,13 @@ bool RsMsgItem::serialise(void *data, uint32_t& pktsize,bool config)
|
|||
ok &= SetTlvString(data,tlvsize,&offset,TLV_TYPE_STR_SUBJECT,subject);
|
||||
ok &= SetTlvString(data, tlvsize, &offset, TLV_TYPE_STR_MSG, message);
|
||||
|
||||
ok &= msgto.SetTlv(data, tlvsize, &offset);
|
||||
ok &= msgcc.SetTlv(data, tlvsize, &offset);
|
||||
ok &= msgbcc.SetTlv(data, tlvsize, &offset);
|
||||
ok &= rspeerid_msgto.SetTlv(data, tlvsize, &offset);
|
||||
ok &= rspeerid_msgcc.SetTlv(data, tlvsize, &offset);
|
||||
ok &= rspeerid_msgbcc.SetTlv(data, tlvsize, &offset);
|
||||
|
||||
ok &= rsgxsid_msgto.SetTlv(data, tlvsize, &offset);
|
||||
ok &= rsgxsid_msgcc.SetTlv(data, tlvsize, &offset);
|
||||
ok &= rsgxsid_msgbcc.SetTlv(data, tlvsize, &offset);
|
||||
|
||||
ok &= attachment.SetTlv(data, tlvsize, &offset);
|
||||
|
||||
|
@ -1614,9 +1630,14 @@ RsMsgItem *RsMsgSerialiser::deserialiseMsgItem(void *data, uint32_t *pktsize)
|
|||
|
||||
ok &= GetTlvString(data,rssize,&offset,TLV_TYPE_STR_SUBJECT,item->subject);
|
||||
ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_MSG, item->message);
|
||||
ok &= item->msgto.GetTlv(data, rssize, &offset);
|
||||
ok &= item->msgcc.GetTlv(data, rssize, &offset);
|
||||
ok &= item->msgbcc.GetTlv(data, rssize, &offset);
|
||||
|
||||
ok &= item->rspeerid_msgto.GetTlv(data, rssize, &offset);
|
||||
ok &= item->rspeerid_msgcc.GetTlv(data, rssize, &offset);
|
||||
ok &= item->rspeerid_msgbcc.GetTlv(data, rssize, &offset);
|
||||
ok &= item->rsgxsid_msgto.GetTlv(data, rssize, &offset);
|
||||
ok &= item->rsgxsid_msgcc.GetTlv(data, rssize, &offset);
|
||||
ok &= item->rsgxsid_msgbcc.GetTlv(data, rssize, &offset);
|
||||
|
||||
ok &= item->attachment.GetTlv(data, rssize, &offset);
|
||||
|
||||
if (m_bConfiguration) {
|
||||
|
|
|
@ -458,11 +458,6 @@ class RsMsgItem: public RsMessageItem
|
|||
public:
|
||||
RsMsgItem() :RsMessageItem(RS_PKT_SUBTYPE_DEFAULT) {}
|
||||
|
||||
// RsMsgItem(uint16_t type)
|
||||
// :RsItem(RS_PKT_VERSION_SERVICE, type,
|
||||
// RS_PKT_SUBTYPE_DEFAULT)
|
||||
// { setPriorityLevel(QOS_PRIORITY_RS_MSG_ITEM) ; }
|
||||
|
||||
virtual ~RsMsgItem() {}
|
||||
virtual void clear();
|
||||
|
||||
|
@ -482,9 +477,13 @@ class RsMsgItem: public RsMessageItem
|
|||
std::string subject;
|
||||
std::string message;
|
||||
|
||||
RsTlvPeerIdSet msgto;
|
||||
RsTlvPeerIdSet msgcc;
|
||||
RsTlvPeerIdSet msgbcc;
|
||||
RsTlvPeerIdSet rspeerid_msgto;
|
||||
RsTlvPeerIdSet rspeerid_msgcc;
|
||||
RsTlvPeerIdSet rspeerid_msgbcc;
|
||||
|
||||
RsTlvGxsIdSet rsgxsid_msgto;
|
||||
RsTlvGxsIdSet rsgxsid_msgcc;
|
||||
RsTlvGxsIdSet rsgxsid_msgbcc;
|
||||
|
||||
RsTlvFileSet attachment;
|
||||
};
|
||||
|
|
|
@ -48,6 +48,7 @@ const uint16_t RS_SERVICE_TYPE_TURTLE = 0x0014;
|
|||
const uint16_t RS_SERVICE_TYPE_TUNNEL = 0x0015;
|
||||
const uint16_t RS_SERVICE_TYPE_HEARTBEAT = 0x0016;
|
||||
const uint16_t RS_SERVICE_TYPE_FILE_TRANSFER = 0x0017;
|
||||
const uint16_t RS_SERVICE_TYPE_GROUTER = 0x0018;
|
||||
|
||||
/* BanList Still Testing at the moment - Service Only */
|
||||
const uint16_t RS_SERVICE_TYPE_BANLIST = 0x0101;
|
||||
|
|
|
@ -230,6 +230,7 @@ const uint16_t TLV_TYPE_HASHSET = 0x1022;
|
|||
|
||||
const uint16_t TLV_TYPE_PGPIDSET = 0x1023;
|
||||
const uint16_t TLV_TYPE_RECOGNSET = 0x1024;
|
||||
const uint16_t TLV_TYPE_GXSIDSET = 0x1025;
|
||||
|
||||
const uint16_t TLV_TYPE_SERVICESET = 0x1030;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <serialiser/rstlvtypes.h>
|
||||
#include <serialiser/rstlvbase.h>
|
||||
#include <serialiser/rsbaseserial.h>
|
||||
|
||||
#include <retroshare/rsgxsifacetypes.h>
|
||||
|
||||
//! A base class for all tlv items
|
||||
/*! This class is provided to allow the serialisation and deserialization of compund
|
||||
|
@ -190,9 +190,10 @@ template<class ID_CLASS,uint32_t TLV_TYPE> class t_RsTlvIdSet: public RsTlvItem
|
|||
std::list<ID_CLASS> ids ;
|
||||
};
|
||||
|
||||
typedef t_RsTlvIdSet<RsPeerId,TLV_TYPE_PEERSET> RsTlvPeerIdSet ;
|
||||
typedef t_RsTlvIdSet<RsPgpId,TLV_TYPE_PGPIDSET> RsTlvPgpIdSet ;
|
||||
typedef t_RsTlvIdSet<RsPeerId,TLV_TYPE_PEERSET> RsTlvPeerIdSet ;
|
||||
typedef t_RsTlvIdSet<RsPgpId,TLV_TYPE_PGPIDSET> RsTlvPgpIdSet ;
|
||||
typedef t_RsTlvIdSet<Sha1CheckSum,TLV_TYPE_HASHSET> RsTlvHashSet ;
|
||||
typedef t_RsTlvIdSet<RsGxsId,TLV_TYPE_GXSIDSET> RsTlvGxsIdSet ;
|
||||
|
||||
class RsTlvServiceIdSet: public RsTlvItem
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue