added notifications for identities

This commit is contained in:
csoler 2020-01-27 23:02:04 +01:00
parent 90bb6c0011
commit 424e7be52f
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
7 changed files with 92 additions and 52 deletions

View file

@ -85,6 +85,9 @@ enum class RsEventType : uint32_t
/// @see RsGxsPostedEvent
GXS_POSTED = 11,
/// @see RsGxsPostedEvent
GXS_IDENTITY = 12,
MAX /// Used to detect invalid event type passed
};

View file

@ -304,6 +304,32 @@ private:
RsIdentityUsage();
};
enum class RsGxsIdentityEventCode: uint8_t
{
UNKNOWN = 0x00,
NEW_IDENTITY = 0x01,
DELETED_IDENTITY = 0x02,
};
struct RsGxsIdentityEvent: public RsEvent
{
RsGxsIdentityEvent()
: RsEvent(RsEventType::GXS_IDENTITY),
mIdentityEventCode(RsGxsIdentityEventCode::UNKNOWN) {}
RsGxsIdentityEventCode mIdentityEventCode;
RsGxsGroupId mIdentityId;
///* @see RsEvent @see RsSerializable
void serial_process( RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext& ctx ) override
{
RsEvent::serial_process(j, ctx);
RS_SERIAL_PROCESS(mIdentityEventCode);
RS_SERIAL_PROCESS(mIdentityId);
}
~RsGxsIdentityEvent() override = default;
};
struct RsIdentityDetails : RsSerializable
{