projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
properly handling disconnects - this might even fix an antique bug with duplicate...
[quassel.git]
/
src
/
core
/
core.h
diff --git
a/src/core/core.h
b/src/core/core.h
index
1191895
..
c38129a
100644
(file)
--- a/
src/core/core.h
+++ b/
src/core/core.h
@@
-27,22
+27,22
@@
#include <QVariant>
#include <QTimer>
#include <QVariant>
#include <QTimer>
-#if
ndef QT_NO_OPEN
SSL
-#include <QSslSocket>
-#include "sslserver.h"
+#if
def HAVE_
SSL
+#
include <QSslSocket>
+#
include "sslserver.h"
#else
#else
-#include <QTcpSocket>
-#include <QTcpServer>
+#
include <QTcpSocket>
+#
include <QTcpServer>
#endif
#include "bufferinfo.h"
#include "message.h"
#endif
#include "bufferinfo.h"
#include "message.h"
-#include "global.h"
#include "sessionthread.h"
#include "types.h"
class CoreSession;
class SessionThread;
#include "sessionthread.h"
#include "types.h"
class CoreSession;
class SessionThread;
+class SignalProxy;
class Storage;
struct NetworkInfo;
class Storage;
struct NetworkInfo;
@@
-66,7
+66,7
@@
class Core : public QObject {
* \param data The Value
*/
static void setUserSetting(UserId userId, const QString &settingName, const QVariant &data);
* \param data The Value
*/
static void setUserSetting(UserId userId, const QString &settingName, const QVariant &data);
-
+
//! Retrieve a persistent user setting
/**
* \param userId The users Id
//! Retrieve a persistent user setting
/**
* \param userId The users Id
@@
-76,7
+76,7
@@
class Core : public QObject {
*/
static QVariant getUserSetting(UserId userId, const QString &settingName, const QVariant &data = QVariant());
*/
static QVariant getUserSetting(UserId userId, const QString &settingName, const QVariant &data = QVariant());
-
+
//! Create a Network in the Storage and store it's Id in the given NetworkInfo
/** \note This method is thredsafe.
*
//! Create a Network in the Storage and store it's Id in the given NetworkInfo
/** \note This method is thredsafe.
*
@@
-85,7
+85,7
@@
class Core : public QObject {
* \return true if successfull.
*/
static bool createNetwork(UserId user, NetworkInfo &info);
* \return true if successfull.
*/
static bool createNetwork(UserId user, NetworkInfo &info);
-
+
//! Apply the changes to NetworkInfo info to the storage engine
/** \note This method is thredsafe.
*
//! Apply the changes to NetworkInfo info to the storage engine
/** \note This method is thredsafe.
*
@@
-103,7
+103,7
@@
class Core : public QObject {
* \return true if successfull.
*/
static bool removeNetwork(UserId user, const NetworkId &networkId);
* \return true if successfull.
*/
static bool removeNetwork(UserId user, const NetworkId &networkId);
-
+
//! Returns a list of all NetworkInfos for the given UserId user
/** \note This method is thredsafe.
*
//! Returns a list of all NetworkInfos for the given UserId user
/** \note This method is thredsafe.
*
@@
-186,7
+186,7
@@
class Core : public QObject {
*/
static BufferInfo getBufferInfo(UserId user, const BufferId &bufferId);
*/
static BufferInfo getBufferInfo(UserId user, const BufferId &bufferId);
-
+
//! Store a Message in the backlog.
/** \note This method is threadsafe.
*
//! Store a Message in the backlog.
/** \note This method is threadsafe.
*
@@
-289,13
+289,16
@@
class Core : public QObject {
/** \note This method is threadsafe.
*/
void syncStorage();
/** \note This method is threadsafe.
*/
void syncStorage();
-
+ void setupInternalClientSession(SignalProxy *proxy);
signals:
//! Sent when a BufferInfo is updated in storage.
void bufferInfoUpdated(UserId user, const BufferInfo &info);
signals:
//! Sent when a BufferInfo is updated in storage.
void bufferInfoUpdated(UserId user, const BufferInfo &info);
+ //! Relay From CoreSession::sessionState(const QVariant &). Used for internal connection only
+ void sessionState(const QVariant &);
+
private slots:
private slots:
- bool startListening(
uint port = Global::parser.value("port").toUInt()
);
+ bool startListening();
void stopListening();
void incomingConnection();
void clientHasData();
void stopListening();
void incomingConnection();
void clientHasData();
@@
-303,7
+306,7
@@
class Core : public QObject {
bool initStorage(QVariantMap dbSettings, bool setup = false);
bool initStorage(QVariantMap dbSettings, bool setup = false);
-#if
ndef QT_NO_OPEN
SSL
+#if
def HAVE_
SSL
void sslErrors(const QList<QSslError> &errors);
#endif
void socketError(QAbstractSocket::SocketError);
void sslErrors(const QList<QSslError> &errors);
#endif
void socketError(QAbstractSocket::SocketError);
@@
-327,11
+330,11
@@
class Core : public QObject {
Storage *storage;
QTimer _storageSyncTimer;
Storage *storage;
QTimer _storageSyncTimer;
-#if
ndef QT_NO_OPENSSL
-
SslServer
server;
+#if
def HAVE_SSL
+
SslServer _server, _v6
server;
#else
#else
-
QTcpServer
server;
-#endif
+
QTcpServer _server, _v6
server;
+#endif
QHash<QTcpSocket *, quint32> blocksizes;
QHash<QTcpSocket *, QVariantMap> clientInfo;
QHash<QTcpSocket *, quint32> blocksizes;
QHash<QTcpSocket *, QVariantMap> clientInfo;