mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 15:51:29 -04:00

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6401 b45a01b8-16f6-495d-af2f-9b41ad6348cc
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
#ifndef RSGXSSERVICE_H
|
|
#define RSGXSSERVICE_H
|
|
|
|
|
|
#include "retroshare/rstokenservice.h"
|
|
|
|
typedef std::map<RsGxsGroupId, std::vector<RsMsgMetaData> > GxsMsgMetaMap;
|
|
typedef std::map<RsGxsGrpMsgIdPair, std::vector<RsMsgMetaData> > GxsMsgRelatedMetaMap;
|
|
|
|
/*!
|
|
* The aim of this class is to abstract
|
|
* how changes are represented so
|
|
* they can be determined outside the
|
|
* client API without explcitly
|
|
* enumerating all possible changes
|
|
* at the interface
|
|
*/
|
|
class RsGxsNotify
|
|
{
|
|
public:
|
|
|
|
enum NotifyType { TYPE_PUBLISH, TYPE_RECEIVE, TYPE_PROCESSED };
|
|
|
|
virtual ~RsGxsNotify() {return; }
|
|
virtual NotifyType getType() = 0;
|
|
|
|
};
|
|
|
|
/*!
|
|
* Relevant to group changes
|
|
* TODO: extent to indicate whether a meta change or actual data
|
|
*/
|
|
class RsGxsGroupChange : public RsGxsNotify
|
|
{
|
|
public:
|
|
RsGxsGroupChange(NotifyType type) : NOTIFY_TYPE(type) {}
|
|
std::list<RsGxsGroupId> mGrpIdList;
|
|
NotifyType getType(){ return NOTIFY_TYPE;}
|
|
private:
|
|
const NotifyType NOTIFY_TYPE;
|
|
};
|
|
|
|
/*!
|
|
* Relevant to message changes
|
|
* TODO: extent to indicate whether a meta change or actual data
|
|
*/
|
|
class RsGxsMsgChange : public RsGxsNotify
|
|
{
|
|
public:
|
|
RsGxsMsgChange(NotifyType type) : NOTIFY_TYPE(type) {}
|
|
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > msgChangeMap;
|
|
NotifyType getType(){ return NOTIFY_TYPE;}
|
|
private:
|
|
const NotifyType NOTIFY_TYPE;
|
|
};
|
|
|
|
|
|
|
|
#endif // RSGXSSERVICE_H
|