RsAccounts::getCurrentAccountId is now static

This commit is contained in:
Gioacchino Mazzurco 2018-09-06 02:04:48 +02:00
parent aa03cc00d3
commit 2c8aa5a1fe
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051
2 changed files with 10 additions and 10 deletions

View File

@ -52,14 +52,6 @@ struct RsLoginHelper;
extern RsLoginHelper* rsLoginHelper; extern RsLoginHelper* rsLoginHelper;
class RsAccounts;
/**
* Pointer to global instance of RsAccounts needed to expose JSON API
* @jsonapi{development}
*/
extern RsAccounts* rsAccounts;
/*! /*!
* Initialisation Class (not publicly disclosed to RsIFace) * Initialisation Class (not publicly disclosed to RsIFace)
*/ */
@ -163,7 +155,7 @@ public:
* @param[out] id storage for current account id * @param[out] id storage for current account id
* @return false if account hasn't been selected yet, true otherwise * @return false if account hasn't been selected yet, true otherwise
*/ */
bool getCurrentAccountId(RsPeerId &id); static bool getCurrentAccountId(RsPeerId &id);
/** /**
* @brief DataDirectory * @brief DataDirectory
@ -224,6 +216,14 @@ private:
static RsAccountsDetail* rsAccountsDetails; static RsAccountsDetail* rsAccountsDetails;
}; };
/**
* Pointer to global instance of RsAccounts needed to expose JSON API, as all
* the members of this class are static you should call them directly without
* using this pointer in the other parts of the code
* @jsonapi{development}
*/
extern RsAccounts* rsAccounts;
/** /**
* This helper class have been implemented because there was not reasonable way * This helper class have been implemented because there was not reasonable way

View File

@ -2029,7 +2029,7 @@ void RsLoginHelper::Location::serial_process(
RS_SERIAL_PROCESS(mPpgName); RS_SERIAL_PROCESS(mPpgName);
} }
bool RsAccounts::getCurrentAccountId(RsPeerId& id) /*static*/ bool RsAccounts::getCurrentAccountId(RsPeerId& id)
{ {
return rsAccountsDetails->getCurrentAccountId(id); return rsAccountsDetails->getCurrentAccountId(id);
} }