3 * This file is part of KMail.
5 * Copyright (c) 2010 KDAB
7 * Authors: Tobias Koenig <tokoe@kde.org>
8 * Leo Franchi <lfranchi@kde.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #ifndef EMAILADDRESSRESOLVEJOB_H
26 #define EMAILADDRESSRESOLVEJOB_H
28 #include "messagecomposer_export.h"
32 #include <QtCore/QStringList>
33 #include <QtCore/QVariant>
39 namespace MessageComposer
{
42 * @short A job to resolve nicknames, distribution lists and email addresses for queued emails.
44 class MESSAGECOMPOSER_EXPORT EmailAddressResolveJob
: public KJob
50 * Creates a new email address resolve job.
52 * @param parent The parent object.
54 EmailAddressResolveJob( QObject
*parent
= 0 );
57 * Destroys the email address resolve job.
59 ~EmailAddressResolveJob();
67 * Sets the from address to expand.
69 virtual void setFrom( const QString
& from
);
72 * Sets the from address to expand.
74 virtual void setTo( const QStringList
& from
);
77 * Sets the from address to expand.
79 virtual void setCc( const QStringList
& from
);
82 * Sets the from address to expand.
84 virtual void setBcc( const QStringList
& from
);
87 * Returns the expanded From field
89 virtual QString
expandedFrom() const;
92 * Returns the expanded To field
94 virtual QStringList
expandedTo() const;
97 * Returns the expanded CC field
99 virtual QStringList
expandedCc() const;
102 * Returns the expanded Bcc field
104 virtual QStringList
expandedBcc() const;
107 void slotAliasExpansionDone( KJob
* );
111 QVariantMap mResultMap
;
113 QStringList mTo
, mCc
, mBcc
;