Mailcommon

mailutil.h
1/*
2 SPDX-FileCopyrightText: 2005 Till Adam <adam@kde.org>
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
14class OrgKdeAkonadiPOP3SettingsInterface;
15
16namespace Akonadi
17{
18class Item;
19}
20class KJob;
21
22class QString;
23
24namespace MailCommon
25{
26/**
27 * The Util namespace contains a collection of helper functions use in
28 * various places.
29 */
30namespace Util
31{
32[[nodiscard]] MAILCOMMON_EXPORT OrgKdeAkonadiPOP3SettingsInterface *createPop3SettingsInterface(const QString &ident);
33
34[[nodiscard]] MAILCOMMON_EXPORT bool isVirtualCollection(const Akonadi::Collection &col);
35
36[[nodiscard]] MAILCOMMON_EXPORT bool isVirtualCollection(const QString &resource);
37
38[[nodiscard]] MAILCOMMON_EXPORT QString fullCollectionPath(const Akonadi::Collection &collection, bool addAccountName = true);
39[[nodiscard]] MAILCOMMON_EXPORT QString fullCollectionRemoveIdPath(const Akonadi::Collection &collection, bool addAccountName = true);
40
41MAILCOMMON_EXPORT bool showJobErrorMessage(KJob *job);
42
43[[nodiscard]] MAILCOMMON_EXPORT Akonadi::AgentInstance::List agentInstances(bool excludeMailTransport = true);
44
45[[nodiscard]] MAILCOMMON_EXPORT bool isMailAgent(const Akonadi::AgentInstance &instance, bool excludeMailTransport = true);
46
47[[nodiscard]] MAILCOMMON_EXPORT bool isUnifiedMailboxesAgent(const Akonadi::Collection &col);
48
49/**
50 * Returns the identity of the folder that contains the given Akonadi::Item.
51 */
52[[nodiscard]] MAILCOMMON_EXPORT uint folderIdentity(const Akonadi::Item &item);
53
54[[nodiscard]] MAILCOMMON_EXPORT QString realFolderPath(const QString &path);
55
56MAILCOMMON_EXPORT void expireOldMessages(const Akonadi::Collection &collection, bool immediate);
57
58[[nodiscard]] MAILCOMMON_EXPORT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &folder);
59[[nodiscard]] MAILCOMMON_EXPORT QString convertFolderPathToCollectionStr(const QString &folder);
60
61MAILCOMMON_EXPORT void foundMailer(QStringList &lst, const QString &name);
62[[nodiscard]] MAILCOMMON_EXPORT QStringList foundMailer();
63[[nodiscard]] MAILCOMMON_EXPORT bool isLocalCollection(const QString &resource);
64}
65}
MAILCOMMON_EXPORT uint folderIdentity(const Akonadi::Item &item)
Returns the identity of the folder that contains the given Akonadi::Item.
Definition mailutil.cpp:176
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.