mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Remove overloaded GetRetroshareInvite method
now the original method has default paramether that return invite for own node, this way JSON API is more friendly
This commit is contained in:
parent
7cc15c703c
commit
7c986b926d
@ -527,13 +527,15 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Get RetroShare invite of the given peer
|
* @brief Get RetroShare invite of the given peer
|
||||||
* @jsonapi{development}
|
* @jsonapi{development}
|
||||||
* @param[in] sslId Id of the peer of which we want to generate an invite
|
* @param[in] sslId Id of the peer of which we want to generate an invite,
|
||||||
|
* a null id (all 0) is passed, an invite for own node is returned.
|
||||||
* @param[in] includeSignatures true to add key signatures to the invite
|
* @param[in] includeSignatures true to add key signatures to the invite
|
||||||
* @param[in] includeExtraLocators false to avoid to add extra locators
|
* @param[in] includeExtraLocators false to avoid to add extra locators
|
||||||
* @return invite string
|
* @return invite string
|
||||||
*/
|
*/
|
||||||
virtual std::string GetRetroshareInvite(
|
virtual std::string GetRetroshareInvite(
|
||||||
const RsPeerId& sslId, bool includeSignatures = false,
|
const RsPeerId& sslId = RsPeerId(),
|
||||||
|
bool includeSignatures = false,
|
||||||
bool includeExtraLocators = true ) = 0;
|
bool includeExtraLocators = true ) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -547,15 +549,6 @@ public:
|
|||||||
const std::string& invite,
|
const std::string& invite,
|
||||||
ServicePermissionFlags flags = RS_NODE_PERM_DEFAULT ) = 0;
|
ServicePermissionFlags flags = RS_NODE_PERM_DEFAULT ) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get RetroShare invite of our own peer
|
|
||||||
* @param[in] includeSignatures true to add key signatures to the invite
|
|
||||||
* @param[in] includeExtraLocators false to avoid to add extra locators
|
|
||||||
* @return invite string
|
|
||||||
*/
|
|
||||||
virtual std::string GetRetroshareInvite(
|
|
||||||
bool includeSignatures = false,
|
|
||||||
bool includeExtraLocators = true ) = 0;
|
|
||||||
|
|
||||||
/* Auth Stuff */
|
/* Auth Stuff */
|
||||||
virtual std::string getPGPKey(const RsPgpId& pgp_id,bool include_signatures) = 0;
|
virtual std::string getPGPKey(const RsPgpId& pgp_id,bool include_signatures) = 0;
|
||||||
|
@ -1054,12 +1054,7 @@ bool p3Peers::setProxyServer(const uint32_t type, const std::string &addr_str, c
|
|||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
/* Auth Stuff */
|
/* Auth Stuff */
|
||||||
std::string p3Peers::GetRetroshareInvite(
|
|
||||||
bool include_signatures, bool includeExtraLocators )
|
|
||||||
{
|
|
||||||
return GetRetroshareInvite(
|
|
||||||
getOwnId(), include_signatures, includeExtraLocators );
|
|
||||||
}
|
|
||||||
std::string p3Peers::getPGPKey(const RsPgpId& pgp_id,bool include_signatures)
|
std::string p3Peers::getPGPKey(const RsPgpId& pgp_id,bool include_signatures)
|
||||||
{
|
{
|
||||||
unsigned char *mem_block = NULL;
|
unsigned char *mem_block = NULL;
|
||||||
@ -1176,12 +1171,13 @@ bool p3Peers::acceptInvite( const std::string& invite,
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string p3Peers::GetRetroshareInvite(
|
std::string p3Peers::GetRetroshareInvite(
|
||||||
const RsPeerId& ssl_id, bool include_signatures,
|
const RsPeerId& sslId, bool include_signatures,
|
||||||
bool includeExtraLocators )
|
bool includeExtraLocators )
|
||||||
{
|
{
|
||||||
#ifdef P3PEERS_DEBUG
|
#ifdef P3PEERS_DEBUG
|
||||||
std::cerr << __PRETTY_FUNCTION__ << std::endl;
|
std::cerr << __PRETTY_FUNCTION__ << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
const RsPeerId& ssl_id(sslId.isNull() ? getOwnId() : sslId);
|
||||||
|
|
||||||
//add the sslid, location, ip local and external address after the signature
|
//add the sslid, location, ip local and external address after the signature
|
||||||
RsPeerDetails detail;
|
RsPeerDetails detail;
|
||||||
|
@ -117,14 +117,10 @@ public:
|
|||||||
/* Auth Stuff */
|
/* Auth Stuff */
|
||||||
// Get the invitation (GPG cert + local/ext address + SSL id for the given peer)
|
// Get the invitation (GPG cert + local/ext address + SSL id for the given peer)
|
||||||
virtual std::string GetRetroshareInvite(
|
virtual std::string GetRetroshareInvite(
|
||||||
const RsPeerId& ssl_id, bool include_signatures = false,
|
const RsPeerId& ssl_id = RsPeerId(),
|
||||||
bool includeExtraLocators = true );
|
bool include_signatures = false, bool includeExtraLocators = true );
|
||||||
virtual std::string getPGPKey(const RsPgpId& pgp_id,bool include_signatures);
|
virtual std::string getPGPKey(const RsPgpId& pgp_id,bool include_signatures);
|
||||||
|
|
||||||
// same but for own id
|
|
||||||
virtual std::string GetRetroshareInvite(
|
|
||||||
bool include_signatures = false,
|
|
||||||
bool includeExtraLocators = true );
|
|
||||||
virtual bool GetPGPBase64StringAndCheckSum(const RsPgpId& gpg_id,std::string& gpg_base64_string,std::string& gpg_base64_checksum);
|
virtual bool GetPGPBase64StringAndCheckSum(const RsPgpId& gpg_id,std::string& gpg_base64_string,std::string& gpg_base64_checksum);
|
||||||
|
|
||||||
/// @see RsPeers::acceptInvite
|
/// @see RsPeers::acceptInvite
|
||||||
|
Loading…
Reference in New Issue
Block a user