mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 03:06:31 -04:00
Expose RsPeers JSON API
Added also new method for better usability via the API that allow to add friend directly for RetroShare invitation (supports also URL) without having to call to mulptiple metods to set IP etc. RsPeers::acceptInvite /rsPeers/acceptInvite
This commit is contained in:
parent
a8ddec03fc
commit
cc6f0b1f05
3 changed files with 311 additions and 55 deletions
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "util/rsurl.h"
|
||||
#include "util/rsdeprecate.h"
|
||||
|
||||
class p3LinkMgr;
|
||||
class p3PeerMgr;
|
||||
|
@ -56,6 +57,11 @@ public:
|
|||
|
||||
virtual bool getOnlineList(std::list<RsPeerId> &ids);
|
||||
virtual bool getFriendList(std::list<RsPeerId> &ids);
|
||||
virtual bool getPeersCount(
|
||||
uint32_t& peersCount, uint32_t& onlinePeersCount,
|
||||
bool countLocations );
|
||||
|
||||
RS_DEPRECATED
|
||||
virtual bool getPeerCount (unsigned int *friendCount, unsigned int *onlineCount, bool ssl);
|
||||
|
||||
virtual bool isOnline(const RsPeerId &id);
|
||||
|
@ -121,6 +127,11 @@ public:
|
|||
bool includeExtraLocators = true );
|
||||
virtual bool GetPGPBase64StringAndCheckSum(const RsPgpId& gpg_id,std::string& gpg_base64_string,std::string& gpg_base64_checksum);
|
||||
|
||||
/// @see RsPeers::acceptInvite
|
||||
virtual bool acceptInvite(
|
||||
const std::string& invite,
|
||||
ServicePermissionFlags flags = RS_NODE_PERM_DEFAULT );
|
||||
|
||||
virtual bool hasExportMinimal();
|
||||
|
||||
virtual bool loadCertificateFromString(const std::string& cert, RsPeerId& ssl_id,RsPgpId& pgp_id, std::string& error_string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue