Warning, file /pim/kalarm/src/kamail.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  *  kamail.h  -  email functions
0003  *  Program:  kalarm
0004  *  SPDX-FileCopyrightText: 2002-2022 David Jarvie <djarvie@kde.org>
0005  *
0006  *  SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #pragma once
0010 
0011 #include "mailsend.h"
0012 
0013 #include <KCalendarCore/Person>
0014 
0015 #include <QObject>
0016 #include <QString>
0017 #include <QStringList>
0018 
0019 class QUrl;
0020 namespace KMime {
0021     namespace Types { struct Address; }
0022     class Message;
0023 }
0024 class AkonadiPlugin;
0025 
0026 using namespace KAlarmCal;
0027 
0028 class KAMail : public QObject
0029 {
0030     Q_OBJECT
0031 public:
0032     static int         send(MailSend::JobData&, QStringList& errmsgs);
0033     static int         checkAddress(QString& address);
0034     static int         checkAttachment(QString& attachment, QUrl* = nullptr);
0035     static bool        checkAttachment(const QUrl&);
0036     static QString     convertAddresses(const QString& addresses, KCalendarCore::Person::List&);
0037     static QString     convertAttachments(const QString& attachments, QStringList& list);
0038     static QString     controlCentreAddress();
0039     static QString     i18n_NeedFromEmailAddress();
0040     static QString     i18n_sent_mail();
0041 
0042 private Q_SLOTS:
0043     void akonadiEmailSent(const MailSend::JobData&, const QStringList& errmsgs, bool sendError);
0044 
0045 private:
0046     KAMail() = default;
0047     static KAMail*     instance();
0048     static QString     appendBodyAttachments(KMime::Message& message, MailSend::JobData&);
0049     static void        notifyQueued(const KAEvent&);
0050     enum ErrType { SEND_FAIL, SEND_ERROR };
0051     static QStringList errors(const QString& error = QString(), ErrType = SEND_FAIL);
0052 
0053     static KAMail*        mInstance;
0054     static AkonadiPlugin* mAkonadiPlugin;
0055 };
0056 
0057 // vim: et sw=4: