#include <stdlib.h>
QPointer<Client> Client::instanceptr = 0;
+Quassel::Features Client::_coreFeatures = 0;
/*** Initialization/destruction ***/
return instance()->_mainUi;
}
+void Client::setCoreFeatures(Quassel::Features features) {
+ _coreFeatures = features;
+}
+
bool Client::isConnected() {
return instance()->_connected;
}
Q_ASSERT(!_bufferSyncer);
_bufferSyncer = new BufferSyncer(this);
connect(bufferSyncer(), SIGNAL(lastSeenMsgSet(BufferId, MsgId)), _networkModel, SLOT(setLastSeenMsgId(BufferId, MsgId)));
+ connect(bufferSyncer(), SIGNAL(markerLineSet(BufferId,MsgId)), _networkModel, SLOT(setMarkerLineMsgId(BufferId,MsgId)));
connect(bufferSyncer(), SIGNAL(bufferRemoved(BufferId)), this, SLOT(bufferRemoved(BufferId)));
connect(bufferSyncer(), SIGNAL(bufferRenamed(BufferId, QString)), this, SLOT(bufferRenamed(BufferId, QString)));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), this, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), _messageModel, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
+ connect(bufferSyncer(), SIGNAL(bufferMarkedAsRead(BufferId)), SIGNAL(bufferMarkedAsRead(BufferId)));
connect(networkModel(), SIGNAL(setLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &)));
signalProxy()->synchronize(bufferSyncer());
void Client::setDisconnectedFromCore() {
_connected = false;
+ _coreFeatures = 0;
+
emit disconnected();
emit coreConnectionStateChanged(false);
}
void Client::setBufferLastSeenMsg(BufferId id, const MsgId &msgId) {
- if(!bufferSyncer())
- return;
- bufferSyncer()->requestSetLastSeenMsg(id, msgId);
+ if(bufferSyncer())
+ bufferSyncer()->requestSetLastSeenMsg(id, msgId);
+}
+
+void Client::setBufferMarkerLine(BufferId id, const MsgId &msgId) {
+ if(bufferSyncer())
+ bufferSyncer()->requestSetMarkerLine(id, msgId);
}
void Client::removeBuffer(BufferId id) {
networkModel()->removeBuffer(bufferId2);
}
+void Client::markBufferAsRead(BufferId id) {
+ if(bufferSyncer() && id.isValid())
+ bufferSyncer()->requestMarkBufferAsRead(id);
+}
+
void Client::logMessage(QtMsgType type, const char *msg) {
fprintf(stderr, "%s\n", msg);
fflush(stderr);