~ubuntu-branches/ubuntu/karmic/kdepim/karmic-backports

« back to all changes in this revision

Viewing changes to akonadi/resources/knut/knutresource.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi, Alessandro Ghersi, Harald Sitter
  • Date: 2009-06-27 04:40:05 UTC
  • mfrom: (1.1.39 upstream)
  • Revision ID: james.westby@ubuntu.com-20090627044005-4y2vm9xz7rvmzi4p
Tags: 4:4.2.95svn20090701-0ubuntu1
[ Alessandro Ghersi ]
* New upstream release
  - Bump build-deps
* Remove akonadi-kde and libmaildir4 packages
  - remove akonadi-kde.install and libmaildir4.install
  - remove libmaildir4 from debian/rules
  - remove akonadi-kde and libmaildir4 from depends
  - remove akonadi-kde and libmaildir4 from installgen
* Update kdepim-dev.install
* Update kpilot.install
* Add akonadi-kde and libmaildir4 transitional packages

[ Harald Sitter ]
* KAddressbook replaces Kontact << 4.2.85 (LP: #378373)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2006 Tobias Koenig <tokoe@kde.org>
 
3
    Copyright (c) 2009 Volker Krause <vkrause@kde.org>
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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
 
18
    02110-1301, USA.
 
19
*/
 
20
 
 
21
#ifndef KNUTRESOURCE_H
 
22
#define KNUTRESOURCE_H
 
23
 
 
24
#include <akonadi/resourcebase.h>
 
25
#include <akonadi/collection.h>
 
26
#include <akonadi/item.h>
 
27
 
 
28
#include <QDomDocument>
 
29
 
 
30
#include <xml/xmldocument.h>
 
31
 
 
32
class QFileSystemWatcher;
 
33
 
 
34
class KnutResource : public Akonadi::ResourceBase, public Akonadi::AgentBase::Observer
 
35
{
 
36
  Q_OBJECT
 
37
 
 
38
  public:
 
39
    KnutResource( const QString &id );
 
40
    ~KnutResource();
 
41
 
 
42
  public Q_SLOTS:
 
43
    virtual void configure( WId windowId );
 
44
 
 
45
  protected:
 
46
    void retrieveCollections();
 
47
    void retrieveItems( const Akonadi::Collection &collection );
 
48
    bool retrieveItem( const Akonadi::Item &item, const QSet<QByteArray> &parts );
 
49
 
 
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 );
 
53
 
 
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 );
 
57
 
 
58
 
 
59
  private:
 
60
    QDomElement findElementByRid( const QString &rid ) const;
 
61
 
 
62
  private slots:
 
63
    void load();
 
64
    void save();
 
65
 
 
66
  private:
 
67
    Akonadi::XmlDocument mDocument;
 
68
    QFileSystemWatcher *mWatcher;
 
69
};
 
70
 
 
71
#endif