From ed7fdbcf6beb40960cf91555ae1d506278b852d8 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 16 Dec 2014 08:25:14 +0100 Subject: move client classes into akonadi2common and add the base class for resource plugins we can divide up libakonadi2common later once we have a full collection of classes this makes writing code a bit simpler now as we don't have to figuer out which libraries to link against or how class dependencies should look. when we have more infrastructure in place this will mostly become self-evident --- client/resourceaccess.h | 68 ------------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 client/resourceaccess.h (limited to 'client/resourceaccess.h') diff --git a/client/resourceaccess.h b/client/resourceaccess.h deleted file mode 100644 index f381af1..0000000 --- a/client/resourceaccess.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2014 Aaron Seigo - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - */ - -#pragma once - -#include -#include -#include - -#include - -namespace Akonadi2 -{ - -class ResourceAccess : public QObject -{ - Q_OBJECT - -public: - ResourceAccess(const QString &resourceName, QObject *parent = 0); - ~ResourceAccess(); - - QString resourceName() const; - bool isReady() const; - -public Q_SLOTS: - void open(); - void close(); - -Q_SIGNALS: - void ready(bool isReady); - void revisionChanged(unsigned long long revision); - -private Q_SLOTS: - void connected(); - void disconnected(); - void connectionError(QLocalSocket::LocalSocketError error); - void readResourceMessage(); - bool processMessageBuffer(); - -private: - void log(const QString &message); - QString m_resourceName; - QLocalSocket *m_socket; - QTimer *m_tryOpenTimer; - bool m_startingProcess; - QByteArray m_partialMessageBuffer; - flatbuffers::FlatBufferBuilder m_fbb; -}; - -} -- cgit v1.2.3