Framework for looking up contacts directly in nepomuk in addition to going through...
[kdepim.git] / messagecomposer / aliasesexpandjob_p.h
blob05792ab98ff743767518d074719308497ec2071f
1 /*
2 * This file is part of KMail.
4 * Copyright (c) 2010 KDAB
6 * Author: Tobias Koenig <tokoe@kde.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef ALIASESEXPANDJOB_P_H
24 #define ALIASESEXPANDJOB_P_H
26 #include <kjob.h>
28 /**
29 * @short A job to expand a distribution list to its member email addresses.
31 class DistributionListExpandJob : public KJob
33 Q_OBJECT
35 public:
36 /**
37 * Creates a new distribution list expand job.
39 * @param name The name of the distribution list to expand.
40 * @param parent The parent object.
42 DistributionListExpandJob( const QString &name, QObject *parent = 0 );
44 /**
45 * Destroys the distribution list expand job.
47 ~DistributionListExpandJob();
49 /**
50 * Starts the job.
52 virtual void start();
54 /**
55 * Returns the email addresses of the list members.
57 QString addresses() const;
59 /**
60 * Returns whether the list of email addresses is empty.
62 bool isEmpty() const;
64 private Q_SLOTS:
65 void slotSearchDone( KJob* );
66 void slotExpansionDone( KJob* );
68 private:
69 QString mListName;
70 QStringList mEmailAddresses;
71 bool mIsEmpty;
74 #endif