mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
Add JSON API to list PGP friends
This commit is contained in:
parent
db3aefcd0b
commit
89819dd945
3 changed files with 31 additions and 4 deletions
|
@ -647,6 +647,18 @@ bool p3Peers::getGPGSignedList(std::list<RsPgpId> &ids)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool p3Peers::getPgpFriendList(std::vector<RsPgpId>& pgpIds)
|
||||
{
|
||||
std::list<RsPgpId> ids;
|
||||
if(AuthGPG::getAuthGPG()->getGPGAcceptedList(ids))
|
||||
{
|
||||
pgpIds.clear();
|
||||
std::copy(ids.begin(), ids.end(), std::back_inserter(pgpIds));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool p3Peers::getGPGAcceptedList(std::list<RsPgpId> &ids)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
|
@ -1873,3 +1885,5 @@ void p3Peers::setServicePermissionFlags(const RsPgpId& gpg_id,const ServicePermi
|
|||
|
||||
RsPeerStateChangedEvent::RsPeerStateChangedEvent(RsPeerId sslId) :
|
||||
RsEvent(RsEventType::PEER_STATE_CHANGED), mSslId(sslId) {}
|
||||
|
||||
RsPeers::~RsPeers() = default;
|
||||
|
|
|
@ -83,6 +83,11 @@ public:
|
|||
virtual const RsPgpId& getGPGOwnId();
|
||||
virtual RsPgpId getGPGId(const RsPeerId &ssl_id);
|
||||
virtual bool isKeySupported(const RsPgpId& ids);
|
||||
|
||||
/// @see RsPeers
|
||||
bool getPgpFriendList(std::vector<RsPgpId>& pgpIds) override;
|
||||
|
||||
RS_DEPRECATED_FOR(getPgpFriendList)
|
||||
virtual bool getGPGAcceptedList(std::list<RsPgpId> &ids);
|
||||
virtual bool getGPGSignedList(std::list<RsPgpId> &ids);
|
||||
virtual bool getGPGValidList(std::list<RsPgpId> &ids);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue