X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fsessionthread.h;h=c215590f5498771e4782168f6167bd1a35b672f4;hp=b6c340a3821fed8a0cfbc14381f71f702115b022;hb=5fc6f7e2d63b45770574260afd6ce535e9548d23;hpb=6f2f1723f5bb3d26908f6dd297890f6fba43793b diff --git a/src/core/sessionthread.h b/src/core/sessionthread.h index b6c340a3..c215590f 100644 --- a/src/core/sessionthread.h +++ b/src/core/sessionthread.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel IRC Team * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,11 +15,11 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _SESSIONTHREAD_H_ -#define _SESSIONTHREAD_H_ +#ifndef SESSIONTHREAD_H +#define SESSIONTHREAD_H #include #include @@ -27,13 +27,16 @@ #include "types.h" class CoreSession; +class InternalPeer; +class RemotePeer; class QIODevice; -class SessionThread : public QThread { - Q_OBJECT +class SessionThread : public QThread +{ + Q_OBJECT - public: - SessionThread(UserId user, bool restoreState, QObject *parent = 0); +public: + SessionThread(UserId user, bool restoreState, bool strictIdentEnabled, QObject *parent = 0); ~SessionThread(); void run(); @@ -41,25 +44,34 @@ class SessionThread : public QThread { CoreSession *session(); UserId user(); - public slots: - void addClient(QIODevice *socket); +public slots: + void addClient(QObject *peer); - private slots: +private slots: void setSessionInitialized(); - signals: +signals: void initialized(); void shutdown(); - private: + void addRemoteClient(RemotePeer *peer); + void addInternalClient(InternalPeer *peer); + +private: CoreSession *_session; UserId _user; - QList clientQueue; + QList clientQueue; bool _sessionInitialized; bool _restoreState; + /// Whether or not strict ident mode is enabled, locking users' idents to Quassel username + bool _strictIdentEnabled; + bool isSessionInitialized(); - void addClientToSession(QIODevice *socket); + void addClientToSession(QObject *peer); + void addRemoteClientToSession(RemotePeer *remotePeer); + void addInternalClientToSession(InternalPeer *internalPeer); }; + #endif