X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fstorage.h;h=5b86f87c369a5b6ec0ed0e57b12720317cc35ef1;hb=199c1b1ed23c855e8c85809228145ca64c46b051;hp=a7aaae919a2cbb9ef25bbc15237d2e19826865ce;hpb=7897b8623a42967511e31c68d5c102033a1dcdb9;p=quassel.git diff --git a/src/core/storage.h b/src/core/storage.h index a7aaae91..5b86f87c 100644 --- a/src/core/storage.h +++ b/src/core/storage.h @@ -230,9 +230,10 @@ public slots: * \param networkId The network id * \param type The type of the buffer (StatusBuffer, Channel, etc.) * \param buffer The buffer name (if empty, the net's status buffer is returned) + * \param create Whether or not the buffer should be created if it doesnt exist * \return The BufferInfo corresponding to the given network and buffer name, or an invalid BufferInfo if not found */ - virtual BufferInfo getBufferInfo(UserId user, const NetworkId &networkId, BufferInfo::Type type, const QString &buffer = "") = 0; + virtual BufferInfo bufferInfo(UserId user, const NetworkId &networkId, BufferInfo::Type type, const QString &buffer = "", bool create = true) = 0; //! Get the unique BufferInfo for a bufferId /** \param user The core user who owns this buffername @@ -274,7 +275,16 @@ public slots: * \return true if successfull */ virtual bool renameBuffer(const UserId &user, const BufferId &bufferId, const QString &newName) = 0; - + + //! 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 successfull + */ + virtual bool mergeBuffersPermanently(const UserId &user, const BufferId &bufferId1, const BufferId &bufferId2) = 0; + //! Update the LastSeenDate for a Buffer /** This Method is used to make the LastSeenDate of a Buffer persistent * \param user The Owner of that Buffer