MagicSmoke
$VERSION$
|
#include <scli.h>
Public Slots | |
void | execServerCommand (QString) |
void | login (QString user, QString password, bool attemptLogin=true) |
void | setProfile (QString) |
Signals | |
void | managerLost () |
void | menuChanged () |
void | profilesChanged () |
void | readyReceived () |
void | sessionIdChanged (QString sessionId) |
void | sessionLost () |
Public Member Functions | |
MSessionClient () | |
Initialize the session client, make sure it is connected to the Session Manager. More... | |
virtual | ~MSessionClient () |
Disconnect the session client. More... | |
virtual QString | currentProfileId () const |
Returns the profile id. More... | |
virtual QString | currentSessionId () const |
Returns the session id. More... | |
virtual QString | currentUsername () const |
Returns the user name. More... | |
virtual QString | defaultProfileId () const |
gets the default profile ID More... | |
virtual bool | isConnected () const |
Returns true if the client is connected to a manager. If false there is something wrong. More... | |
virtual QList< QPair< QString, QString > > | menuEntries (bool force=false) const |
retrieves and returns the menu entries of the session manager in the format command -> menu text More... | |
virtual QList< QPair< QString, QString > > | profiles (bool force=false) const |
retrieves and returns all configured profiles in the format profileId -> profile name More... | |
virtual bool | sessionIsAvailable () const |
Returns true if there currently is a session available. More... | |
virtual bool | waitForReady () |
Wait until the session manager is ready to receive commands. More... | |
virtual bool | waitForSessionAvailable () |
Wait until a session is available or the Session Manager quits. More... | |
Static Public Member Functions | |
static MSessionClient * | instance () |
returns the current instance of the Session Client class returns nullptr if there is no instance More... | |
MSessionClient::MSessionClient | ( | ) |
Initialize the session client, make sure it is connected to the Session Manager.
References MagicSmokeRandom::getRandomBytes(), and sessionclientinstance.
|
virtual |
Disconnect the session client.
|
virtual |
Returns the profile id.
Referenced by main(), and MagicSmokeMain::realmain().
|
virtual |
Returns the session id.
Referenced by main(), and MagicSmokeMain::realmain().
|
virtual |
Returns the user name.
Referenced by main(), and MagicSmokeMain::realmain().
|
virtual |
gets the default profile ID
References profiles().
|
slot |
|
static |
returns the current instance of the Session Client class returns nullptr if there is no instance
References sessionclientinstance.
Referenced by MPClientConfig::MPClientConfig(), and MSessionClient_createMenuObject().
|
virtual |
Returns true if the client is connected to a manager. If false there is something wrong.
Referenced by menuEntries(), profiles(), waitForReady(), and waitForSessionAvailable().
|
slot |
Referenced by MPClientConfig::performAutoLogin().
|
signal |
Referenced by menuEntries(), profiles(), waitForReady(), and waitForSessionAvailable().
|
signal |
Referenced by menuEntries().
|
virtual |
retrieves and returns the menu entries of the session manager in the format command -> menu text
force | if true: force fresh retrieval of the menu even if it is already known |
References isConnected(), managerLost(), and menuChanged().
|
virtual |
retrieves and returns all configured profiles in the format profileId -> profile name
force | if true: force fresh retrieval of the menu profiles if it is already known |
References isConnected(), managerLost(), and profilesChanged().
Referenced by defaultProfileId(), and MPClientConfig::MPClientConfig().
|
signal |
Referenced by profiles().
|
signal |
Referenced by waitForReady().
|
signal |
Referenced by waitForSessionAvailable().
|
virtual |
Returns true if there currently is a session available.
|
signal |
|
slot |
Referenced by MPClientConfig::performAutoLogin().
|
virtual |
Wait until the session manager is ready to receive commands.
References isConnected(), managerLost(), and readyReceived().
Referenced by MPClientConfig::performAutoLogin().
|
virtual |
Wait until a session is available or the Session Manager quits.
References isConnected(), managerLost(), and sessionIdChanged().
Referenced by main(), and MagicSmokeMain::realmain().