X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fabstractsqlstorage.h;h=d0046a9f150eb5037ec34176fa1e2fb8b73ba0fb;hp=cc9f619ab29db20a288888c9134cf52edc67d056;hb=ecf6e74621aad76c35e67a0df3faafd994fce9dc;hpb=f6781dc095957d65e8fc1683fda1c5a5b9cbedbb diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index cc9f619a..d0046a9f 100644 --- a/src/core/abstractsqlstorage.h +++ b/src/core/abstractsqlstorage.h @@ -72,6 +72,16 @@ protected: inline virtual QString userName() { return QString(); } inline virtual QString password() { return QString(); } + + //! Initialize db specific features on connect + /** This is called every time a connection to a specific SQL backend is established + * the default implementation does nothing. + * + * When reimplementing this method, don't use logDB() inside this function as + * this would cause as we're just about to initialize that DB connection. + */ + inline virtual void initDbSession(QSqlDatabase & /* db */) {} + private slots: void connectionDestroyed(); @@ -79,6 +89,7 @@ private: void addConnectionToPool(); int _schemaVersion; + bool _debug; static int _nextConnectionId; QMutex _connectionPoolMutex; @@ -177,6 +188,9 @@ public: QString awaymessage; QString attachperform; QString detachperform; + bool usesasl; + QString saslaccount; + QString saslpassword; }; struct BufferMO { @@ -188,6 +202,7 @@ public: QString buffercname; int buffertype; int lastseenmsgid; + int markerlinemsgid; QString key; bool joined; };