+ //! Merge the content of two Buffers permanently. This cannot be reversed!
+ /** \note This method is threadsafe.
+ * \param user The id of the buffer owner
+ * \param bufferId1 The bufferId of the remaining buffer
+ * \param bufferId2 The buffer that is about to be removed
+ * \return true if successfulln
+ */
+ static inline bool mergeBuffersPermanently(const UserId &user, const BufferId &bufferId1, const BufferId &bufferId2)
+ {
+ return instance()->_storage->mergeBuffersPermanently(user, bufferId1, bufferId2);
+ }
+
+
+ //! Update the LastSeenDate for a Buffer
+ /** This Method is used to make the LastSeenDate of a Buffer persistent
+ * \note This method is threadsafe.
+ *
+ * \param user The Owner of that Buffer
+ * \param bufferId The buffer id
+ * \param MsgId The Message id of the message that has been just seen
+ */
+ static inline void setBufferLastSeenMsg(UserId user, const BufferId &bufferId, const MsgId &msgId)
+ {
+ return instance()->_storage->setBufferLastSeenMsg(user, bufferId, msgId);
+ }
+
+
+ //! 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.
+ *
+ * \param user The Owner of the buffers
+ */
+ static inline QHash<BufferId, MsgId> bufferLastSeenMsgIds(UserId user)
+ {
+ return instance()->_storage->bufferLastSeenMsgIds(user);
+ }
+
+
+ //! Update the MarkerLineMsgId for a Buffer
+ /** This Method is used to make the marker line position of a Buffer persistent
+ * \note This method is threadsafe.
+ *
+ * \param user The Owner of that Buffer
+ * \param bufferId The buffer id
+ * \param MsgId The Message id where the marker line should be placed
+ */
+ static inline void setBufferMarkerLineMsg(UserId user, const BufferId &bufferId, const MsgId &msgId)
+ {
+ return instance()->_storage->setBufferMarkerLineMsg(user, bufferId, msgId);
+ }
+
+
+ //! Get a Hash of all marker line message ids
+ /** This Method is called when the Quassel Core is started to restore the MarkerLineMsgIds
+ * \note This method is threadsafe.
+ *
+ * \param user The Owner of the buffers
+ */
+ static inline QHash<BufferId, MsgId> bufferMarkerLineMsgIds(UserId user)
+ {
+ return instance()->_storage->bufferMarkerLineMsgIds(user);
+ }
+
+
+ static inline QDateTime startTime() { return instance()->_startTime; }
+ static inline bool isConfigured() { return instance()->_configured; }
+ static bool sslSupported();
+
+ /**
+ * Reloads SSL certificates used for connection with clients
+ *
+ * @return True if certificates reloaded successfully, otherwise false.
+ */
+ static bool reloadCerts();
+
+ static QVariantList backendInfo();
+ static QVariantList authenticatorInfo();
+
+ /**
+ * Checks if a storage backend is the default storage backend. This
+ * hardcodes this information into the core (not the client).
+ *
+ * \param backend The backend to check.
+ *
+ * @return True if storage backend is default, false otherwise.
+ */
+ static inline bool isStorageBackendDefault(const Storage *backend)
+ {
+ return (backend->displayName() == "SQLite") ? true : false;
+ }
+
+ static QString setup(const QString &adminUser, const QString &adminPassword, const QString &backend, const QVariantMap &setupData, const QString &authBackend, const QVariantMap &authSetupMap);
+
+ static inline QTimer &syncTimer() { return instance()->_storageSyncTimer; }
+
+ inline OidentdConfigGenerator *oidentdConfigGenerator() const { return _oidentdConfigGenerator; }
+
+ static const int AddClientEventId;
+
+public slots:
+ //! Make storage data persistent
+ /** \note This method is threadsafe.
+ */
+ void syncStorage();
+ void setupInternalClientSession(InternalPeer *clientConnection);
+ QString setupCore(const QString &adminUser, const QString &adminPassword, const QString &backend, const QVariantMap &setupData, const QString &authBackend, const QVariantMap &authSetupMap);
+
+signals: