mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
cache stuff does not compile. just saving lots of coding i've done.
Completed most of the coding for first new cache service, need to fix compile errors and test. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5330 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b2c74a045f
commit
d50ecd145f
20 changed files with 775 additions and 263 deletions
40
libretroshare/src/serialiser/rsgxsitems.cc
Normal file
40
libretroshare/src/serialiser/rsgxsitems.cc
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* rsgxsitems.cc
|
||||
*
|
||||
* Created on: 26 Jul 2012
|
||||
* Author: crispy
|
||||
*/
|
||||
|
||||
|
||||
#include "rsgxsitems.h"
|
||||
#include "gxs/rsgxsdata.h"
|
||||
|
||||
void RsMsgMetaData::operator =(const RsGxsMsgMetaData& rGxsMeta)
|
||||
{
|
||||
this->mAuthorId = rGxsMeta.mAuthorId;
|
||||
this->mChildTs = rGxsMeta.mChildTs;
|
||||
this->mGroupId = rGxsMeta.mGroupId;
|
||||
this->mMsgFlags = rGxsMeta.mMsgFlags;
|
||||
this->mMsgId = rGxsMeta.mMsgId;
|
||||
this->mMsgName = rGxsMeta.mMsgName;
|
||||
this->mMsgStatus = rGxsMeta.mMsgStatus;
|
||||
this->mOrigMsgId = rGxsMeta.mOrigMsgId;
|
||||
this->mParentId = rGxsMeta.mParentId;
|
||||
this->mPublishTs = rGxsMeta.mPublishTs;
|
||||
this->mThreadId = rGxsMeta.mThreadId;
|
||||
}
|
||||
|
||||
|
||||
void RsGroupMetaData::operator =(const RsGxsGrpMetaData& rGxsMeta)
|
||||
{
|
||||
this->mAuthorId = rGxsMeta.mAuthorId;
|
||||
this->mGroupFlags = rGxsMeta.mGroupFlags;
|
||||
this->mGroupId = rGxsMeta.mGroupId;
|
||||
this->mGroupStatus = rGxsMeta.mGroupStatus;
|
||||
this->mLastPost = rGxsMeta.mLastPost;
|
||||
this->mMsgCount = rGxsMeta.mMsgCount;
|
||||
this->mPop = rGxsMeta.mPop;
|
||||
this->mPublishTs = rGxsMeta.mPublishTs;
|
||||
this->mSubscribeFlags = rGxsMeta.mSubscribeFlags;
|
||||
this->mGroupName = rGxsMeta.mGroupName;
|
||||
}
|
|
@ -32,35 +32,8 @@
|
|||
#include "serialiser/rstlvtypes.h"
|
||||
#include "serialiser/rstlvkeys.h"
|
||||
|
||||
|
||||
class RsGxsGrpItem : public RsItem
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
RsGxsGrpItem() : RsItem(0) { return; }
|
||||
virtual ~RsGxsGrpItem(){}
|
||||
|
||||
// must be serialised
|
||||
std::string mAuthorId;
|
||||
std::string mGrpId;
|
||||
|
||||
};
|
||||
|
||||
class RsGxsMsgItem : public RsItem
|
||||
{
|
||||
|
||||
public:
|
||||
RsGxsMsgItem() : RsItem(0) { return; }
|
||||
virtual ~RsGxsMsgItem(){}
|
||||
|
||||
// must be serialised
|
||||
std::string mAuthorId;
|
||||
std::string mMsgId;
|
||||
std::string mGrpId;
|
||||
|
||||
};
|
||||
|
||||
class RsGxsGrpMetaData;
|
||||
class RsGxsMsgMetaData;
|
||||
|
||||
class RsGroupMetaData
|
||||
{
|
||||
|
@ -79,6 +52,20 @@ class RsGroupMetaData
|
|||
//mPublishTs = 0;
|
||||
}
|
||||
|
||||
void operator =(const RsGxsGrpMetaData& rGxsMeta);
|
||||
// {
|
||||
// this->mAuthorId = rGxsMeta.mAuthorId;
|
||||
// this->mGroupFlags = rGxsMeta.mGroupFlags;
|
||||
// this->mGroupId = rGxsMeta.mGroupId;
|
||||
// this->mGroupStatus = rGxsMeta.mGroupStatus;
|
||||
// this->mLastPost = rGxsMeta.mLastPost;
|
||||
// this->mMsgCount = rGxsMeta.mMsgCount;
|
||||
// this->mPop = rGxsMeta.mPop;
|
||||
// this->mPublishTs = rGxsMeta.mPublishTs;
|
||||
// this->mSubscribeFlags = rGxsMeta.mSubscribeFlags;
|
||||
// this->mGroupName = rGxsMeta.mGroupName;
|
||||
// }
|
||||
|
||||
std::string mGroupId;
|
||||
std::string mGroupName;
|
||||
uint32_t mGroupFlags;
|
||||
|
@ -113,6 +100,9 @@ class RsMsgMetaData
|
|||
mChildTs = 0;
|
||||
}
|
||||
|
||||
void operator =(const RsGxsMsgMetaData& rGxsMeta);
|
||||
|
||||
|
||||
std::string mGroupId;
|
||||
std::string mMsgId;
|
||||
|
||||
|
@ -135,5 +125,31 @@ class RsMsgMetaData
|
|||
};
|
||||
|
||||
|
||||
class RsGxsGrpItem : public RsItem
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
RsGxsGrpItem() : RsItem(0) { return; }
|
||||
virtual ~RsGxsGrpItem(){}
|
||||
|
||||
RsGroupMetaData meta;
|
||||
|
||||
};
|
||||
|
||||
class RsGxsMsgItem : public RsItem
|
||||
{
|
||||
|
||||
public:
|
||||
RsGxsMsgItem() : RsItem(0) { return; }
|
||||
virtual ~RsGxsMsgItem(){}
|
||||
|
||||
RsMsgMetaData meta;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // RSGXSITEMS_H
|
||||
|
|
|
@ -184,8 +184,9 @@ class RsNxsGrp : public RsNxsItem
|
|||
|
||||
public:
|
||||
|
||||
RsNxsGrp(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP), grp(servtype), meta(servtype) { clear(); return; }
|
||||
|
||||
RsNxsGrp(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP), grp(servtype), meta(servtype),
|
||||
metaData(NULL) { clear(); return; }
|
||||
virtual ~RsNxsGrp() { if(metaData) delete metaData; }
|
||||
|
||||
virtual void clear();
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
||||
|
@ -278,6 +279,8 @@ public:
|
|||
*/
|
||||
RsTlvBinaryData msg;
|
||||
|
||||
RsGxsMsgMetaData* metaData;
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
|
@ -39,13 +39,15 @@
|
|||
class RsGxsPhotoAlbumItem : public RsGxsGrpItem
|
||||
{
|
||||
|
||||
RsGxsPhotoAlbumItem() {}
|
||||
public:
|
||||
|
||||
RsGxsPhotoAlbumItem() {}
|
||||
RsPhotoAlbum album;
|
||||
};
|
||||
|
||||
class RsGxsPhotoPhotoItem : public RsGxsMsgItem
|
||||
{
|
||||
public:
|
||||
|
||||
RsGxsPhotoPhotoItem() {}
|
||||
RsPhotoPhoto photo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue