• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • sources
  • kde-4.12
  • kdepim
  • mailcommon
  • util
mailutil.h
Go to the documentation of this file.
1 /*******************************************************************************
2 **
3 ** Filename : util
4 ** Created on : 03 April, 2005
5 ** Copyright : (c) 2005 Till Adam
6 ** Email : <adam@kde.org>
7 **
8 *******************************************************************************/
9 
10 /*******************************************************************************
11 **
12 ** This program is free software; you can redistribute it and/or modify
13 ** it under the terms of the GNU General Public License as published by
14 ** the Free Software Foundation; either version 2 of the License, or
15 ** (at your option) any later version.
16 **
17 ** It is distributed in the hope that it will be useful, but
18 ** WITHOUT ANY WARRANTY; without even the implied warranty of
19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ** General Public License for more details.
21 **
22 ** You should have received a copy of the GNU General Public License
23 ** along with this program; if not, write to the Free Software
24 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 **
26 ** In addition, as a special exception, the copyright holders give
27 ** permission to link the code of this program with any edition of
28 ** the Qt library by Trolltech AS, Norway (or with modified versions
29 ** of Qt that use the same license as Qt), and distribute linked
30 ** combinations including the two. You must obey the GNU General
31 ** Public License in all respects for all of the code used other than
32 ** Qt. If you modify this file, you may extend this exception to
33 ** your version of the file, but you are not obligated to do so. If
34 ** you do not wish to do so, delete this exception statement from
35 ** your version.
36 **
37 *******************************************************************************/
38 #ifndef MAILCOMMON_MAILUTIL_H
39 #define MAILCOMMON_MAILUTIL_H
40 
41 #include "mailcommon_export.h"
42 
43 #include <Akonadi/AgentInstance>
44 #include <Akonadi/Collection>
45 
46 class OrgKdeAkonadiPOP3SettingsInterface;
47 
48 namespace Akonadi {
49 class Item;
50 }
51 
52 class KJob;
53 
54 class QAbstractItemModel;
55 class QModelIndex;
56 class QString;
57 
58 #define POP3_RESOURCE_IDENTIFIER QLatin1String("akonadi_pop3_resource")
59 #define MBOX_RESOURCE_IDENTIFIER QLatin1String("akonadi_mbox_resource")
60 
61 namespace MailCommon {
62 
67 namespace Util {
68 
69 MAILCOMMON_EXPORT OrgKdeAkonadiPOP3SettingsInterface *createPop3SettingsInterface(
70  const QString &ident );
71 
72 MAILCOMMON_EXPORT bool isVirtualCollection( const Akonadi::Collection &col );
73 
74 MAILCOMMON_EXPORT bool isVirtualCollection( const QString &resource );
75 
76 MAILCOMMON_EXPORT QString fullCollectionPath( const Akonadi::Collection &collection );
77 
78 MAILCOMMON_EXPORT bool showJobErrorMessage( KJob *job );
79 
80 MAILCOMMON_EXPORT Akonadi::AgentInstance::List agentInstances( bool excludeMailTransport = true );
81 
82 MAILCOMMON_EXPORT bool ensureKorganizerRunning( bool switchTo );
83 
84 MAILCOMMON_EXPORT bool createTodoFromMail( const Akonadi::Item &mailItem );
85 
86 MAILCOMMON_EXPORT bool createEventFromMail( const Akonadi::Item &mailItem );
87 
91 MAILCOMMON_EXPORT uint folderIdentity( const Akonadi::Item &item );
92 
96 enum SearchDirection {
97  ForwardSearch,
98  BackwardSearch
99 };
100 
110 MAILCOMMON_EXPORT QModelIndex nextUnreadCollection( QAbstractItemModel *model,
111  const QModelIndex &current,
112  SearchDirection direction,
113  bool (*ignoreCollectionCallback)( const Akonadi::Collection &collection ) = 0 );
114 
115 MAILCOMMON_EXPORT Akonadi::Collection parentCollectionFromItem( const Akonadi::Item &item );
116 
117 MAILCOMMON_EXPORT QString realFolderPath( const QString &path );
118 
119 MAILCOMMON_EXPORT QColor defaultQuotaColor();
120 
121 MAILCOMMON_EXPORT void expireOldMessages( const Akonadi::Collection &collection,
122  bool immediate );
123 
124 MAILCOMMON_EXPORT Akonadi::Collection updatedCollection( const Akonadi::Collection& col );
125 
126 MAILCOMMON_EXPORT Akonadi::Collection::Id convertFolderPathToCollectionId( const QString& folder);
127 MAILCOMMON_EXPORT QString convertFolderPathToCollectionStr( const QString& folder);
128 
129 MAILCOMMON_EXPORT bool foundMailer();
130 MAILCOMMON_EXPORT bool isLocalCollection( const QString &resource );
131 
132 MAILCOMMON_EXPORT bool ignoreNewMailInFolder(const Akonadi::Collection &collection);
133 }
134 
135 }
136 
137 #endif
MailCommon::Util::ignoreNewMailInFolder
MAILCOMMON_EXPORT bool ignoreNewMailInFolder(const Akonadi::Collection &collection)
Definition: mailutil.cpp:571
MailCommon::Util::defaultQuotaColor
MAILCOMMON_EXPORT QColor defaultQuotaColor()
Definition: mailutil.cpp:597
MailCommon::Util::agentInstances
MAILCOMMON_EXPORT Akonadi::AgentInstance::List agentInstances(bool excludeMailTransport=true)
Definition: mailutil.cpp:149
MailCommon::Util::createEventFromMail
MAILCOMMON_EXPORT bool createEventFromMail(const Akonadi::Item &mailItem)
Definition: mailutil.cpp:441
MailCommon::Util::isLocalCollection
MAILCOMMON_EXPORT bool isLocalCollection(const QString &resource)
Definition: mailutil.cpp:109
MailCommon::Util::isVirtualCollection
MAILCOMMON_EXPORT bool isVirtualCollection(const Akonadi::Collection &col)
Definition: mailutil.cpp:96
MailCommon::Util::SearchDirection
SearchDirection
Describes the direction for searching next unread collection.
Definition: mailutil.h:96
mailcommon_export.h
MailCommon::Util::ForwardSearch
Definition: mailutil.h:97
MailCommon::Util::updatedCollection
MAILCOMMON_EXPORT Akonadi::Collection updatedCollection(const Akonadi::Collection &col)
Definition: mailutil.cpp:609
MailCommon::Util::parentCollectionFromItem
MAILCOMMON_EXPORT Akonadi::Collection parentCollectionFromItem(const Akonadi::Item &item)
Definition: mailutil.cpp:581
MailCommon::Util::convertFolderPathToCollectionId
MAILCOMMON_EXPORT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &folder)
Definition: mailutil.cpp:616
MailCommon::Util::createTodoFromMail
MAILCOMMON_EXPORT bool createTodoFromMail(const Akonadi::Item &mailItem)
Definition: mailutil.cpp:436
QAbstractItemModel
MAILCOMMON_EXPORT
#define MAILCOMMON_EXPORT
Definition: mailcommon_export.h:35
MailCommon::Util::BackwardSearch
Definition: mailutil.h:98
MailCommon::Util::folderIdentity
MAILCOMMON_EXPORT uint folderIdentity(const Akonadi::Item &item)
Returns the identity of the folder that contains the given Akonadi::Item.
Definition: mailutil.cpp:446
MailCommon::Util::showJobErrorMessage
MAILCOMMON_EXPORT bool showJobErrorMessage(KJob *job)
Definition: mailutil.cpp:136
MailCommon::Util::fullCollectionPath
MAILCOMMON_EXPORT QString fullCollectionPath(const Akonadi::Collection &collection)
Definition: mailutil.cpp:117
MailCommon::Util::convertFolderPathToCollectionStr
MAILCOMMON_EXPORT QString convertFolderPathToCollectionStr(const QString &folder)
Definition: mailutil.cpp:633
MailCommon::Util::nextUnreadCollection
MAILCOMMON_EXPORT QModelIndex nextUnreadCollection(QAbstractItemModel *model, const QModelIndex &current, SearchDirection direction, bool(*ignoreCollectionCallback)(const Akonadi::Collection &collection)=0)
Returns the index of the next unread collection following a given index.
Definition: mailutil.cpp:533
MailCommon::Util::expireOldMessages
MAILCOMMON_EXPORT void expireOldMessages(const Akonadi::Collection &collection, bool immediate)
Definition: mailutil.cpp:603
MailCommon::Util::foundMailer
MAILCOMMON_EXPORT bool foundMailer()
Definition: mailutil.cpp:641
MailCommon::Util::realFolderPath
MAILCOMMON_EXPORT QString realFolderPath(const QString &path)
Definition: mailutil.cpp:586
MailCommon::Util::ensureKorganizerRunning
MAILCOMMON_EXPORT bool ensureKorganizerRunning(bool switchTo)
Definition: mailutil.cpp:170
MailCommon::Util::createPop3SettingsInterface
MAILCOMMON_EXPORT OrgKdeAkonadiPOP3SettingsInterface * createPop3SettingsInterface(const QString &ident)
Definition: mailutil.cpp:88
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal