Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mailfactory.h

Go to the documentation of this file.
00001 #ifndef MAILFACTORY_H
00002 #define MAILFACTORY_H
00003 
00004 #include <qobject.h>
00005 
00006 #include <qpe/applnk.h>
00007 
00008 #include "configfile.h"
00009 
00010 class Attachment
00011 {
00012 public:
00013         void setFileName(QString fileName) { _fileName = fileName; }
00014         void setNewName(QString newName) { _newName = newName; }
00015         void setDescription(QString description) { _description = description; }
00016         void setDocLnk(DocLnk docLnk) { _docLnk = docLnk; }
00017 
00018         QString fileName() { return _fileName; }
00019         QString newName() { return _newName; }
00020         QString description() { return _description; }
00021         DocLnk docLnk() { return _docLnk; }
00022 
00023 protected:
00024         QString _fileName, _newName, _description;
00025         DocLnk _docLnk;
00026 
00027 };
00028 
00029 class SendMail
00030 {
00031 public:
00032         SendMail() { _needsMime = false; }
00033 
00034         void setAccount(Account account) { _account = account; }
00035 
00036         void setFrom(QString from) { _from = from; }
00037         void setReplyTo(QString replyTo) { _replyTo = replyTo; }
00038         void setTo(QString to) { _to = to; }
00039         void setCc(QString cc) { _cc = cc; }
00040         void setBcc(QString bcc) { _bcc = bcc; }
00041         void setSubject(QString subject) { _subject = subject; }
00042         void setPriority(QString priority) { _priority = priority; }
00043         void setMessage(QString message) { _message = message; }
00044         void setInReplyTo(QString inReplyTo) { _inReplyTo = inReplyTo; }
00045 
00046         void setNeedsMime(bool needsMime) { _needsMime = needsMime; }
00047 
00048         //void setEncrypt(bool encrypt) { _encrypt = encrypt; }
00049         //void setSign(bool sign) { _sign = sign; }
00050         //void setGpgReceivers(QValueList<GpgKey> receivers) { _receivers = receivers; }
00051         //void setGpgPassphrase(QString passphrase) { _passphrase = passphrase; }
00052 
00053         void setAttachments(QValueList<Attachment> attachments) { _attachments = attachments; }
00054         void addAttachment(Attachment attachment) { _attachments.append(attachment); }
00055 
00056         Account account() { return _account; }
00057 
00058         QString from() { return _from; }
00059         QString replyTo() { return _replyTo; }
00060         QString to() { return _to; }
00061         QString cc() { return _cc; }
00062         QString bcc() { return _bcc; }
00063         QString subject() { return _subject; }
00064         QString priority() { return _priority; }
00065         QString message() { return _message; }
00066         QString inReplyTo() { return _inReplyTo; }
00067 
00068         bool needsMime() { return _needsMime; }
00069 
00070         //bool encrypt() { return _encrypt; }
00071         //bool sign() { return _sign; }
00072         //QValueList<GpgKey> gpgReceivers() { return _receivers; }
00073         //QString gpgPassphrase() { return _passphrase; }
00074 
00075         QValueList<Attachment> attachments() { return _attachments; }
00076 
00077 protected:
00078         Account _account;
00079         QString _from, _replyTo, _to, _cc, _bcc, _subject, _priority, _message, _inReplyTo;
00080         bool _needsMime;
00081         //bool _encrypt, _sign;
00082         //QValueList<GpgKey> _receivers;
00083         //QString _passphrase;
00084         QValueList<Attachment> _attachments;
00085 
00086 };
00087 
00088 class MailFactory : public QObject
00089 {
00090         Q_OBJECT
00091 
00092 public:
00093         static void genMail(QString &header, QString &message, SendMail &smail, QWidget *parent);
00094 
00095 protected:
00096         MailFactory(SendMail &smail, QWidget *parent);
00097 
00098 //      void openPgpEncrypt(const QString &text, QString &header, QString &message);
00099 //      void openPgpSign(const QString &text, QString &header, QString &message);
00100 //      void openPgpSignEncrypt(const QString &text, QString &header, QString &message);
00101 
00102         bool _abort;
00103         SendMail _smail;
00104         QWidget *_parent;
00105         QString _header, _body;
00106 
00107 };
00108 
00109 #endif

Generated on Sat Nov 5 16:18:08 2005 for OPIE by  doxygen 1.4.2