mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 08:07:31 -04:00
Added Phenom's patch AddGxsIdDeleting_v0.6_7328.patch
Changed some context menu icons for GxsGroupFrameDialog git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7337 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2bd938e82
commit
a9dcd24ba7
17 changed files with 275 additions and 71 deletions
|
@ -352,8 +352,20 @@ bool p3IdService::updateIdentity(uint32_t& token, RsGxsIdGroup &group)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool p3IdService::deleteIdentity(uint32_t& token, RsGxsIdGroup &group)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteIdentity()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
bool p3IdService::parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
||||
deleteGroup(token, group);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool p3IdService::parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
||||
const std::string &tag, RsRecognTagDetails &details)
|
||||
{
|
||||
#ifdef DEBUG_RECOGN
|
||||
|
@ -823,6 +835,74 @@ bool p3IdService::updateGroup(uint32_t& token, RsGxsIdGroup &group)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool p3IdService::deleteGroup(uint32_t& token, RsGxsIdGroup &group)
|
||||
{
|
||||
RsGxsId id = RsGxsId(group.mMeta.mGroupId.toStdString());
|
||||
RsGxsIdGroupItem* item = new RsGxsIdGroupItem();
|
||||
item->group = group;
|
||||
item->meta = group.mMeta;
|
||||
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Deleting RsGxsId: " << id;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
RsGenExchange::deleteGroup(token, item);
|
||||
|
||||
// if its in the cache - clear it.
|
||||
{
|
||||
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||
if (mPublicKeyCache.erase(id))
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Removed from PublicKeyCache";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Not in PublicKeyCache";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (mPrivateKeyCache.erase(id))
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Removed from PrivateKeyCache";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Not in PrivateKeyCache";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
std::list<RsGxsId>::iterator lit = std::find( mOwnIds.begin(), mOwnIds.end(), id);
|
||||
if (lit != mOwnIds.end())
|
||||
{
|
||||
mOwnIds.remove((RsGxsId)*lit);
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Removed from OwnIds";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::deleteGroup() Not in OwnIds";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
/************************************************************************************/
|
||||
/************************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue