• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kalarm

kamail.h

Go to the documentation of this file.
00001 /*
00002  *  kamail.h  -  email functions
00003  *  Program:  kalarm
00004  *  Copyright © 2002-2007 by David Jarvie <software@astrojar.org.uk>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef KAMAIL_H
00022 #define KAMAIL_H
00023 
00024 #include <QObject>
00025 #include <QString>
00026 #include <QStringList>
00027 #include <QQueue>
00028 
00029 #include "alarmevent.h"
00030 
00031 class KUrl;
00032 class KJob;
00033 class DateTime;
00034 class EmailAddressList;
00035 namespace KPIMIdentities { class IdentityManager; }
00036 namespace MailTransport  { class TransportJob; }
00037 namespace KMime { namespace Types { struct Address; } }
00038 
00039 
00040 class KAMail : public QObject
00041 {
00042         Q_OBJECT
00043     public:
00044         // Data to store for each mail send job.
00045         // Some data is required by KAMail, while other data is used by the caller.
00046         struct JobData
00047         {
00048             JobData() {}
00049             JobData(KAEvent& e, const KAAlarm& a, bool resched, bool notify)
00050                   : event(e), alarm(a), reschedule(resched), allowNotify(notify), queued(false) {}
00051             KAEvent  event;
00052             KAAlarm  alarm;
00053             QString  from, bcc;
00054             bool     reschedule;
00055             bool     allowNotify;
00056             bool     queued;
00057         };
00058 
00059         static int         send(JobData&, QStringList& errmsgs);
00060         static int         checkAddress(QString& address);
00061         static int         checkAttachment(QString& attachment, KUrl* = 0);
00062         static bool        checkAttachment(const KUrl&);
00063         static QString     convertAddresses(const QString& addresses, EmailAddressList&);
00064         static QString     convertAttachments(const QString& attachments, QStringList& list);
00065         static KPIMIdentities::IdentityManager* identityManager();
00066         static bool        identitiesExist();
00067         static uint        identityUoid(const QString& identityUoidOrName);
00068         static QString     controlCentreAddress();
00069 #ifdef KMAIL_SUPPORTED
00070         static QString     getMailBody(quint32 serialNumber);
00071 #endif
00072         static QString     i18n_NeedFromEmailAddress();
00073         static QString     i18n_sent_mail();
00074 
00075     private slots:
00076         void               slotEmailSent(KJob*);
00077 
00078     private:
00079         KAMail() {}
00080         static KAMail*     instance();
00081         static QString     appendBodyAttachments(QString& message, const KAEvent&);
00082 #ifdef KMAIL_SUPPORTED
00083         static QString     addToKMailFolder(const JobData&, const char* folder, bool checkKmailRunning);
00084 #endif
00085         static QString     convertAddress(KMime::Types::Address, EmailAddressList&);
00086         static void        notifyQueued(const KAEvent&);
00087         enum ErrType { SEND_FAIL, SEND_ERROR, COPY_ERROR };
00088         static QStringList errors(const QString& error = QString(), ErrType = SEND_FAIL);
00089 
00090         static KAMail*     mInstance;
00091         static QQueue<MailTransport::TransportJob*> mJobs;
00092         static QQueue<JobData>                      mJobData;
00093         static KPIMIdentities::IdentityManager* mIdentityManager;     // KMail identity manager
00094 };
00095 
00096 #endif // KAMAIL_H

kalarm

Skip menu "kalarm"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal