login and vhost can now be fetched from the connection class
This commit is contained in:
parent
328820f898
commit
acda90655d
|
|
@ -58,6 +58,24 @@ public:
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Connection() {}
|
virtual ~Connection() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the login data
|
||||||
|
* @return Login
|
||||||
|
*/
|
||||||
|
const Login &login() const
|
||||||
|
{
|
||||||
|
return _implementation.login();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the vhost
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
const std::string &vhost() const
|
||||||
|
{
|
||||||
|
return _implemention.vhost();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse data that was recevied from RabbitMQ
|
* Parse data that was recevied from RabbitMQ
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ public:
|
||||||
* Are we fully connected?
|
* Are we fully connected?
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
bool connected()
|
bool connected() const
|
||||||
{
|
{
|
||||||
// state must be connected
|
// state must be connected
|
||||||
return _state == state_connected;
|
return _state == state_connected;
|
||||||
|
|
@ -160,7 +160,7 @@ public:
|
||||||
* Retrieve the login data
|
* Retrieve the login data
|
||||||
* @return Login
|
* @return Login
|
||||||
*/
|
*/
|
||||||
Login &login()
|
const Login &login() const
|
||||||
{
|
{
|
||||||
return _login;
|
return _login;
|
||||||
}
|
}
|
||||||
|
|
@ -169,7 +169,7 @@ public:
|
||||||
* Retrieve the vhost
|
* Retrieve the vhost
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
std::string &vhost()
|
const std::string &vhost() const
|
||||||
{
|
{
|
||||||
return _vhost;
|
return _vhost;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue