From 8ae840ac13d9e2161b411fbceae281a725fa8b1f Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 16 Dec 2014 12:14:38 +0100 Subject: load the resource on first command .. it LIIIIVES! --- synchronizer/listener.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'synchronizer/listener.h') diff --git a/synchronizer/listener.h b/synchronizer/listener.h index b20da7f..5c725df 100644 --- a/synchronizer/listener.h +++ b/synchronizer/listener.h @@ -26,26 +26,28 @@ #include +namespace Akonadi2 +{ + class Resource; +} + class Client { public: Client() - : socket(nullptr), - hasSentCommand(false) + : socket(nullptr) { } Client(const QString &n, QLocalSocket *s) : name(n), - socket(s), - hasSentCommand(false) + socket(s) { } QString name; QLocalSocket *socket; QByteArray commandBuffer; - bool hasSentCommand; }; class Listener : public QObject @@ -75,8 +77,12 @@ private: bool processClientBuffer(Client &client); void sendCurrentRevision(Client &client); void updateClientsWithRevision(); + void loadResource(); + QLocalServer *m_server; QVector m_connections; unsigned long long m_revision; flatbuffers::FlatBufferBuilder m_fbb; + const QString m_resourceName; + Akonadi2::Resource *m_resource; }; -- cgit v1.2.3