2 Copyright 2010 Tobias Koenig <tokoe@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef ADDEMAILADDRESSJOB_H
21 #define ADDEMAILADDRESSJOB_H
23 #include "kdepim_export.h"
34 * @short A job to add a new contact with a given email address to Akonadi.
36 * The job will check whether a contact with the given email address already
37 * exists in Akonadi and inform the user about it, if it does not exist yet,
38 * a new contact is added.
40 class KDEPIM_EXPORT AddEmailAddressJob
: public KJob
46 * Creates a new add email address job.
48 * @param email The email address.
49 * @param parentWidget The widget that will be used as parent for dialog.
50 * @param parent The parent object.
52 AddEmailAddressJob( const QString
&email
, QWidget
*parentWidget
, QObject
*parent
= 0 );
55 * Destroys the add email address job.
57 ~AddEmailAddressJob();
65 * Returns the item that represents the new contact.
67 Akonadi::Item
contact() const;
74 Q_PRIVATE_SLOT( d
, void slotSearchDone( KJob
* ) )
75 Q_PRIVATE_SLOT( d
, void slotAddContactDone( KJob
* ) )
76 Q_PRIVATE_SLOT( d
, void slotCollectionsFetched( KJob
* ) )