Continuing my personal crusade against Buffer.
[quassel.git] / src / client / buffer.cpp
index 10f395c..9108d69 100644 (file)
 
 #include "buffer.h"
 
+#include "buffersyncer.h"
 #include "client.h"
+#include "networkmodel.h"
+#include "quasselui.h"
 #include "util.h"
 
 
@@ -32,36 +35,7 @@ Buffer::Buffer(BufferInfo bufferid, QObject *parent)
 }
 
 BufferInfo Buffer::bufferInfo() const {
-  // still needed to process user input... *sigh*
-  // ... and for the gui *sigh* to request the backlogs *sigh*
+  // still needed by the gui *sigh* to request the backlogs *sigh*
   return _bufferInfo;
 }
 
-QList<AbstractUiMsg *> Buffer::contents() const {
-  return layoutedMsgs;
-}
-
-void Buffer::appendMsg(const Message &msg) {
-  AbstractUiMsg *m = Client::layoutMsg(msg);
-  layoutedMsgs.append(m);
-  emit msgAppended(m);
-}
-
-void Buffer::prependMsg(const Message &msg) {
-  layoutQueue.append(msg);
-}
-
-bool Buffer::layoutMsg() {
-  if(layoutQueue.count()) {
-    AbstractUiMsg *m = Client::layoutMsg(layoutQueue.takeFirst());
-    layoutedMsgs.prepend(m);
-    emit msgPrepended(m);
-  }
-  return layoutQueue.count();
-}
-
-void Buffer::processUserInput(QString msg) {
-  // TODO User Input processing (plugins) -> well, this goes through MainWin into Core for processing... so...
-  emit userInput(_bufferInfo, msg);
-}
-