mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Merge of branch v0.6-rssocialnet 7419 to 7488. Changes from electron and myself:
- added possibility to modify groups (e.g. edit circles) - fixed mismatched free/delete in fimonitor.cc, authssl.cc, pqibin.cc (saving encrypted hash cache file) - improved plugin interface class to allow plugins to access GXS objects. - added method to un-register notify clients from RsNotify - fixed pqisslproxy for windows, due to win not properly supporting sockets in non blocking mode. - removed static members form RsInitConfig and made RsAccounts object a pointer. This prevents plugin initialisation problems at symbol resolving time. - removed bool return from p3IdService::getOwnIds() git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7492 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
906efa6f6c
commit
f6db432c74
24 changed files with 525 additions and 322 deletions
|
@ -53,7 +53,7 @@
|
|||
#include <openssl/ssl.h>
|
||||
|
||||
// Global singleton declaration of data.
|
||||
RsAccountsDetail rsAccounts;
|
||||
RsAccountsDetail *rsAccounts;
|
||||
|
||||
/* Uses private class - so must be hidden */
|
||||
static bool checkAccount(std::string accountdir, AccountDetails &account,std::map<std::string,std::vector<std::string> >& unsupported_keys);
|
||||
|
@ -636,7 +636,7 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
|
|||
std::cerr << "issuerName: " << account.mPgpId << " id: " << account.mSslId << std::endl;
|
||||
#endif
|
||||
|
||||
if(! rsAccounts.GetPGPLoginDetails(account.mPgpId, account.mPgpName, account.mPgpEmail))
|
||||
if(! rsAccounts->GetPGPLoginDetails(account.mPgpId, account.mPgpName, account.mPgpEmail))
|
||||
return false ;
|
||||
|
||||
if(!AuthGPG::getAuthGPG()->haveSecretKey(account.mPgpId))
|
||||
|
@ -1242,74 +1242,74 @@ std::string RsAccountsDetail::getHomePath()
|
|||
********************************************************************************/
|
||||
|
||||
// Directories.
|
||||
std::string RsAccounts::ConfigDirectory() { return rsAccounts.PathBaseDirectory(); }
|
||||
std::string RsAccounts::DataDirectory() { return rsAccounts.PathDataDirectory(); }
|
||||
std::string RsAccounts::PGPDirectory() { return rsAccounts.PathPGPDirectory(); }
|
||||
std::string RsAccounts::AccountDirectory() { return rsAccounts.PathAccountDirectory(); }
|
||||
std::string RsAccounts::ConfigDirectory() { return rsAccounts->PathBaseDirectory(); }
|
||||
std::string RsAccounts::DataDirectory() { return rsAccounts->PathDataDirectory(); }
|
||||
std::string RsAccounts::PGPDirectory() { return rsAccounts->PathPGPDirectory(); }
|
||||
std::string RsAccounts::AccountDirectory() { return rsAccounts->PathAccountDirectory(); }
|
||||
|
||||
// PGP Accounts.
|
||||
int RsAccounts::GetPGPLogins(std::list<RsPgpId> &pgpIds)
|
||||
{
|
||||
return rsAccounts.GetPGPLogins(pgpIds);
|
||||
return rsAccounts->GetPGPLogins(pgpIds);
|
||||
}
|
||||
|
||||
int RsAccounts::GetPGPLoginDetails(const RsPgpId& id, std::string &name, std::string &email)
|
||||
{
|
||||
return rsAccounts.GetPGPLoginDetails(id, name, email);
|
||||
return rsAccounts->GetPGPLoginDetails(id, name, email);
|
||||
}
|
||||
|
||||
bool RsAccounts::GeneratePGPCertificate(const std::string &name, const std::string& email, const std::string& passwd, RsPgpId &pgpId, std::string &errString)
|
||||
{
|
||||
return rsAccounts.GeneratePGPCertificate(name, email, passwd, pgpId, errString);
|
||||
return rsAccounts->GeneratePGPCertificate(name, email, passwd, pgpId, errString);
|
||||
}
|
||||
|
||||
// PGP Support Functions.
|
||||
bool RsAccounts::ExportIdentity(const std::string& fname,const RsPgpId& pgp_id)
|
||||
{
|
||||
return rsAccounts.exportIdentity(fname,pgp_id);
|
||||
return rsAccounts->exportIdentity(fname,pgp_id);
|
||||
}
|
||||
|
||||
bool RsAccounts::ImportIdentity(const std::string& fname,RsPgpId& imported_pgp_id,std::string& import_error)
|
||||
{
|
||||
return rsAccounts.importIdentity(fname,imported_pgp_id,import_error);
|
||||
return rsAccounts->importIdentity(fname,imported_pgp_id,import_error);
|
||||
}
|
||||
|
||||
void RsAccounts::GetUnsupportedKeys(std::map<std::string,std::vector<std::string> > &unsupported_keys)
|
||||
{
|
||||
return rsAccounts.getUnsupportedKeys(unsupported_keys);
|
||||
return rsAccounts->getUnsupportedKeys(unsupported_keys);
|
||||
}
|
||||
|
||||
bool RsAccounts::CopyGnuPGKeyrings()
|
||||
{
|
||||
return rsAccounts.copyGnuPGKeyrings();
|
||||
return rsAccounts->copyGnuPGKeyrings();
|
||||
}
|
||||
|
||||
// Rs Accounts
|
||||
bool RsAccounts::SelectAccount(const RsPeerId &id)
|
||||
{
|
||||
return rsAccounts.selectId(id);
|
||||
return rsAccounts->selectId(id);
|
||||
}
|
||||
|
||||
bool RsAccounts::GetPreferredAccountId(RsPeerId &id)
|
||||
{
|
||||
return rsAccounts.getPreferredAccountId(id);
|
||||
return rsAccounts->getPreferredAccountId(id);
|
||||
}
|
||||
|
||||
bool RsAccounts::GetAccountIds(std::list<RsPeerId> &ids)
|
||||
{
|
||||
return rsAccounts.getAccountIds(ids);
|
||||
return rsAccounts->getAccountIds(ids);
|
||||
}
|
||||
|
||||
bool RsAccounts::GetAccountDetails(const RsPeerId &id,
|
||||
RsPgpId &pgpId, std::string &pgpName,
|
||||
std::string &pgpEmail, std::string &location)
|
||||
{
|
||||
return rsAccounts.getAccountDetails(id, pgpId, pgpName, pgpEmail, location);
|
||||
return rsAccounts->getAccountDetails(id, pgpId, pgpName, pgpEmail, location);
|
||||
}
|
||||
|
||||
bool RsAccounts::GenerateSSLCertificate(const RsPgpId& pgp_id, const std::string& org, const std::string& loc, const std::string& country, const bool ishiddenloc, const std::string& passwd, RsPeerId &sslId, std::string &errString)
|
||||
{
|
||||
return rsAccounts.GenerateSSLCertificate(pgp_id, org, loc, country, ishiddenloc, passwd, sslId, errString);
|
||||
return rsAccounts->GenerateSSLCertificate(pgp_id, org, loc, country, ishiddenloc, passwd, sslId, errString);
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue