Messagelib

emailaddressresolvejob.h
1 /*
2  * This file is part of KMail.
3  *
4  * SPDX-FileCopyrightText: 2010 KDAB
5  * SPDX-FileContributor: Tobias Koenig <[email protected]>
6  * SPDX-FileContributor: Leo Franchi <[email protected]>
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #pragma once
12 
13 #include "messagecomposer_export.h"
14 
15 #include <KJob>
16 
17 #include <QStringList>
18 
19 namespace MessageComposer
20 {
21 class Composer;
22 
23 class EmailAddressResolveJobPrivate;
24 /**
25  * @short A job to resolve nicknames, distribution lists and email addresses for queued emails.
26  */
27 class MESSAGECOMPOSER_EXPORT EmailAddressResolveJob : public KJob
28 {
29  Q_OBJECT
30 
31 public:
32  /**
33  * Creates a new email address resolve job.
34  *
35  * @param parent The parent object.
36  */
37  explicit EmailAddressResolveJob(QObject *parent = nullptr);
38 
39  /**
40  * Destroys the email address resolve job.
41  */
42  ~EmailAddressResolveJob() override;
43 
44  /**
45  * Starts the job.
46  */
47  void start() override;
48 
49  /**
50  * Sets the from address to expand.
51  */
52  void setFrom(const QString &from);
53 
54  /**
55  * Sets the from address to expand.
56  */
57  void setTo(const QStringList &from);
58 
59  /**
60  * Sets the from address to expand.
61  */
62  void setCc(const QStringList &from);
63 
64  /**
65  * Sets the from address to expand.
66  */
67  void setBcc(const QStringList &from);
68  /**
69  * Sets the Reply-To address to expand.
70  */
71  void setReplyTo(const QStringList &replyTo);
72 
73  /**
74  * Returns the expanded From field
75  */
76  Q_REQUIRED_RESULT QString expandedFrom() const;
77 
78  /**
79  * Returns the expanded To field
80  */
81  Q_REQUIRED_RESULT QStringList expandedTo() const;
82 
83  /**
84  * Returns the expanded CC field
85  */
86  Q_REQUIRED_RESULT QStringList expandedCc() const;
87 
88  /**
89  * Returns the expanded Bcc field
90  */
91  Q_REQUIRED_RESULT QStringList expandedBcc() const;
92 
93  void setDefaultDomainName(const QString &domainName);
94  /**
95  * Returns the expanded Reply-To field
96  */
97  Q_REQUIRED_RESULT QStringList expandedReplyTo() const;
98 private Q_SLOTS:
99  void slotAliasExpansionDone(KJob *);
100 
101 private:
102  std::unique_ptr<EmailAddressResolveJobPrivate> const d;
103 };
104 }
Composer
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
Q_SCRIPTABLE Q_NOREPLY void start()
A job to resolve nicknames, distribution lists and email addresses for queued emails.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 19 2022 03:53:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.