projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ssl: Require SSL support in Qt
[quassel.git]
/
src
/
core
/
sessionthread.h
diff --git
a/src/core/sessionthread.h
b/src/core/sessionthread.h
index
fee6e64
..
830a00a
100644
(file)
--- a/
src/core/sessionthread.h
+++ b/
src/core/sessionthread.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
15
by the Quassel Project *
+ * Copyright (C) 2005-20
20
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-18,57
+18,45
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef SESSIONTHREAD_H
-#define SESSIONTHREAD_H
+#pragma once
+
+#include <memory>
-#include <QMutex>
#include <QThread>
#include "types.h"
class CoreSession;
#include <QThread>
#include "types.h"
class CoreSession;
+class Peer;
class InternalPeer;
class RemotePeer;
class InternalPeer;
class RemotePeer;
-class QIODevice;
-class SessionThread : public Q
Thread
+class SessionThread : public Q
Object
{
Q_OBJECT
public:
{
Q_OBJECT
public:
- SessionThread(UserId user, bool restoreState, QObject *parent = 0);
- ~SessionThread();
-
- void run();
-
- CoreSession *session();
- UserId user();
+ SessionThread(UserId user, bool restoreState, bool strictIdentEnabled, QObject* parent = nullptr);
+ ~SessionThread() override;
public slots:
public slots:
- void addClient(QObject *peer);
+ void addClient(Peer* peer);
+ void shutdown();
private slots:
private slots:
- void setSessionInitialized();
+ void onSessionInitialized();
+ void onSessionDestroyed();
signals:
void initialized();
signals:
void initialized();
- void shutdown();
+ void shutdownSession();
+ void shutdownComplete(SessionThread*);
- void addRemoteClient(RemotePeer *peer);
- void addInternalClient(InternalPeer *peer);
+ void addClientToWorker(Peer* peer);
private:
private:
- CoreSession *_session;
- UserId _user;
- QList<QObject *> clientQueue;
- bool _sessionInitialized;
- bool _restoreState;
+ QThread _sessionThread;
+ bool _sessionInitialized{false};
- bool isSessionInitialized();
- void addClientToSession(QObject *peer);
- void addRemoteClientToSession(RemotePeer *remotePeer);
- void addInternalClientToSession(InternalPeer *internalPeer);
+ std::vector<Peer*> _clientQueue;
};
};
-
-
-#endif