added handling of channel, forum and posted events in GUI

This commit is contained in:
csoler 2019-12-12 21:23:42 +01:00
parent eef5a5a8ef
commit 4fe6e46410
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
6 changed files with 174 additions and 74 deletions

View file

@ -104,6 +104,33 @@ struct RsGxsForumMsg : RsSerializable
~RsGxsForumMsg() override;
};
struct RsGxsForumEvent: RsEvent
{
RsGxsForumEvent()
: RsEvent(RsEventType::GXS_FORUMS), mForumEventCode(UNKNOWN) {}
enum ForumEventCode: uint8_t {
UNKNOWN = 0x00,
NEW_FORUM = 0x01, // emitted when new forum is received
UPDATED_FORUM = 0x02, // emitted when existing forum is updated
NEW_MESSAGE = 0x03, // new message reeived in a particular forum (group and msg id)
UPDATED_MESSAGE = 0x04, // existing message has been updated in a particular forum (group and msg id)
};
ForumEventCode mForumEventCode;
RsGxsGroupId mForumGroupId;
RsGxsMessageId mForumMsgId;
///* @see RsEvent @see RsSerializable
void serial_process( RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx) override
{
RsEvent::serial_process(j, ctx);
RS_SERIAL_PROCESS(mForumEventCode);
RS_SERIAL_PROCESS(mForumGroupId);
RS_SERIAL_PROCESS(mForumMsgId);
}
};
class RsGxsForums: public RsGxsIfaceHelper
{