Moved local getters to base class, making them accessible from all the subclasses
This commit is contained in:
@@ -48,23 +48,6 @@ namespace matrix{
|
||||
client& operator=(const client&) = default;
|
||||
client& operator=(client&&) = default;
|
||||
|
||||
/*
|
||||
* NOT thread safe.
|
||||
* Returns: the current access token.
|
||||
*/
|
||||
const raii::rjp_string& access_token(void)const;
|
||||
/*
|
||||
* NOT thread safe
|
||||
* Returns: the logged in user's userid.
|
||||
*/
|
||||
const raii::rjp_string& userid(void)const;
|
||||
/*
|
||||
* NOT thread safe
|
||||
* Returns: the current useragent.
|
||||
*/
|
||||
const raii::string& useragent(void)const;
|
||||
|
||||
|
||||
/*
|
||||
* Sets the display name on the homeserver.
|
||||
* Note name must be safe to be placed in a json string.
|
||||
|
||||
@@ -43,6 +43,22 @@ namespace matrix{
|
||||
public:
|
||||
~connection(void) = default;
|
||||
|
||||
/*
|
||||
* NOT thread safe.
|
||||
* Returns: the current access token.
|
||||
*/
|
||||
const raii::rjp_string& access_token(void)const;
|
||||
/*
|
||||
* NOT thread safe
|
||||
* Returns: the logged in user's userid.
|
||||
*/
|
||||
const raii::rjp_string& userid(void)const;
|
||||
/*
|
||||
* NOT thread safe
|
||||
* Returns: the current useragent.
|
||||
*/
|
||||
const raii::string& useragent(void)const;
|
||||
|
||||
/*
|
||||
* Returns: the http status code of the last operation performed.
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
namespace matrix{
|
||||
//Manages connection to homeserver and user login.
|
||||
//Shares states with any spawned clients and syncers.
|
||||
class session : protected connection
|
||||
class session : public connection
|
||||
{
|
||||
private:
|
||||
bool m_valid = false;
|
||||
|
||||
Reference in New Issue
Block a user