X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fsessionthread.h;h=f9280f05c75aed13c83ce022a81ba75feeb79765;hp=ee29d2e3dadcaff7c19973b7ff8e8e8cd2309134;hb=453ccab6ade4a21c7aa3c331af893c91468250a4;hpb=d1b6499b0b848d4287efae89107576548533502c diff --git a/src/core/sessionthread.h b/src/core/sessionthread.h index ee29d2e3..f9280f05 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-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,8 +18,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _SESSIONTHREAD_H_ -#define _SESSIONTHREAD_H_ +#ifndef SESSIONTHREAD_H +#define SESSIONTHREAD_H #include #include @@ -28,36 +28,45 @@ class CoreSession; class QIODevice; +class SignalProxy; class SessionThread : public QThread { Q_OBJECT - public: - SessionThread(UserId user, QObject *parent = 0); - ~SessionThread(); +public: + SessionThread(UserId user, bool restoreState, QObject *parent = 0); + ~SessionThread(); - void run(); + void run(); - CoreSession *session(); - UserId user(); + CoreSession *session(); + UserId user(); - public slots: - void addClient(QIODevice *socket); +public slots: + void addClient(QObject *peer); + void stopSession(); - private slots: - void setSessionInitialized(); +private slots: + void setSessionInitialized(); - signals: - void initialized(); +signals: + void initialized(); + void shutdown(); - private: - CoreSession *_session; - UserId _user; - QList clientQueue; - bool _sessionInitialized; + void addRemoteClient(QIODevice *); + void addInternalClient(SignalProxy *); - bool isSessionInitialized(); - void addClientToSession(QIODevice *socket); +private: + CoreSession *_session; + UserId _user; + QList clientQueue; + bool _sessionInitialized; + bool _restoreState; + + bool isSessionInitialized(); + void addClientToSession(QObject *peer); + void addRemoteClientToSession(QIODevice *socket); + void addInternalClientToSession(SignalProxy *proxy); }; #endif