mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
commit
f30f71db8e
32 changed files with 1011 additions and 716 deletions
|
@ -177,7 +177,7 @@ bool DistributedChatService::handleRecvChatLobbyMsgItem(RsChatMsgItem *ci)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!details.mPgpLinked)
|
||||
if(!(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
|
||||
{
|
||||
std::cerr << "(WW) Received a lobby msg/item that is not PGP-authed (id=" << cli->signature.keyId << "), whereas the lobby flags require it. Rejecting!" << std::endl;
|
||||
|
||||
|
@ -688,7 +688,7 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem *
|
|||
return ;
|
||||
}
|
||||
|
||||
if(!details.mPgpLinked)
|
||||
if(!(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
|
||||
{
|
||||
std::cerr << "(WW) Received a lobby msg/item that is not PGP-authed (ID=" << item->signature.keyId << "), whereas the lobby flags require it. Rejecting!" << std::endl;
|
||||
|
||||
|
@ -1727,7 +1727,7 @@ bool DistributedChatService::setIdentityForChatLobby(const ChatLobbyId& lobby_id
|
|||
|
||||
// Only send a nickname change event if the two Identities are not anonymous
|
||||
|
||||
if(rsIdentity->getIdDetails(nick,det1) && rsIdentity->getIdDetails(it->second.gxs_id,det2) && det1.mPgpLinked && det2.mPgpLinked)
|
||||
if(rsIdentity->getIdDetails(nick,det1) && rsIdentity->getIdDetails(it->second.gxs_id,det2) && (det1.mFlags & det2.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
|
||||
sendLobbyStatusPeerChangedNickname(lobby_id, nick.toStdString()) ;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsgxscircles.h"
|
||||
#include "retroshare/rsgrouter.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "rsgixs.h"
|
||||
#include "rsgxsutil.h"
|
||||
|
@ -910,7 +911,7 @@ int RsGenExchange::validateMsg(RsNxsMsg *msg, const uint32_t& grpFlag, const uin
|
|||
{
|
||||
|
||||
// now check reputation of the message author
|
||||
float reputation_threshold = ( (signFlag & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) && !details.mPgpLinked) ? (RsReputations::REPUTATION_THRESHOLD_ANTI_SPAM): (RsReputations::REPUTATION_THRESHOLD_DEFAULT) ;
|
||||
float reputation_threshold = ( (signFlag & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) && !(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)) ? (RsReputations::REPUTATION_THRESHOLD_ANTI_SPAM): (RsReputations::REPUTATION_THRESHOLD_DEFAULT) ;
|
||||
|
||||
if(details.mReputation.mOverallReputationScore < reputation_threshold)
|
||||
{
|
||||
|
|
|
@ -65,6 +65,11 @@ extern RsIdentity *rsIdentity;
|
|||
|
||||
std::string rsIdTypeToString(uint32_t idtype);
|
||||
|
||||
static const uint32_t RS_IDENTITY_FLAGS_IS_A_CONTACT = 0x0001;
|
||||
static const uint32_t RS_IDENTITY_FLAGS_PGP_LINKED = 0x0002;
|
||||
static const uint32_t RS_IDENTITY_FLAGS_PGP_KNOWN = 0x0004;
|
||||
static const uint32_t RS_IDENTITY_FLAGS_IS_OWN_ID = 0x0008;
|
||||
|
||||
class GxsReputation
|
||||
{
|
||||
public:
|
||||
|
@ -115,8 +120,9 @@ class RsGxsIdGroup
|
|||
time_t mLastUsageTS ;
|
||||
|
||||
// Not Serialised - for GUI's benefit.
|
||||
bool mPgpKnown;
|
||||
RsPgpId mPgpId;
|
||||
bool mPgpKnown;
|
||||
bool mIsAContact; // change that into flags one day
|
||||
RsPgpId mPgpId;
|
||||
GxsReputation mReputation;
|
||||
};
|
||||
|
||||
|
@ -154,22 +160,20 @@ class RsRecognTagDetails
|
|||
bool is_pending;
|
||||
};
|
||||
|
||||
|
||||
class RsIdentityDetails
|
||||
{
|
||||
public:
|
||||
RsIdentityDetails()
|
||||
:mIsOwnId(false), mPgpLinked(false), mPgpKnown(false), mLastUsageTS(0) { return; }
|
||||
: mFlags(0), mLastUsageTS(0) { return; }
|
||||
|
||||
RsGxsId mId;
|
||||
|
||||
// identity details.
|
||||
std::string mNickname;
|
||||
bool mIsOwnId;
|
||||
|
||||
uint32_t mFlags ;
|
||||
|
||||
// PGP Stuff.
|
||||
bool mPgpLinked;
|
||||
bool mPgpKnown;
|
||||
RsPgpId mPgpId;
|
||||
|
||||
// Recogn details.
|
||||
|
@ -245,6 +249,8 @@ virtual bool parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
|||
virtual bool getRecognTagRequest(const RsGxsId &id, const std::string &comment,
|
||||
uint16_t tag_class, uint16_t tag_type, std::string &tag) = 0;
|
||||
|
||||
virtual bool setAsRegularContact(const RsGxsId& id,bool is_a_contact) = 0 ;
|
||||
|
||||
// Specific RsIdentity Functions....
|
||||
/* Specific Service Data */
|
||||
/* We expose these initially for testing / GUI purposes.
|
||||
|
|
|
@ -264,6 +264,12 @@ public:
|
|||
#define RS_DISTANT_CHAT_FLAG_SIGNED 0x0001
|
||||
#define RS_DISTANT_CHAT_FLAG_SIGNATURE_OK 0x0002
|
||||
|
||||
// flags to define who we accept to talk to
|
||||
|
||||
#define RS_DISTANT_MESSAGING_CONTACT_PERMISSION_FLAG_NONE 0x0000
|
||||
#define RS_DISTANT_MESSAGING_CONTACT_PERMISSION_FLAG_EVERYBODY 0x0001
|
||||
#define RS_DISTANT_MESSAGING_CONTACT_PERMISSION_FLAG_CONTACT_LIST 0x0002
|
||||
|
||||
struct DistantChatPeerInfo
|
||||
{
|
||||
RsGxsId to_id ;
|
||||
|
@ -425,9 +431,9 @@ virtual bool resetMessageStandardTagTypes(Rs::Msgs::MsgTagType& tags) = 0;
|
|||
/* Private distant messages */
|
||||
/****************************************/
|
||||
|
||||
virtual void enableDistantMessaging(bool b) = 0;
|
||||
virtual bool distantMessagingEnabled() = 0;
|
||||
|
||||
virtual uint32_t getDistantMessagingPermissionFlags()=0 ;
|
||||
virtual void setDistantMessagingPermissionFlags(uint32_t flags)=0 ;
|
||||
|
||||
/****************************************/
|
||||
/* Chat */
|
||||
/****************************************/
|
||||
|
|
|
@ -279,6 +279,16 @@ bool p3Msgs::getMessageSummaries(std::list<MsgInfoSummary> &msgList)
|
|||
}
|
||||
|
||||
|
||||
uint32_t p3Msgs::getDistantMessagingPermissionFlags()
|
||||
{
|
||||
return mMsgSrv->getDistantMessagingPermissionFlags();
|
||||
}
|
||||
|
||||
void p3Msgs::setDistantMessagingPermissionFlags(uint32_t flags)
|
||||
{
|
||||
return mMsgSrv->setDistantMessagingPermissionFlags(flags);
|
||||
}
|
||||
|
||||
|
||||
bool p3Msgs::getMessage(const std::string &mid, MessageInfo &msg)
|
||||
{
|
||||
|
@ -298,15 +308,6 @@ bool p3Msgs::MessageSend(MessageInfo &info)
|
|||
return mMsgSrv->MessageSend(info);
|
||||
}
|
||||
|
||||
void p3Msgs::enableDistantMessaging(bool b)
|
||||
{
|
||||
mMsgSrv->enableDistantMessaging(b);
|
||||
}
|
||||
bool p3Msgs::distantMessagingEnabled()
|
||||
{
|
||||
return mMsgSrv->distantMessagingEnabled();
|
||||
}
|
||||
|
||||
bool p3Msgs::SystemMessage(const std::string &title, const std::string &message, uint32_t systemFlag)
|
||||
{
|
||||
return mMsgSrv->SystemMessage(title, message, systemFlag);
|
||||
|
|
|
@ -80,8 +80,8 @@ class p3Msgs: public RsMsgs
|
|||
|
||||
virtual bool resetMessageStandardTagTypes(Rs::Msgs::MsgTagType& tags);
|
||||
|
||||
virtual void enableDistantMessaging(bool b) ;
|
||||
virtual bool distantMessagingEnabled() ;
|
||||
virtual uint32_t getDistantMessagingPermissionFlags() ;
|
||||
virtual void setDistantMessagingPermissionFlags(uint32_t flags) ;
|
||||
|
||||
/*!
|
||||
* gets avatar from peer, image data in jpeg format
|
||||
|
|
|
@ -101,6 +101,8 @@ uint32_t RsGxsIdLocalInfoItem::serial_size()
|
|||
uint32_t s = 8 ; // header
|
||||
s += 4 ; // number of items
|
||||
s += mTimeStamps.size() * (RsGxsId::SIZE_IN_BYTES + 8) ;
|
||||
s += 4 ; // number of contacts
|
||||
s += mContacts.size() * RsGxsId::SIZE_IN_BYTES ;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -176,6 +178,11 @@ bool RsGxsIdLocalInfoItem::serialise(void *data, uint32_t& size)
|
|||
ok &= it->first.serialise(data,tlvsize,offset) ;
|
||||
ok &= setRawTimeT(data,tlvsize,&offset,it->second) ;
|
||||
}
|
||||
ok &= setRawUInt32(data, tlvsize, &offset, mContacts.size()) ;
|
||||
|
||||
for(std::set<RsGxsId>::const_iterator it(mContacts.begin());it!=mContacts.end();++it)
|
||||
ok &= (*it).serialise(data,tlvsize,offset) ;
|
||||
|
||||
if(offset != tlvsize)
|
||||
{
|
||||
#ifdef GXSID_DEBUG
|
||||
|
@ -386,6 +393,19 @@ RsGxsIdLocalInfoItem *RsGxsIdSerialiser::deserialise_GxsIdLocalInfoItem(void *da
|
|||
item->mTimeStamps[gxsid] = TS ;
|
||||
}
|
||||
|
||||
if (offset < rssize) // backward compatibility, making that section optional.
|
||||
{
|
||||
ok &= getRawUInt32(data, rssize, &offset, &n) ;
|
||||
RsGxsId gxsid ;
|
||||
|
||||
for(int i=0;ok && i<n;++i)
|
||||
{
|
||||
ok &= gxsid.deserialise(data,rssize,offset) ;
|
||||
|
||||
item->mContacts.insert(gxsid) ;
|
||||
}
|
||||
}
|
||||
|
||||
if (offset != rssize)
|
||||
{
|
||||
#ifdef GXSID_DEBUG
|
||||
|
|
|
@ -97,6 +97,7 @@ public:
|
|||
virtual uint32_t serial_size() ;
|
||||
|
||||
std::map<RsGxsId,time_t> mTimeStamps ;
|
||||
std::set<RsGxsId> mContacts ;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -932,7 +932,7 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
|||
RsIdentityDetails details;
|
||||
if (mIdentities->getIdDetails(*pit, details))
|
||||
{
|
||||
if (details.mPgpLinked && details.mPgpKnown)
|
||||
if ((details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED) &&(details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN))
|
||||
{
|
||||
#ifdef DEBUG_CIRCLES
|
||||
std::cerr << "p3GxsCircles::cache_load_for_token() Is Known -> AllowedPeer: " << *pit;
|
||||
|
@ -1115,7 +1115,7 @@ bool p3GxsCircles::cache_reloadids(const RsGxsCircleId &circleId)
|
|||
RsIdentityDetails details;
|
||||
if (mIdentities->getIdDetails(*pit, details))
|
||||
{
|
||||
if (details.mPgpLinked && details.mPgpKnown)
|
||||
if ((details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED) &&(details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN))
|
||||
{
|
||||
cache.addAllowedPeer(details.mPgpId, *pit);
|
||||
|
||||
|
|
|
@ -248,8 +248,8 @@ void p3GxsReputation::updateIdentityFlags()
|
|||
}
|
||||
it->second.mIdentityFlags = 0 ;
|
||||
|
||||
if(details.mPgpLinked) it->second.mIdentityFlags |= REPUTATION_IDENTITY_FLAG_PGP_LINKED ;
|
||||
if(details.mPgpKnown ) it->second.mIdentityFlags |= REPUTATION_IDENTITY_FLAG_PGP_KNOWN ;
|
||||
if(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED) it->second.mIdentityFlags |= REPUTATION_IDENTITY_FLAG_PGP_LINKED ;
|
||||
if(details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN ) it->second.mIdentityFlags |= REPUTATION_IDENTITY_FLAG_PGP_KNOWN ;
|
||||
|
||||
#ifdef DEBUG_REPUTATION
|
||||
std::cerr << " updated flags for " << *rit << " to " << std::hex << it->second.mIdentityFlags << std::dec << std::endl;
|
||||
|
|
|
@ -212,6 +212,25 @@ uint32_t p3IdService::idAuthenPolicy()
|
|||
|
||||
return policy;
|
||||
}
|
||||
bool p3IdService::setAsRegularContact(const RsGxsId& id,bool b)
|
||||
{
|
||||
std::set<RsGxsId>::iterator it = mContacts.find(id) ;
|
||||
|
||||
if(b && (it == mContacts.end()))
|
||||
{
|
||||
mContacts.insert(id) ;
|
||||
slowIndicateConfigChanged() ;
|
||||
}
|
||||
|
||||
if( (!b) &&(it != mContacts.end()))
|
||||
{
|
||||
mContacts.erase(it) ;
|
||||
slowIndicateConfigChanged() ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
void p3IdService::slowIndicateConfigChanged()
|
||||
{
|
||||
time_t now = time(NULL) ;
|
||||
|
@ -250,8 +269,13 @@ bool p3IdService::loadList(std::list<RsItem*>& items)
|
|||
|
||||
for(std::list<RsItem*>::const_iterator it = items.begin();it!=items.end();++it)
|
||||
if( (lii = dynamic_cast<RsGxsIdLocalInfoItem*>(*it)) != NULL)
|
||||
{
|
||||
for(std::map<RsGxsId,time_t>::const_iterator it2 = lii->mTimeStamps.begin();it2!=lii->mTimeStamps.end();++it2)
|
||||
mKeysTS.insert(*it2) ;
|
||||
|
||||
mContacts = lii->mContacts ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
@ -265,6 +289,7 @@ bool p3IdService::saveList(bool& cleanup,std::list<RsItem*>& items)
|
|||
cleanup = true ;
|
||||
RsGxsIdLocalInfoItem *item = new RsGxsIdLocalInfoItem ;
|
||||
item->mTimeStamps = mKeysTS ;
|
||||
item->mContacts = mContacts ;
|
||||
|
||||
items.push_back(item) ;
|
||||
return true ;
|
||||
|
@ -410,6 +435,9 @@ bool p3IdService:: getIdDetails(const RsGxsId &id, RsIdentityDetails &details)
|
|||
{
|
||||
details = data.details;
|
||||
details.mLastUsageTS = locked_getLastUsageTS(id) ;
|
||||
|
||||
if(mContacts.find(id) != mContacts.end())
|
||||
details.mFlags |= RS_IDENTITY_FLAGS_IS_A_CONTACT ;
|
||||
|
||||
// one utf8 symbol can be at most 4 bytes long - would be better to measure real unicode length !!!
|
||||
if(details.mNickname.length() > RSID_MAXIMUM_NICKNAME_SIZE*4)
|
||||
|
@ -426,6 +454,9 @@ bool p3IdService:: getIdDetails(const RsGxsId &id, RsIdentityDetails &details)
|
|||
details = data.details;
|
||||
details.mLastUsageTS = locked_getLastUsageTS(id) ;
|
||||
|
||||
if(mContacts.find(id) != mContacts.end())
|
||||
details.mFlags |= RS_IDENTITY_FLAGS_IS_A_CONTACT ;
|
||||
|
||||
rsReputations->getReputationInfo(id,details.mReputation) ;
|
||||
|
||||
return true;
|
||||
|
@ -1029,33 +1060,33 @@ bool p3IdService::getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup>
|
|||
if (item)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::getGroupData() Item is:";
|
||||
std::cerr << std::endl;
|
||||
item->print(std::cerr);
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3IdService::getGroupData() Item is:";
|
||||
std::cerr << std::endl;
|
||||
item->print(std::cerr);
|
||||
std::cerr << std::endl;
|
||||
#endif // DEBUG_IDS
|
||||
RsGxsIdGroup group ;
|
||||
item->toGxsIdGroup(group,false) ;
|
||||
RsGxsIdGroup group ;
|
||||
item->toGxsIdGroup(group,false) ;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mIdMtx) ;
|
||||
group.mLastUsageTS = locked_getLastUsageTS(RsGxsId(group.mMeta.mGroupId)) ;
|
||||
}
|
||||
{
|
||||
RS_STACK_MUTEX(mIdMtx) ;
|
||||
group.mLastUsageTS = locked_getLastUsageTS(RsGxsId(group.mMeta.mGroupId)) ;
|
||||
}
|
||||
|
||||
// Decode information from serviceString.
|
||||
SSGxsIdGroup ssdata;
|
||||
if (ssdata.load(group.mMeta.mServiceString))
|
||||
{
|
||||
group.mPgpKnown = ssdata.pgp.idKnown;
|
||||
group.mPgpId = ssdata.pgp.pgpId;
|
||||
group.mReputation = ssdata.score.rep;
|
||||
// Decode information from serviceString.
|
||||
SSGxsIdGroup ssdata;
|
||||
if (ssdata.load(group.mMeta.mServiceString))
|
||||
{
|
||||
group.mPgpKnown = ssdata.pgp.idKnown;
|
||||
group.mPgpId = ssdata.pgp.pgpId;
|
||||
group.mReputation = ssdata.score.rep;
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::getGroupData() Success decoding ServiceString";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\t mGpgKnown: " << group.mPgpKnown;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\t mGpgId: " << group.mPgpId;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3IdService::getGroupData() Success decoding ServiceString";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\t mGpgKnown: " << group.mPgpKnown;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\t mGpgId: " << group.mPgpId;
|
||||
std::cerr << std::endl;
|
||||
#endif // DEBUG_IDS
|
||||
}
|
||||
else
|
||||
|
@ -1063,13 +1094,15 @@ bool p3IdService::getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup>
|
|||
group.mPgpKnown = false;
|
||||
group.mPgpId.clear();
|
||||
|
||||
std::cerr << "p3IdService::getGroupData() Failed to decode ServiceString \""
|
||||
<< group.mMeta.mServiceString << "\"" ;
|
||||
std::cerr << "p3IdService::getGroupData() Failed to decode ServiceString \""
|
||||
<< group.mMeta.mServiceString << "\"" ;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
group.mIsAContact = (mContacts.find(RsGxsId(group.mMeta.mGroupId)) != mContacts.end());
|
||||
|
||||
groups.push_back(group);
|
||||
delete(item);
|
||||
delete(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1600,8 +1633,10 @@ RsGxsIdCache::RsGxsIdCache(const RsGxsIdGroupItem *item, const RsTlvSecurityKey
|
|||
std::cerr << std::endl;
|
||||
#endif // DEBUG_IDS
|
||||
|
||||
details.mIsOwnId = (item->meta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
||||
details.mPgpLinked = (item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID);
|
||||
details.mFlags = 0 ;
|
||||
|
||||
if(item->meta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) details.mFlags |= RS_IDENTITY_FLAGS_IS_OWN_ID;
|
||||
if(item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID) details.mFlags |= RS_IDENTITY_FLAGS_PGP_LINKED;
|
||||
|
||||
/* rest must be retrived from ServiceString */
|
||||
updateServiceString(item->meta.mServiceString);
|
||||
|
@ -1610,21 +1645,19 @@ RsGxsIdCache::RsGxsIdCache(const RsGxsIdGroupItem *item, const RsTlvSecurityKey
|
|||
void RsGxsIdCache::updateServiceString(std::string serviceString)
|
||||
{
|
||||
details.mRecognTags.clear();
|
||||
details.mFlags = 0 ;
|
||||
|
||||
SSGxsIdGroup ssdata;
|
||||
if (ssdata.load(serviceString))
|
||||
{
|
||||
if (details.mPgpLinked)
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)
|
||||
{
|
||||
details.mPgpKnown = ssdata.pgp.idKnown;
|
||||
if (details.mPgpKnown)
|
||||
{
|
||||
if(ssdata.pgp.idKnown) details.mFlags |= RS_IDENTITY_FLAGS_PGP_KNOWN ;
|
||||
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN)
|
||||
details.mPgpId = ssdata.pgp.pgpId;
|
||||
}
|
||||
else
|
||||
{
|
||||
details.mPgpId.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1680,7 +1713,7 @@ void RsGxsIdCache::updateServiceString(std::string serviceString)
|
|||
}
|
||||
else
|
||||
{
|
||||
details.mPgpKnown = false;
|
||||
details.mFlags &= ~RS_IDENTITY_FLAGS_PGP_KNOWN ;
|
||||
details.mPgpId.clear();
|
||||
//details.mReputation.updateIdScore(false, false);
|
||||
//details.mReputation.update();
|
||||
|
|
|
@ -265,6 +265,8 @@ virtual bool parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
|||
virtual bool getRecognTagRequest(const RsGxsId &id, const std::string &comment,
|
||||
uint16_t tag_class, uint16_t tag_type, std::string &tag);
|
||||
|
||||
virtual bool setAsRegularContact(const RsGxsId& id,bool is_a_contact) ;
|
||||
|
||||
/**************** RsGixs Implementation ***************/
|
||||
|
||||
virtual bool getOwnIds(std::list<RsGxsId> &ownIds);
|
||||
|
@ -495,8 +497,11 @@ std::string genRandomId(int len = 20);
|
|||
|
||||
std::map<uint32_t, std::set<RsGxsGroupId> > mIdsPendingCache;
|
||||
std::map<uint32_t, std::list<RsGxsGroupId> > mGroupNotPresent;
|
||||
std::map<RsGxsId, std::list<RsPeerId> > mIdsNotPresent;
|
||||
std::map<RsGxsId,time_t> mKeysTS ;
|
||||
std::map<RsGxsId, std::list<RsPeerId> > mIdsNotPresent;
|
||||
std::map<RsGxsId,time_t> mKeysTS ;
|
||||
|
||||
// keep a list of regular contacts. This is useful to sort IDs, and allow some services to priviledged ids only.
|
||||
std::set<RsGxsId> mContacts;
|
||||
RsNetworkExchangeService* mNes;
|
||||
|
||||
/**************************
|
||||
|
|
|
@ -90,6 +90,7 @@ class p3MsgService: public p3Service, public p3Config, public pqiServiceMonitor,
|
|||
|
||||
void loadWelcomeMsg(); /* startup message */
|
||||
|
||||
|
||||
//std::list<RsMsgItem *> &getMsgList();
|
||||
//std::list<RsMsgItem *> &getMsgOutList();
|
||||
|
||||
|
@ -125,6 +126,8 @@ class p3MsgService: public p3Service, public p3Config, public pqiServiceMonitor,
|
|||
};
|
||||
void enableDistantMessaging(bool b) ;
|
||||
bool distantMessagingEnabled() ;
|
||||
void setDistantMessagingPermissionFlags(uint32_t flags) {}
|
||||
uint32_t getDistantMessagingPermissionFlags() { return 0 ;}
|
||||
|
||||
private:
|
||||
void sendDistantMsgItem(RsMsgItem *msgitem) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue