Mailcommon

mailutil.h
1 /*
2  SPDX-FileCopyrightText: 2005 Till Adam <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "mailcommon_export.h"
10 
11 #include <Akonadi/AgentInstance>
12 #include <Akonadi/Collection>
13 
14 class OrgKdeAkonadiPOP3SettingsInterface;
15 
16 namespace Akonadi
17 {
18 class Item;
19 }
20 class KJob;
21 
22 class QString;
23 
24 namespace MailCommon
25 {
26 /**
27  * The Util namespace contains a collection of helper functions use in
28  * various places.
29  */
30 namespace Util
31 {
32 Q_REQUIRED_RESULT MAILCOMMON_EXPORT OrgKdeAkonadiPOP3SettingsInterface *createPop3SettingsInterface(const QString &ident);
33 
34 Q_REQUIRED_RESULT MAILCOMMON_EXPORT bool isVirtualCollection(const Akonadi::Collection &col);
35 
36 Q_REQUIRED_RESULT MAILCOMMON_EXPORT bool isVirtualCollection(const QString &resource);
37 
38 Q_REQUIRED_RESULT MAILCOMMON_EXPORT QString fullCollectionPath(const Akonadi::Collection &collection, bool addAccountName = true);
39 
40 MAILCOMMON_EXPORT bool showJobErrorMessage(KJob *job);
41 
42 Q_REQUIRED_RESULT MAILCOMMON_EXPORT Akonadi::AgentInstance::List agentInstances(bool excludeMailTransport = true);
43 
44 Q_REQUIRED_RESULT MAILCOMMON_EXPORT bool isMailAgent(const Akonadi::AgentInstance &instance, bool excludeMailTransport = true);
45 
46 Q_REQUIRED_RESULT MAILCOMMON_EXPORT bool isUnifiedMailboxesAgent(const Akonadi::Collection &col);
47 
48 /**
49  * Returns the identity of the folder that contains the given Akonadi::Item.
50  */
51 Q_REQUIRED_RESULT MAILCOMMON_EXPORT uint folderIdentity(const Akonadi::Item &item);
52 
53 Q_REQUIRED_RESULT MAILCOMMON_EXPORT QString realFolderPath(const QString &path);
54 
55 MAILCOMMON_EXPORT void expireOldMessages(const Akonadi::Collection &collection, bool immediate);
56 
57 Q_REQUIRED_RESULT MAILCOMMON_EXPORT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &folder);
58 Q_REQUIRED_RESULT MAILCOMMON_EXPORT QString convertFolderPathToCollectionStr(const QString &folder);
59 
60 MAILCOMMON_EXPORT void foundMailer(QStringList &lst, const QString &name);
61 Q_REQUIRED_RESULT MAILCOMMON_EXPORT QStringList foundMailer();
62 Q_REQUIRED_RESULT MAILCOMMON_EXPORT bool isLocalCollection(const QString &resource);
63 }
64 }
MAILCOMMON_EXPORT uint folderIdentity(const Akonadi::Item &item)
Returns the identity of the folder that contains the given Akonadi::Item.
Definition: mailutil.cpp:149
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Oct 1 2022 04:00:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.