made GxsNotify for messages with more granularity. Removed RsGxsCircleMsg class that was not used.

This commit is contained in:
csoler 2020-05-03 23:20:13 +02:00
parent efb26ce9c0
commit ce6abe5d66
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
19 changed files with 217 additions and 284 deletions

View file

@ -96,22 +96,32 @@ struct RsGxsCircleGroup : RsSerializable
~RsGxsCircleGroup() override;
};
enum class RsGxsCircleSubscriptionType:uint8_t {
UNKNOWN = 0x00,
SUBSCRIBE = 0x01,
UNSUBSCRIBE = 0x02
};
struct RsGxsCircleMsg : RsSerializable
{
RsMsgMetaData mMeta;
#ifdef TO_REMOVE
// This item is actually totally unused, so we can change it no problem
#ifndef V07_NON_BACKWARD_COMPATIBLE_CHANGE_UNNAMED
/* This is horrible and should be changed into yet to be defined something
* reasonable in next non-retrocompatible version */
std::string stuff;
#endif
#endif
RsGxsCircleSubscriptionType mSubscriptionType;
/// @see RsSerializable
void serial_process( RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx) override
{
RS_SERIAL_PROCESS(mMeta);
RS_SERIAL_PROCESS(stuff);
RS_SERIAL_PROCESS(mSubscriptionType);
}
~RsGxsCircleMsg() override;

View file

@ -34,8 +34,6 @@
#include "serialiser/rstypeserializer.h"
#include "util/rstime.h"
typedef Sha1CheckSum RsGxsMessageId;
typedef std::map<RsGxsGroupId, std::set<RsGxsMessageId> > GxsMsgIdResult;
typedef std::pair<RsGxsGroupId, RsGxsMessageId> RsGxsGrpMsgIdPair;
typedef std::map<RsGxsGrpMsgIdPair, std::set<RsGxsMessageId> > MsgRelatedIdResult;

View file

@ -328,6 +328,7 @@ using Sha256CheckSum = t_RsGenericIdType<_RsIdSize::SHA256 , false, R
using RsPgpFingerprint = t_RsGenericIdType<_RsIdSize::PGP_FINGERPRINT, true, RsGenericIdType::PGP_FINGERPRINT>;
using Bias20Bytes = t_RsGenericIdType<_RsIdSize::SHA1 , true, RsGenericIdType::BIAS_20_BYTES >;
using RsGxsGroupId = t_RsGenericIdType<_RsIdSize::CERT_SIGN , false, RsGenericIdType::GXS_GROUP >;
using RsGxsMessageId = t_RsGenericIdType<_RsIdSize::SHA1 , false, RsGenericIdType::GXS_MSG >;
using RsGxsId = t_RsGenericIdType<_RsIdSize::CERT_SIGN , false, RsGenericIdType::GXS_ID >;
using RsGxsCircleId = t_RsGenericIdType<_RsIdSize::CERT_SIGN , false, RsGenericIdType::GXS_CIRCLE >;
using RsGxsTunnelId = t_RsGenericIdType<_RsIdSize::SSL_ID , false, RsGenericIdType::GXS_TUNNEL >;

View file

@ -38,7 +38,6 @@
#define USE_NEW_CHUNK_CHECKING_CODE
typedef Sha1CheckSum RsFileHash ;
typedef Sha1CheckSum RsMessageId ;
const uint32_t FT_STATE_FAILED = 0x0000 ;
const uint32_t FT_STATE_OKAY = 0x0001 ;