• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
  • calendar
mailclient_p.h
1 /*
2  Copyright (c) 1998 Barry D Benowitz <b.benowitz@telesciences.com>
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (c) 2009 Allen Winter <winter@kde.org>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #ifndef AKONADI_MAILCLIENT_P_H
23 #define AKONADI_MAILCLIENT_P_H
24 
25 #include "akonadi-calendar_export.h"
26 #include <kcalcore/incidencebase.h>
27 #include <kmime/kmime_message.h>
28 #include <QObject>
29 
30 struct UnitTestResult {
31  typedef QList<UnitTestResult> List;
32  QString from;
33  QStringList to;
34  QStringList cc;
35  QStringList bcc;
36  int transportId;
37  KMime::Message::Ptr message;
38  UnitTestResult() : transportId(-1) {}
39 };
40 
41 namespace KPIMIdentities {
42 class Identity;
43 }
44 
45 class KJob;
46 
47 namespace Akonadi {
48 
49 #ifdef PLEASE_TEST_INVITATIONS
50 #define EXPORT_MAILCLIENT AKONADI_CALENDAR_EXPORT
51 #else
52 #define EXPORT_MAILCLIENT
53 #endif
54 
55 class EXPORT_MAILCLIENT MailClient : public QObject
56 
57 {
58  Q_OBJECT
59 public:
60 
61  enum Result {
62  ResultSuccess,
63  ResultNoAttendees,
64  ResultReallyNoAttendees,
65  ResultErrorCreatingTransport,
66  ResultErrorFetchingTransport,
67  ResultQueueJobError
68  };
69 
70  explicit MailClient(QObject *parent = 0);
71  ~MailClient();
72 
73  void mailAttendees(const KCalCore::IncidenceBase::Ptr &,
74  const KPIMIdentities::Identity &identity,
75  bool bccMe, const QString &attachment=QString(),
76  const QString &mailTransport = QString());
77 
78  void mailOrganizer(const KCalCore::IncidenceBase::Ptr &,
79  const KPIMIdentities::Identity &identity,
80  const QString &from, bool bccMe,
81  const QString &attachment=QString(),
82  const QString &sub=QString(),
83  const QString &mailTransport = QString());
84 
85  void mailTo(const KCalCore::IncidenceBase::Ptr &, const KPIMIdentities::Identity &identity,
86  const QString &from, bool bccMe, const QString &recipients,
87  const QString &attachment=QString(), const QString &mailTransport = QString());
88 
106  void send(const KPIMIdentities::Identity &identity, const QString &from, const QString &to,
107  const QString &cc, const QString &subject, const QString &body,
108  bool hidden=false, bool bccMe=false, const QString &attachment=QString(),
109  const QString &mailTransport = QString());
110 
111 private Q_SLOTS:
112  void handleQueueJobFinished(KJob* job);
113 
114 Q_SIGNALS:
115  void finished(Akonadi::MailClient::Result result, const QString &errorString);
116 
117 public:
118  // For unit-test usage, since we can't depend on kdepim-runtime on jenkins
119  static UnitTestResult::List sUnitTestResults;
120  static bool sRunningUnitTests;
121 };
122 
123 }
124 
125 Q_DECLARE_METATYPE(Akonadi::MailClient::Result)
126 
127 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal