Messagelib

distributionlistexpandjob.h
1 /*
2  * This file is part of KMail.
3  *
4  * SPDX-FileCopyrightText: 2010 KDAB
5  * SPDX-FileContributor: Tobias Koenig <[email protected]>
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #pragma once
11 
12 #include <KJob>
13 #include <QStringList>
14 namespace MessageComposer
15 {
16 /**
17  * @short A job to expand a distribution list to its member email addresses.
18  */
20 {
21  Q_OBJECT
22 
23 public:
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  */
35  ~DistributionListExpandJob() override;
36 
37  /**
38  * Starts the job.
39  */
40  void start() override;
41 
42  /**
43  * Returns the email addresses of the list members.
44  */
45  Q_REQUIRED_RESULT QString addresses() const;
46 
47  /**
48  * Returns whether the list of email addresses is empty.
49  */
50  Q_REQUIRED_RESULT bool isEmpty() const;
51 
52 private Q_SLOTS:
53  void slotSearchDone(KJob *);
54  void slotExpansionDone(KJob *);
55 
56 private:
57  const QString mListName;
58  QStringList mEmailAddresses;
59  bool mIsEmpty = false;
60 };
61 }
Q_OBJECTQ_OBJECT
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_SLOTSQ_SLOTS
A job to expand a distribution list to its member email addresses.
~DistributionListExpandJob() override
Destroys the distribution list expand job.
bool isEmpty() const
Returns whether the list of email addresses is empty.
QObject * parent() const const
DistributionListExpandJob(const QString &name, QObject *parent=nullptr)
Creates a new distribution list expand job.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue May 17 2022 04:00:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.