kalarm
kamail.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KAMAIL_H
00022 #define KAMAIL_H
00023
00024 #include <tqstring.h>
00025 #include <tqstringlist.h>
00026 class KURL;
00027 class KAEvent;
00028 class EmailAddressList;
00029 namespace KPIM { class IdentityManager; }
00030 namespace KMime { namespace Types { struct Address; } }
00031
00032 struct KAMailData;
00033
00034
00035 class KAMail
00036 {
00037 public:
00038 static bool send(const KAEvent&, TQStringList& errmsgs, bool allowNotify = true);
00039 static int checkAddress(TQString& address);
00040 static int checkAttachment(TQString& attachment, KURL* = 0);
00041 static bool checkAttachment(const KURL&);
00042 static TQString convertAddresses(const TQString& addresses, EmailAddressList&);
00043 static TQString convertAttachments(const TQString& attachments, TQStringList& list);
00044 static KPIM::IdentityManager* identityManager();
00045 static bool identitiesExist();
00046 static uint identityUoid(const TQString& identityUoidOrName);
00047 static TQString controlCentreAddress();
00048 static TQString getMailBody(Q_UINT32 serialNumber);
00049 static TQString i18n_NeedFromEmailAddress();
00050 static TQString i18n_sent_mail();
00051
00052 private:
00053 static KPIM::IdentityManager* mIdentityManager;
00054 static TQString sendKMail(const KAMailData&);
00055 static TQString initHeaders(const KAMailData&, bool dateId);
00056 static TQString appendBodyAttachments(TQString& message, const KAEvent&);
00057 static TQString addToKMailFolder(const KAMailData&, const char* folder, bool checkKmailRunning);
00058 static bool callKMail(const TQByteArray& callData, const TQCString& iface, const TQCString& function, const TQCString& funcType);
00059 static TQString convertAddress(KMime::Types::Address, EmailAddressList&);
00060 static void notifyQueued(const KAEvent&);
00061 static char* base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::Offset& outSize);
00062 static TQStringList errors(const TQString& error = TQString::null, bool sendfail = true);
00063 };
00064
00065 #endif // KAMAIL_H
|