14 #ifndef MAGICSMOKE_SC_SCLI_H
15 #define MAGICSMOKE_SC_SCLI_H
20 #include <QLocalSocket>
22 #ifdef MAGICSMOKE_SESSCLI_LIB_BUILD
23 # define MAGICSMOKE_SESSCLI_EXPORT Q_DECL_EXPORT
25 # define MAGICSMOKE_SESSCLI_EXPORT Q_DECL_IMPORT
43 virtual bool waitForSessionAvailable();
46 virtual bool waitForReady();
49 virtual bool sessionIsAvailable()
const;
51 virtual QString currentSessionId()
const;
53 virtual QString currentProfileId()
const;
55 virtual QString currentUsername()
const;
57 virtual bool isConnected()
const;
61 virtual QList<QPair<QString,QString>> menuEntries(
bool force=
false)
const;
65 virtual QList<QPair<QString,QString>> profiles(
bool force=
false)
const;
68 virtual QString defaultProfileId()
const;
71 void execServerCommand(QString);
72 void setProfile(QString);
73 void login(QString user,QString password,
bool attemptLogin=
true);
76 void sessionIdChanged(QString sessionId);
80 void profilesChanged();
88 QLocalSocket*msocket=
nullptr;
89 QString msid,mprofile,muser,mdefaultprofile;
90 QList<QPair<QString,QString>> mmenu,mprofiles;
#define MAGICSMOKE_SESSCLI_EXPORT
Definition: scli.h:25