mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 08:35:45 -04:00
save/load public msg invites. Small bug fixes.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-GenericTunneling@6358 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cc6555b93f
commit
a8d4c02a6e
6 changed files with 196 additions and 71 deletions
|
@ -71,7 +71,7 @@ const uint8_t RS_PKT_SUBTYPE_MSG_TAG_TYPE = 0x03;
|
|||
const uint8_t RS_PKT_SUBTYPE_MSG_TAGS = 0x04;
|
||||
const uint8_t RS_PKT_SUBTYPE_MSG_SRC_TAG = 0x05;
|
||||
const uint8_t RS_PKT_SUBTYPE_MSG_PARENT_TAG = 0x06;
|
||||
const uint8_t RS_PKT_SUBTYPE_MSG_ENCRYPTED = 0x07;
|
||||
const uint8_t RS_PKT_SUBTYPE_MSG_INVITE = 0x07;
|
||||
|
||||
typedef uint64_t ChatLobbyId ;
|
||||
typedef uint64_t ChatLobbyMsgId ;
|
||||
|
@ -444,36 +444,6 @@ std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
|||
RsTlvFileSet attachment;
|
||||
};
|
||||
|
||||
// // Encrypted messages encapsulate a whole RsMsgItem into the binary data. The signature is optional.
|
||||
// // There is no To or CC peers since the whole communiation addresses are obfuscated in the encrypted
|
||||
// // layer, and because of public key encryption, the email can only have one destination peer.
|
||||
// //
|
||||
// class RsEncryptedMsgItem: public RsItem
|
||||
// {
|
||||
// public:
|
||||
// RsEncryptedMsgItem()
|
||||
// :RsItem(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_MSG, RS_PKT_SUBTYPE_MSG_ENCRYPTED)
|
||||
// {
|
||||
// setPriorityLevel(QOS_PRIORITY_RS_MSG_ITEM) ;
|
||||
// }
|
||||
//
|
||||
// // RsEncryptedMsgItem(uint16_t type)
|
||||
// // :RsItem(RS_PKT_VERSION_SERVICE, type, RS_PKT_SUBTYPE_DEFAULT)
|
||||
// // {
|
||||
// // setPriorityLevel(QOS_PRIORITY_RS_MSG_ITEM) ;
|
||||
// // }
|
||||
//
|
||||
// virtual ~RsEncryptedMsgItem();
|
||||
// virtual void clear();
|
||||
// std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
//
|
||||
// uint32_t msgId;
|
||||
// unsigned char *encrypted_bin_data ;
|
||||
// uint32_t encrypted_bin_size ;
|
||||
// unsigned char *signature_bin_data ;
|
||||
// uint32_t signature_bin_size ;
|
||||
// };
|
||||
|
||||
class RsMsgTagType : public RsItem
|
||||
{
|
||||
public:
|
||||
|
@ -530,6 +500,24 @@ public:
|
|||
std::string srcId;
|
||||
|
||||
};
|
||||
class RsPublicMsgInviteConfigItem : public RsItem
|
||||
{
|
||||
|
||||
public:
|
||||
RsPublicMsgInviteConfigItem()
|
||||
: RsItem(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_MSG,
|
||||
RS_PKT_SUBTYPE_MSG_INVITE)
|
||||
{ return;}
|
||||
|
||||
std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual ~RsPublicMsgInviteConfigItem() {}
|
||||
virtual void clear();
|
||||
|
||||
std::string hash ;
|
||||
time_t time_stamp ;
|
||||
};
|
||||
|
||||
|
||||
class RsMsgParentId : public RsItem
|
||||
{
|
||||
|
@ -591,9 +579,9 @@ class RsMsgSerialiser: public RsSerialType
|
|||
virtual bool serialiseMsgParentIdItem (RsMsgParentId *item, void *data, uint32_t *size);
|
||||
virtual RsMsgParentId *deserialiseMsgParentIdItem(void *data, uint32_t *size);
|
||||
|
||||
// virtual uint32_t sizeEncryptedMsgItem(RsEncryptedMsgItem *) ;
|
||||
// virtual bool serialiseEncryptedMsgItem(RsEncryptedMsgItem *item, void *data, uint32_t *size);
|
||||
// virtual RsEncryptedMsgItem *deserialiseEncryptedMsgItem(void *data, uint32_t *size);
|
||||
virtual uint32_t sizePublicMsgInviteConfigItem(RsPublicMsgInviteConfigItem *) ;
|
||||
virtual bool serialisePublicMsgInviteConfigItem(RsPublicMsgInviteConfigItem *item, void *data, uint32_t *size);
|
||||
virtual RsPublicMsgInviteConfigItem *deserialisePublicMsgInviteConfigItem(void *data, uint32_t *size);
|
||||
|
||||
bool m_bConfiguration; // is set to true for saving configuration (enables serialising msgId)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue