mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 18:29:02 -04:00
added GUI async call to ID serialised data. Allows to copy+paste identities.
This commit is contained in:
parent
d66e653204
commit
3130ec9041
9 changed files with 168 additions and 40 deletions
|
@ -1474,6 +1474,28 @@ bool p3IdService::getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup>
|
|||
return ok;
|
||||
}
|
||||
|
||||
bool p3IdService::getGroupSerializedData(const uint32_t &token, std::map<RsGxsId,std::string>& serialized_groups)
|
||||
{
|
||||
unsigned char *mem = NULL;
|
||||
uint32_t size;
|
||||
RsGxsGroupId id ;
|
||||
|
||||
serialized_groups.clear() ;
|
||||
|
||||
if(!RsGenExchange::getSerializedGroupData(token,id, mem,size))
|
||||
{
|
||||
std::cerr << "(EE) call to RsGenExchage::getSerializedGroupData() failed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string radix ;
|
||||
|
||||
Radix64::encode(mem,size,radix) ;
|
||||
|
||||
serialized_groups[RsGxsId(id)] = radix ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************************/
|
||||
/********************************************************************************/
|
||||
|
|
|
@ -245,6 +245,8 @@ public:
|
|||
|
||||
// These are exposed via RsIdentity.
|
||||
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup> &groups);
|
||||
virtual bool getGroupSerializedData(const uint32_t &token, std::map<RsGxsId,std::string>& serialized_groups);
|
||||
|
||||
//virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsIdOpinion> &opinions);
|
||||
|
||||
// These are local - and not exposed via RsIdentity.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue