Messagelib

distributionlistexpandjob.h
1/*
2 * This file is part of KMail.
3 *
4 * SPDX-FileCopyrightText: 2010 KDAB
5 * SPDX-FileContributor: Tobias Koenig <tokoe@kde.org>
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#pragma once
11
12#include <KJob>
13#include <QStringList>
14namespace MessageComposer
15{
16/**
17 * @short A job to expand a distribution list to its member email addresses.
18 */
20{
22
23public:
24 /**
25 * Creates a new distribution list expand job.
26 *
27 * @param name The name of the distribution list to expand.
28 * @param parent The parent object.
29 */
30 explicit DistributionListExpandJob(const QString &name, QObject *parent = nullptr);
31
32 /**
33 * Destroys the distribution list expand job.
34 */
36
37 /**
38 * Starts the job.
39 */
40 void start() override;
41
42 /**
43 * Returns the email addresses of the list members.
44 */
45 [[nodiscard]] QString addresses() const;
46
47 /**
48 * Returns whether the list of email addresses is empty.
49 */
50 [[nodiscard]] bool isEmpty() const;
51
52private:
53 void slotSearchDone(KJob *);
54 void slotExpansionDone(KJob *);
55 const QString mListName;
56 QStringList mEmailAddresses;
57 bool mIsEmpty = false;
58};
59}
A job to expand a distribution list to its member email addresses.
bool isEmpty() const
Returns whether the list of email addresses is empty.
~DistributionListExpandJob() override
Destroys the distribution list expand job.
DistributionListExpandJob(const QString &name, QObject *parent=nullptr)
Creates a new distribution list expand job.
QString addresses() const
Returns the email addresses of the list members.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.