Add ChiakiException

This commit is contained in:
Florian Märkl 2019-08-01 20:07:44 +02:00
commit 1a5654bd49
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
4 changed files with 40 additions and 12 deletions

View file

@ -33,6 +33,16 @@ class QAudioOutput;
class QIODevice;
class QKeyEvent;
class ChiakiException : public std::exception
{
private:
QString msg;
public:
explicit ChiakiException(const QString &msg) : msg(msg) {}
const char *what() const noexcept override { return msg.toLocal8Bit().constData(); }
};
class StreamSession : public QObject
{
friend class StreamSessionPrivate;
@ -60,6 +70,8 @@ class StreamSession : public QObject
explicit StreamSession(const QString &host, const QString &registkey, const QString &ostype, const QString &auth, const QString &morning, const QString &did, QObject *parent = nullptr);
~StreamSession();
void Stop();
#if CHIAKI_GUI_ENABLE_QT_GAMEPAD
QGamepad *GetGamepad() { return gamepad; }
#endif