~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to mailcommon/mailinterfaces.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
  This file is part of KMail, the KDE mail client.
3
2
  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
4
3
  Copyright (c) 2010 Andras Mantia <andras@kdab.com>
5
4
 
6
 
  KMail is free software; you can redistribute it and/or modify it
 
5
  This program is free software; you can redistribute it and/or modify it
7
6
  under the terms of the GNU General Public License, version 2, as
8
7
  published by the Free Software Foundation.
9
8
 
10
 
  KMail is distributed in the hope that it will be useful, but
 
9
  This program is distributed in the hope that it will be useful, but
11
10
  WITHOUT ANY WARRANTY; without even the implied warranty of
12
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
12
  General Public License for more details.
17
16
  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
17
*/
19
18
 
20
 
#ifndef MAILCOMMON_INTERFACES_H
21
 
#define MAILCOMMON_INTERFACES_H
 
19
#ifndef MAILCOMMON_MAILINTERFACES_H
 
20
#define MAILCOMMON_MAILINTERFACES_H
 
21
 
 
22
#include <Akonadi/Collection>
22
23
 
23
24
#include <KSharedConfig>
24
25
 
25
 
#include <akonadi/collection.h>
26
 
 
27
26
class MessageSender;
28
27
 
29
28
namespace Akonadi {
39
38
 
40
39
class FilterDialog;
41
40
class JobScheduler;
42
 
  
 
41
 
43
42
/** Generic interface for mail kernels.*/
44
 
class IKernel {
45
 
public:
46
 
  /**
47
 
   * Returns a model of all folders in KMail. This is basically the same as entityTreeModel(),
48
 
   * but with items filtered out, the model contains only collections.
49
 
   */
50
 
  virtual Akonadi::EntityMimeTypeFilterModel *collectionModel() const = 0;
51
 
 
52
 
  /** return the pointer to the identity manager */
53
 
  virtual KPIMIdentities::IdentityManager *identityManager() = 0;
54
 
 
55
 
  virtual KSharedConfig::Ptr config() = 0;
56
 
  virtual void syncConfig() = 0;
57
 
  virtual JobScheduler* jobScheduler() const = 0;
58
 
  virtual Akonadi::ChangeRecorder *folderCollectionMonitor() const = 0;
59
 
  virtual void updateSystemTray() = 0;
60
 
  virtual MessageSender *msgSender() = 0;
61
 
 
62
 
  virtual ~IKernel() {};
 
43
class IKernel
 
44
{
 
45
  public:
 
46
    /**
 
47
     * Returns a model of all folders in KMail.
 
48
     * This is basically the same as entityTreeModel(), but with items
 
49
     * filtered out, the model contains only collections.
 
50
     */
 
51
    virtual Akonadi::EntityMimeTypeFilterModel *collectionModel() const = 0;
 
52
 
 
53
    /**
 
54
     * Return the pointer to the identity manager.
 
55
     */
 
56
    virtual KPIMIdentities::IdentityManager *identityManager() = 0;
 
57
 
 
58
    virtual KSharedConfig::Ptr config() = 0;
 
59
    virtual void syncConfig() = 0;
 
60
    virtual JobScheduler *jobScheduler() const = 0;
 
61
    virtual Akonadi::ChangeRecorder *folderCollectionMonitor() const = 0;
 
62
    virtual void updateSystemTray() = 0;
 
63
    virtual MessageSender *msgSender() = 0;
 
64
 
 
65
    virtual ~IKernel()
 
66
    {
 
67
    };
63
68
};
64
69
 
65
70
/** Filter related interface */
66
 
class IFilter {
67
 
public:
68
 
  virtual void openFilterDialog( bool createDummyFilter = true ) = 0;
69
 
  virtual void createFilter(  const QByteArray & field, const QString & value ) = 0;
70
 
  virtual ~IFilter() {};
 
71
class IFilter
 
72
{
 
73
  public:
 
74
    virtual void openFilterDialog( bool createDummyFilter = true ) = 0;
 
75
    virtual void createFilter( const QByteArray & field, const QString &value ) = 0;
 
76
    virtual ~IFilter()
 
77
    {
 
78
    };
71
79
};
72
80
 
73
81
/** Interface to access some settings. */
74
 
class ISettings {
75
 
public:
76
 
  virtual bool showPopupAfterDnD() = 0;
77
 
 
78
 
  virtual bool excludeImportantMailFromExpiry()= 0;
79
 
 
80
 
  virtual qreal closeToQuotaThreshold() = 0;
81
 
 
82
 
  virtual Akonadi::Collection::Id lastSelectedFolder() = 0;
83
 
  virtual void setLastSelectedFolder( const Akonadi::Collection::Id  &col ) = 0;
84
 
 
85
 
  virtual QStringList customTemplates() = 0;
86
 
 
87
 
  virtual ~ISettings() {};
 
82
class ISettings
 
83
{
 
84
  public:
 
85
    virtual bool showPopupAfterDnD() = 0;
 
86
 
 
87
    virtual bool excludeImportantMailFromExpiry() = 0;
 
88
 
 
89
    virtual qreal closeToQuotaThreshold() = 0;
 
90
 
 
91
    virtual Akonadi::Collection::Id lastSelectedFolder() = 0;
 
92
    virtual void setLastSelectedFolder( const Akonadi::Collection::Id &col ) = 0;
 
93
 
 
94
    virtual QStringList customTemplates() = 0;
 
95
 
 
96
    virtual ~ISettings()
 
97
    {
 
98
    };
88
99
};
89
100
 
90
101
}