mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
8351510841
- Added notify of the group id and the refresh of the gui - Added system message (create of message disabled) - Added possibility to show a news feed item git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7926 b45a01b8-16f6-495d-af2f-9b41ad6348cc
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
#ifndef RSGXSSERVICE_H
|
|
#define RSGXSSERVICE_H
|
|
|
|
|
|
#include "retroshare/rsgxsifacetypes.h"
|
|
#include "retroshare/rstokenservice.h"
|
|
|
|
class RsMsgMetaData ;
|
|
|
|
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, TYPE_PUBLISHKEY };
|
|
|
|
virtual ~RsGxsNotify() {return; }
|
|
virtual NotifyType getType() = 0;
|
|
|
|
};
|
|
|
|
/*!
|
|
* Relevant to group changes
|
|
*/
|
|
class RsGxsGroupChange : public RsGxsNotify
|
|
{
|
|
public:
|
|
RsGxsGroupChange(NotifyType type, bool metaChange) : NOTIFY_TYPE(type), mMetaChange(metaChange) {}
|
|
std::list<RsGxsGroupId> mGrpIdList;
|
|
NotifyType getType(){ return NOTIFY_TYPE;}
|
|
bool metaChange() { return mMetaChange; }
|
|
private:
|
|
const NotifyType NOTIFY_TYPE;
|
|
bool mMetaChange;
|
|
};
|
|
|
|
/*!
|
|
* Relevant to message changes
|
|
*/
|
|
class RsGxsMsgChange : public RsGxsNotify
|
|
{
|
|
public:
|
|
RsGxsMsgChange(NotifyType type, bool metaChange) : NOTIFY_TYPE(type), mMetaChange(metaChange) {}
|
|
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > msgChangeMap;
|
|
NotifyType getType(){ return NOTIFY_TYPE;}
|
|
bool metaChange() { return mMetaChange; }
|
|
private:
|
|
const NotifyType NOTIFY_TYPE;
|
|
bool mMetaChange;
|
|
};
|
|
|
|
|
|
|
|
#endif // RSGXSSERVICE_H
|