Updated dataservice tests and fixed subsequent bugs
added bug fixes for RetroDb and fixed postability issue (removed map.at use)

Added:

Data access module used as token service
gxs service backend (RsGenExchange) 
RsPhotoV2 which is a modification to deal with different interface provided by RsGenExchange
also added subsequent p3photoserviceV2
NxsTestHub to help with testing nxsnetservice (RsGxsNetService is not yet working)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5274 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-07-05 21:26:14 +00:00
parent f05d2f9b09
commit 081b59ee1a
27 changed files with 1529 additions and 395 deletions

View file

@ -0,0 +1,27 @@
#ifndef RSGXSITEM_H
#define RSGXSITEM_H
#include "serialiser/rsserviceids.h"
#include "serialiser/rsserial.h"
#include "serialiser/rstlvbase.h"
#include "serialiser/rstlvtypes.h"
#include "serialiser/rstlvkeys.h"
class RsGxsGrpItem : RsItem
{
RsGxsItem() : RsItem(0) { return; }
virtual ~RsGxsItem();
};
class RsGxsMsgItem : RsItem
{
RsGxsItem() : RsItem(0) { return; }
virtual ~RsGxsItem();
};
#endif // RSGXSITEM_H

View file

@ -26,98 +26,114 @@
*
*/
#include <map>
#include "serialiser/rsserviceids.h"
#include "serialiser/rsserial.h"
#include "serialiser/rstlvbase.h"
#include "serialiser/rstlvtypes.h"
#include "serialiser/rstlvkeys.h"
#include "gxs/rsgxsdata.h"
/*!
* Base class used by client API
* for messages.
* Main purpose is for msg flows
* between GDS and GXS API clients
*/
class RsGxsMsg : public RsItem
class RsGxsGrpItem : public RsItem
{
public:
RsGxsMsg() : RsItem(0) {}
virtual ~RsGxsMsg(){ return; }
};
/*!
* Base class used by client API
* for groups.
* Main purpose is for msg flows
* between GDS and GXS API clients
*/
class RsGxsGroup : public RsItem
{
public:
/*** type of msgs ***/
RsGxsGroup(uint16_t servtype, uint8_t subtype)
: RsItem(servtype) { return; }
virtual ~RsGxsGroup() { return; }
/*!
* Three thing flag represents:
* Is it signed by identity?
* Group type (private, public, restricted)
* msgs allowed (signed and anon)
*/
uint32_t grpFlag;
/***** *****/
RsGxsGrpItem() : RsItem(0) { return; }
virtual ~RsGxsGrpItem(){}
// must be serialised
std::string mAuthorId;
std::string mGrpId;
};
class RsGxsSearch : public RsItem {
RsGxsSearch(uint32_t servtype) : RsItem(servtype) { return ; }
virtual ~RsGxsSearch() { return;}
};
class RsGxsSrchResMsgCtx : public RsItem {
RsGxsSrchResMsgCtx(uint32_t servtype) : RsItem(servtype) { return; }
virtual ~RsGxsSrchResMsgCtx() {return; }
std::string msgId;
RsTlvKeySignature sign;
};
class RsGxsSrchResGrpCtx : public RsItem {
RsGxsSrchResGrpCtx(uint32_t servtype) : RsItem(servtype) { return; }
virtual ~RsGxsSrchResGrpCtx() {return; }
std::string msgId;
RsTlvKeySignature sign;
};
class RsGxsSerialiser : public RsSerialType
class RsGxsMsgItem : public RsItem
{
public:
RsGxsSerialiser(uint32_t servtype) : RsSerialType(servtype) { return; }
virtual ~RsGxsSerialiser() { return; }
public:
RsGxsMsgItem() : RsItem(0) { return; }
virtual ~RsGxsMsgItem(){}
// must be serialised
std::string mAuthorId;
std::string mMsgId;
std::string mGrpId;
};
class RsGroupMetaData
{
public:
RsGroupMetaData()
{
mGroupFlags = 0;
mSubscribeFlags = 0;
mPop = 0;
mMsgCount = 0;
mLastPost = 0;
mGroupStatus = 0;
//mPublishTs = 0;
}
std::string mGroupId;
std::string mGroupName;
uint32_t mGroupFlags;
time_t mPublishTs; // Mandatory.
std::string mAuthorId; // Optional.
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
uint32_t mSubscribeFlags;
uint32_t mPop; // HOW DO WE DO THIS NOW.
uint32_t mMsgCount; // ???
time_t mLastPost; // ???
uint32_t mGroupStatus;
};
class RsMsgMetaData
{
public:
RsMsgMetaData()
{
mPublishTs = 0;
mMsgFlags = 0;
mMsgStatus = 0;
mChildTs = 0;
}
std::string mGroupId;
std::string mMsgId;
std::string mThreadId;
std::string mParentId;
std::string mOrigMsgId;
std::string mAuthorId;
std::string mMsgName;
time_t mPublishTs;
uint32_t mMsgFlags; // Whats this for?
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
// normally READ / UNREAD flags. LOCAL Data.
uint32_t mMsgStatus;
time_t mChildTs;
};
#endif // RSGXSITEMS_H