minor api cleanup for requesting messages from backlog
[quassel.git] / src / core / core.h
index 26a22db..2b63646 100644 (file)
@@ -199,11 +199,11 @@ class Core : public QObject {
     /** \note This method is threadsafe.
      *
      *  \param buffer   The buffer we request messages from
-     *  \param lastmsgs The number of messages we would like to receive, or -1 if we'd like all messages from that buffername
+     *  \param limit The number of messages we would like to receive, or -1 if we'd like all messages from that buffername
      *  \param offset   Do not return (but DO count) messages with MsgId >= offset, if offset >= 0
      *  \return The requested list of messages
      */
-    static QList<Message> requestMsgs(UserId user, BufferId buffer, int lastmsgs = -1, int offset = -1);
+    static QList<Message> requestMsgs(UserId user, BufferId buffer, int limit = -1, int offset = -1);
 
     //! Request messages stored in a given buffer since a certain point in time.
     /** \note This method is threadsafe.
@@ -294,9 +294,12 @@ class Core : public QObject {
     //! 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:
     bool startListening();
-    void stopListening();
+    void stopListening(const QString &msg = QString());
     void incomingConnection();
     void clientHasData();
     void clientDisconnected();
@@ -318,7 +321,8 @@ class Core : public QObject {
     void setupClientSession(QTcpSocket *socket, UserId uid);
     void processClientMessage(QTcpSocket *socket, const QVariantMap &msg);
     //void processCoreSetup(QTcpSocket *socket, QVariantMap &msg);
-    QString setupCore(const QVariant &setupData);
+    QString setupCoreForInternalUsage();
+    QString setupCore(QVariantMap setupData);
 
     bool registerStorageBackend(Storage *);
     void unregisterStorageBackend(Storage *);