mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
JSON API to check if PGP id is friend
This commit is contained in:
parent
3c6dd1af1c
commit
eca4f8adf7
@ -428,7 +428,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool isFriend(const RsPeerId& sslId) = 0;
|
virtual bool isFriend(const RsPeerId& sslId) = 0;
|
||||||
|
|
||||||
virtual bool isGPGAccepted(const RsPgpId &gpg_id_is_friend) = 0;
|
/**
|
||||||
|
* @brief Check if given PGP id is trusted
|
||||||
|
* @jsonapi{development}
|
||||||
|
* @param[in] pgpId PGP id to check
|
||||||
|
* @return true if the PGP id is trusted, false otherwise
|
||||||
|
*/
|
||||||
|
virtual bool isPgpFriend(const RsPgpId& pgpId) = 0;
|
||||||
|
|
||||||
virtual std::string getPeerName(const RsPeerId &ssl_id) = 0;
|
virtual std::string getPeerName(const RsPeerId &ssl_id) = 0;
|
||||||
virtual std::string getGPGName(const RsPgpId& gpg_id) = 0;
|
virtual std::string getGPGName(const RsPgpId& gpg_id) = 0;
|
||||||
|
|
||||||
@ -731,6 +738,9 @@ public:
|
|||||||
virtual bool setPeerMaximumRates(const RsPgpId& pid,uint32_t maxUploadRate,uint32_t maxDownloadRate) =0;
|
virtual bool setPeerMaximumRates(const RsPgpId& pid,uint32_t maxUploadRate,uint32_t maxDownloadRate) =0;
|
||||||
virtual bool getPeerMaximumRates(const RsPeerId& pid,uint32_t& maxUploadRate,uint32_t& maxDownloadRate) =0;
|
virtual bool getPeerMaximumRates(const RsPeerId& pid,uint32_t& maxUploadRate,uint32_t& maxDownloadRate) =0;
|
||||||
virtual bool getPeerMaximumRates(const RsPgpId& pid,uint32_t& maxUploadRate,uint32_t& maxDownloadRate) =0;
|
virtual bool getPeerMaximumRates(const RsPgpId& pid,uint32_t& maxUploadRate,uint32_t& maxDownloadRate) =0;
|
||||||
|
|
||||||
|
RS_DEPRECATED_FOR(isPgpFriend)
|
||||||
|
virtual bool isGPGAccepted(const RsPgpId &gpg_id_is_friend) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -567,11 +567,11 @@ std::string p3Peers::getGPGName(const RsPgpId &gpg_id)
|
|||||||
return AuthGPG::getAuthGPG()->getGPGName(gpg_id);
|
return AuthGPG::getAuthGPG()->getGPGName(gpg_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3Peers::isPgpFriend(const RsPgpId& pgpId)
|
||||||
|
{ return AuthGPG::getAuthGPG()->isGPGAccepted(pgpId); }
|
||||||
|
|
||||||
bool p3Peers::isGPGAccepted(const RsPgpId &gpg_id_is_friend)
|
bool p3Peers::isGPGAccepted(const RsPgpId &gpg_id_is_friend)
|
||||||
{
|
{ return isPgpFriend(gpg_id_is_friend); }
|
||||||
/* get from mAuthMgr as it should have more peers? */
|
|
||||||
return AuthGPG::getAuthGPG()->isGPGAccepted(gpg_id_is_friend);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string p3Peers::getPeerName(const RsPeerId& ssl)
|
std::string p3Peers::getPeerName(const RsPeerId& ssl)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,11 @@ public:
|
|||||||
|
|
||||||
virtual bool isOnline(const RsPeerId &id);
|
virtual bool isOnline(const RsPeerId &id);
|
||||||
virtual bool isFriend(const RsPeerId &id);
|
virtual bool isFriend(const RsPeerId &id);
|
||||||
|
virtual bool isPgpFriend(const RsPgpId& pgpId);
|
||||||
|
|
||||||
|
RS_DEPRECATED_FOR(isPgpFriend)
|
||||||
virtual bool isGPGAccepted(const RsPgpId &gpg_id_is_friend);
|
virtual bool isGPGAccepted(const RsPgpId &gpg_id_is_friend);
|
||||||
|
|
||||||
virtual std::string getGPGName(const RsPgpId &gpg_id);
|
virtual std::string getGPGName(const RsPgpId &gpg_id);
|
||||||
virtual std::string getPeerName(const RsPeerId& ssl_or_gpg_id);
|
virtual std::string getPeerName(const RsPeerId& ssl_or_gpg_id);
|
||||||
virtual bool getPeerDetails(const RsPeerId& ssl_or_gpg_id, RsPeerDetails &d);
|
virtual bool getPeerDetails(const RsPeerId& ssl_or_gpg_id, RsPeerDetails &d);
|
||||||
|
Loading…
Reference in New Issue
Block a user