2012-10-17 21:20:57 +00:00
|
|
|
#ifndef RSPOSTEDITEMS_H
|
|
|
|
#define RSPOSTEDITEMS_H
|
|
|
|
|
2017-04-18 21:11:37 +02:00
|
|
|
#include "rsitems/rsserviceids.h"
|
2017-04-26 14:28:25 +02:00
|
|
|
#include "rsitems/rsgxscommentitems.h"
|
|
|
|
#include "rsitems/rsgxsitems.h"
|
2012-10-17 21:20:57 +00:00
|
|
|
|
|
|
|
#include "retroshare/rsposted.h"
|
|
|
|
|
2017-04-27 14:41:31 +02:00
|
|
|
const uint8_t RS_PKT_SUBTYPE_POSTED_GRP_ITEM = 0x02;
|
2012-10-17 21:20:57 +00:00
|
|
|
const uint8_t RS_PKT_SUBTYPE_POSTED_POST_ITEM = 0x03;
|
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
class RsGxsPostedGroupItem : public RsGxsGrpItem
|
2012-10-17 21:20:57 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-04-27 14:41:31 +02:00
|
|
|
RsGxsPostedGroupItem() : RsGxsGrpItem(RS_SERVICE_GXS_TYPE_POSTED, RS_PKT_SUBTYPE_POSTED_GRP_ITEM) {}
|
|
|
|
virtual ~RsGxsPostedGroupItem() {}
|
2012-10-17 21:20:57 +00:00
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
void clear();
|
2017-04-27 14:41:31 +02:00
|
|
|
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
2012-10-17 21:20:57 +00:00
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
RsPostedGroup mGroup;
|
2012-10-17 21:20:57 +00:00
|
|
|
};
|
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
class RsGxsPostedPostItem : public RsGxsMsgItem
|
2012-10-17 21:20:57 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-04-27 14:41:31 +02:00
|
|
|
RsGxsPostedPostItem() : RsGxsMsgItem(RS_SERVICE_GXS_TYPE_POSTED, RS_PKT_SUBTYPE_POSTED_POST_ITEM) {}
|
|
|
|
virtual ~RsGxsPostedPostItem() {}
|
2012-10-17 21:20:57 +00:00
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
void clear();
|
2017-04-27 14:41:31 +02:00
|
|
|
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
2012-10-17 21:20:57 +00:00
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
RsPostedPost mPost;
|
2012-10-17 21:20:57 +00:00
|
|
|
};
|
|
|
|
|
2013-03-11 20:40:28 +00:00
|
|
|
class RsGxsPostedSerialiser : public RsGxsCommentSerialiser
|
2012-10-17 21:20:57 +00:00
|
|
|
{
|
2012-10-29 22:41:41 +00:00
|
|
|
public:
|
|
|
|
|
2017-04-27 14:41:31 +02:00
|
|
|
RsGxsPostedSerialiser() :RsGxsCommentSerialiser(RS_SERVICE_GXS_TYPE_POSTED) {}
|
2012-10-17 21:20:57 +00:00
|
|
|
|
2017-04-27 14:41:31 +02:00
|
|
|
virtual ~RsGxsPostedSerialiser() {}
|
2012-10-17 21:20:57 +00:00
|
|
|
|
2017-04-27 14:41:31 +02:00
|
|
|
virtual RsItem *create_item(uint16_t service_id,uint8_t item_subtype) const ;
|
2012-10-17 21:20:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // RSPOSTEDITEMS_H
|