ssl: Remove fallback code for missing SSL support
[quassel.git] / src / core / core.h
index ce8693a..4428f02 100644 (file)
 
 #include <QDateTime>
 #include <QPointer>
+#include <QSslSocket>
 #include <QString>
 #include <QTimer>
 #include <QVariant>
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-
-#    include "sslserver.h"
-#else
-#    include <QTcpServer>
-#    include <QTcpSocket>
-#endif
-
 #include "authenticator.h"
 #include "bufferinfo.h"
 #include "deferredptr.h"
@@ -49,6 +41,7 @@
 #include "oidentdconfiggenerator.h"
 #include "sessionthread.h"
 #include "singleton.h"
+#include "sslserver.h"
 #include "storage.h"
 #include "types.h"
 
@@ -536,6 +529,14 @@ public:
      */
     QString strictSysIdent(UserId user) const;
 
+    //! Get a Hash of all last message ids
+    /** This Method is called when the Quassel Core is started to restore the lastMsgIds
+     *  \note This method is threadsafe.
+     *
+     * \param user      The Owner of the buffers
+     */
+    static inline QHash<BufferId, MsgId> bufferLastMsgIds(UserId user) { return instance()->_storage->bufferLastMsgIds(user); }
+
     //! Get a Hash of all last seen message ids
     /** This Method is called when the Quassel Core is started to restore the lastSeenMsgIds
      *  \note This method is threadsafe.
@@ -773,11 +774,7 @@ private:
 
     QTimer _storageSyncTimer;
 
-#ifdef HAVE_SSL
     SslServer _server, _v6server;
-#else
-    QTcpServer _server, _v6server;
-#endif
 
     OidentdConfigGenerator* _oidentdConfigGenerator{nullptr};