2
Copyright (c) 2006 Tobias Koenig <tokoe@kde.org>
3
Copyright (c) 2009 Volker Krause <vkrause@kde.org>
5
This library is free software; you can redistribute it and/or modify it
6
under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or (at your
8
option) any later version.
10
This library is distributed in the hope that it will be useful, but WITHOUT
11
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13
License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to the
17
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
#ifndef KNUTRESOURCE_H
22
#define KNUTRESOURCE_H
24
#include <akonadi/resourcebase.h>
25
#include <akonadi/collection.h>
26
#include <akonadi/item.h>
28
#include <QDomDocument>
30
#include <xml/xmldocument.h>
32
class QFileSystemWatcher;
34
class KnutResource : public Akonadi::ResourceBase, public Akonadi::AgentBase::Observer
39
KnutResource( const QString &id );
43
virtual void configure( WId windowId );
46
void retrieveCollections();
47
void retrieveItems( const Akonadi::Collection &collection );
48
bool retrieveItem( const Akonadi::Item &item, const QSet<QByteArray> &parts );
50
void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
51
void collectionChanged( const Akonadi::Collection &collection );
52
void collectionRemoved( const Akonadi::Collection &collection );
54
void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
55
void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &parts );
56
void itemRemoved( const Akonadi::Item &ref );
60
QDomElement findElementByRid( const QString &rid ) const;
67
Akonadi::XmlDocument mDocument;
68
QFileSystemWatcher *mWatcher;