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

« back to all changes in this revision

Viewing changes to akonadi/kresources/kabc/resourceakonadi.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2009-07-10 06:34:50 UTC
  • mfrom: (1.1.40 upstream)
  • Revision ID: james.westby@ubuntu.com-20090710063450-neojgew2fh0n3y0u
Tags: 4:4.2.96-0ubuntu1
* New upstream release
* Bump kde build-deps to 4.2.96

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    This file is part of libkabc.
3
 
    Copyright (c) 2008 Kevin Krammer <kevin.krammer@gmx.at>
4
 
 
5
 
    This library is free software; you can redistribute it and/or
6
 
    modify it under the terms of the GNU Library General Public
7
 
    License as published by the Free Software Foundation; either
8
 
    version 2 of the License, or (at your option) any later version.
9
 
 
10
 
    This library is distributed in the hope that it will be useful,
11
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
    Library General Public 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
17
 
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
    Boston, MA 02110-1301, USA.
19
 
*/
20
 
 
21
 
#ifndef KABC_RESOURCEAKONADI_H
22
 
#define KABC_RESOURCEAKONADI_H
23
 
 
24
 
#include "kabc/resourceabc.h"
25
 
 
26
 
#include "sharedresourceiface.h"
27
 
 
28
 
class KJob;
29
 
class QModelIndex;
30
 
 
31
 
namespace Akonadi {
32
 
  class Collection;
33
 
  class Item;
34
 
}
35
 
 
36
 
namespace KABC {
37
 
 
38
 
class ResourceAkonadi : public ResourceABC, public SharedResourceIface
39
 
{
40
 
  Q_OBJECT
41
 
 
42
 
  public:
43
 
 
44
 
    ResourceAkonadi();
45
 
    explicit ResourceAkonadi( const KConfigGroup &group );
46
 
    virtual ~ResourceAkonadi();
47
 
 
48
 
    virtual void clear();
49
 
 
50
 
    virtual void writeConfig( KConfigGroup &group );
51
 
 
52
 
    virtual bool doOpen();
53
 
    virtual void doClose();
54
 
 
55
 
    virtual Ticket *requestSaveTicket();
56
 
    virtual void releaseSaveTicket( Ticket *ticket );
57
 
 
58
 
    virtual bool load();
59
 
    virtual bool asyncLoad();
60
 
    virtual bool save( Ticket *ticket );
61
 
    virtual bool asyncSave( Ticket *ticket );
62
 
 
63
 
    virtual void insertAddressee( const Addressee &addr );
64
 
    virtual void removeAddressee( const Addressee &addr );
65
 
 
66
 
    virtual void insertDistributionList( DistributionList *list );
67
 
    virtual void removeDistributionList( DistributionList *list );
68
 
 
69
 
    virtual bool subresourceActive( const QString &subResource ) const;
70
 
    virtual bool subresourceWritable( const QString &subResource ) const;
71
 
    virtual QString subresourceLabel( const QString &subResource ) const;
72
 
    virtual int subresourceCompletionWeight( const QString &subResource ) const;
73
 
    virtual QStringList subresources() const;
74
 
    virtual QMap<QString, QString> uidToResourceMap() const;
75
 
 
76
 
    StoreConfigIface &storeConfig();
77
 
 
78
 
  public Q_SLOTS:
79
 
    virtual void setSubresourceActive( const QString &subResource, bool active );
80
 
    virtual void setSubresourceCompletionWeight( const QString &subResource, int weight );
81
 
 
82
 
  private:
83
 
    class Private;
84
 
    Private *const d;
85
 
};
86
 
 
87
 
}
88
 
 
89
 
#endif
90
 
// kate: space-indent on; indent-width 2; replace-tabs on;