mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-01 12:24:36 -04:00
added bullets to show subscription status of circles. Enabled message sync in circles. Changed flags in GxsCirclesDetails to include new subscription flags
This commit is contained in:
parent
70648398e2
commit
83049259f2
10 changed files with 43 additions and 48 deletions
|
@ -59,6 +59,12 @@ static const uint32_t GXS_CIRCLE_TYPE_LOCAL = 0x0004 ; // not distri
|
|||
static const uint32_t GXS_CIRCLE_TYPE_EXT_SELF = 0x0005 ; // self-restricted. Not used, except at creation time when the circle ID isn't known yet. Set to EXTERNAL afterwards.
|
||||
static const uint32_t GXS_CIRCLE_TYPE_YOUR_EYES_ONLY = 0x0006 ; // distributed to nodes signed by your own PGP key only.
|
||||
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST = 0x0001 ;// user is validated by circle admin
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_SUBSCRIBED = 0x0002 ;// user has subscribed the group
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_ALLOWED = 0x0003 ;// user is allowed. Combines both flags above.
|
||||
|
||||
static const uint32_t GXS_CIRCLE_FLAGS_IS_EXTERNAL = 0x0008 ;// user is allowed
|
||||
|
||||
/* Permissions is part of GroupMetaData */
|
||||
|
||||
class GxsPermissions
|
||||
|
@ -100,36 +106,15 @@ class RsGxsCircleMsg
|
|||
class RsGxsCircleDetails
|
||||
{
|
||||
public:
|
||||
RsGxsCircleDetails() : mCircleType(GXS_CIRCLE_TYPE_EXTERNAL), mIsExternal(true), mAmIAllowed(false) {}
|
||||
RsGxsCircleDetails() : mCircleType(GXS_CIRCLE_TYPE_EXTERNAL), mAmIAllowed(false) {}
|
||||
|
||||
RsGxsCircleId mCircleId;
|
||||
std::string mCircleName;
|
||||
|
||||
uint32_t mCircleType;
|
||||
bool mIsExternal;
|
||||
bool mAmIAllowed ;
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
bool operator ==(const RsGxsCircleDetails& rGxsDetails) {
|
||||
return ( mCircleId == rGxsDetails.mCircleId
|
||||
&& mCircleName == rGxsDetails.mCircleName
|
||||
&& mCircleType == rGxsDetails.mCircleType
|
||||
&& mIsExternal == rGxsDetails.mIsExternal
|
||||
&& mAllowedGxsIds == rGxsDetails.mAllowedGxsIds
|
||||
&& mAllowedNodes == rGxsDetails.mAllowedNodes
|
||||
);
|
||||
}
|
||||
|
||||
bool operator !=(const RsGxsCircleDetails& rGxsDetails) {
|
||||
return ( mCircleId != rGxsDetails.mCircleId
|
||||
|| mCircleName != rGxsDetails.mCircleName
|
||||
|| mCircleType != rGxsDetails.mCircleType
|
||||
|| mIsExternal != rGxsDetails.mIsExternal
|
||||
|| mAllowedGxsIds != rGxsDetails.mAllowedGxsIds
|
||||
|| mAllowedNodes != rGxsDetails.mAllowedNodes
|
||||
);
|
||||
}
|
||||
#endif
|
||||
uint32_t mSubscribeFlags ;
|
||||
|
||||
bool mAmIAllowed ;
|
||||
|
||||
std::set<RsGxsId> mAllowedGxsIds;
|
||||
std::set<RsPgpId> mAllowedNodes;
|
||||
|
|
|
@ -1345,15 +1345,13 @@ int RsServer::StartupRetroShare()
|
|||
mGxsCircles, mGxsCircles->getServiceInfo(),
|
||||
mGxsIdService, mGxsCircles,mGxsIdService,
|
||||
pgpAuxUtils,
|
||||
true,false); // synchronise group automatic
|
||||
// don't sync messages at all.
|
||||
true, // synchronise group automatic
|
||||
true); // sync messages automatic, since they contain subscription requests.
|
||||
|
||||
mGxsCircles->setNetworkExchangeService(gxscircles_ns) ;
|
||||
|
||||
/**** Posted GXS service ****/
|
||||
|
||||
|
||||
|
||||
RsGeneralDataService* posted_ds = new RsDataService(currGxsDir + "/", "posted_db",
|
||||
RS_SERVICE_GXS_TYPE_POSTED,
|
||||
NULL, rsInitConfig->gxs_passwd);
|
||||
|
|
|
@ -266,12 +266,14 @@ bool p3GxsCircles:: getCircleDetails(const RsGxsCircleId &id, RsGxsCircleDetails
|
|||
details.mCircleName = data.mCircleName;
|
||||
|
||||
details.mCircleType = data.mCircleType;
|
||||
details.mIsExternal = data.mIsExternal;
|
||||
|
||||
details.mAllowedGxsIds = data.mAllowedGxsIds;
|
||||
details.mAllowedNodes = data.mAllowedNodes;
|
||||
|
||||
details.mAmIAllowed = data.mAmIAllowed ;
|
||||
|
||||
#warning p3GxsCircles::getCircleDetails(): make this right later when the backend is there
|
||||
details.mSubscribeFlags = GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST ;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,12 +164,10 @@ class RsGxsCircleCache
|
|||
|
||||
class PgpAuxUtils;
|
||||
|
||||
class p3GxsCircles: public RsGxsCircleExchange, public RsGxsCircles,
|
||||
public GxsTokenQueue, public RsTickEvent
|
||||
class p3GxsCircles: public RsGxsCircleExchange, public RsGxsCircles, public GxsTokenQueue, public RsTickEvent
|
||||
{
|
||||
public:
|
||||
p3GxsCircles(RsGeneralDataService* gds, RsNetworkExchangeService* nes,
|
||||
p3IdService *identities, PgpAuxUtils *pgpUtils);
|
||||
p3GxsCircles(RsGeneralDataService* gds, RsNetworkExchangeService* nes, p3IdService *identities, PgpAuxUtils *pgpUtils);
|
||||
|
||||
virtual RsServiceInfo getServiceInfo();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue