MessageComposer::MessageFactoryNG

MessageComposer::MessageFactoryNG Class Reference

#include <messagefactoryng.h>

Inheritance diagram for MessageComposer::MessageFactoryNG:

Classes

struct  MessageReply
 

Signals

void createForwardDone (const KMime::Message::Ptr &msg)
 
void createReplyDone (const MessageComposer::MessageFactoryNG::MessageReply &reply)
 

Public Member Functions

 MessageFactoryNG (const KMime::Message::Ptr &origMsg, Akonadi::Item::Id id, const Akonadi::Collection &col=Akonadi::Collection(), QObject *parent=nullptr)
 
QPair< KMime::Message::Ptr, QVector< KMime::Content * > > createAttachedForward (const Akonadi::Item::List &items=Akonadi::Item::List())
 
KMime::Message::Ptr createDeliveryReceipt ()
 
void createForwardAsync ()
 
QPair< KMime::Message::Ptr, KMime::Content * > createForwardDigestMIME (const Akonadi::Item::List &items)
 
KMime::Message::Ptr createMDN (KMime::MDN::ActionMode a, KMime::MDN::DispositionType d, KMime::MDN::SendingMode s, int mdnQuoteOriginal=0, const QVector< KMime::MDN::DispositionModifier > &m=QVector< KMime::MDN::DispositionModifier >())
 
KMime::Message::Ptr createRedirect (const QString &toStr, const QString &ccStr=QString(), const QString &bccStr=QString(), int transportId=-1, const QString &fcc=QString(), int identity=-1)
 
void createReplyAsync ()
 
KMime::Message::Ptr createResend ()
 
void putRepliesInSameFolder (Akonadi::Item::Id parentColId=-1)
 
bool replyAsHtml () const
 
void setFolderIdentity (Akonadi::Item::Id folderIdentityId)
 
void setIdentityManager (KIdentityManagement::IdentityManager *ident)
 
void setMailingListAddresses (const KMime::Types::Mailbox::List &listAddresses)
 
void setQuote (bool quote)
 
void setReplyAsHtml (bool replyAsHtml)
 
void setReplyStrategy (MessageComposer::ReplyStrategy replyStrategy)
 
void setSelection (const QString &selection)
 
void setTemplate (const QString &templ)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static bool MDNConfirmMultipleRecipients (const KMime::Message::Ptr &msg)
 
static bool MDNMDNUnknownOption (const KMime::Message::Ptr &msg)
 
static bool MDNRequested (const KMime::Message::Ptr &msg)
 
static bool MDNReturnPathEmpty (const KMime::Message::Ptr &msg)
 
static bool MDNReturnPathNotInRecieptTo (const KMime::Message::Ptr &msg)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Contains various factory methods for creating new messages such as replies, MDNs, forwards, etc.

Definition at line 45 of file messagefactoryng.h.

Member Function Documentation

QPair< KMime::Message::Ptr, QVector< KMime::Content * > > MessageFactoryNG::createAttachedForward ( const Akonadi::Item::List &  items = Akonadi::Item::List())

Create a forward from the given list of messages, attaching each message to be forwarded to the new forwarded message.

If no list is passed, use the original message passed in the MessageFactoryNG constructor.

Definition at line 367 of file messagefactoryng.cpp.

KMime::Message::Ptr MessageFactoryNG::createDeliveryReceipt ( )

Create a new message that is a delivery receipt of this message, filling required header fileds with the proper values.

The returned message is not stored in any folder.

Definition at line 572 of file messagefactoryng.cpp.

void MessageFactoryNG::createForwardAsync ( )

Create a new message that is a forward of this message, filling all required header fields with the proper values.

The returned message is not stored in any folder. Marks this message as forwarded.

Definition at line 306 of file messagefactoryng.cpp.

QPair< KMime::Message::Ptr, KMime::Content * > MessageFactoryNG::createForwardDigestMIME ( const Akonadi::Item::List &  items)

Create a new forwarded MIME digest.

If the user is trying to forward multiple messages at once all inline, they can choose to have them be compiled into a single digest message.

This will return a header message and individual message parts to be set as attachments.

Parameters
msgsList of messages to be composed into a digest

Definition at line 701 of file messagefactoryng.cpp.

Create a new message that is a MDN for this message, filling all required fields with proper values.

The returned message is not stored in any folder.

Parameters
aUse AutomaticAction for filtering and ManualAction for user-induced events.
dSee docs for KMime::MDN::DispositionType
sSee docs for KMime::MDN::SendingMode (in KMail, use MDNAdvideDialog to ask the user for this parameter)
mSee docs for KMime::MDN::DispositionModifier
Returns
The notification message or 0, if none should be sent, as well as the state of the MDN operation.

Definition at line 602 of file messagefactoryng.cpp.

KMime::Message::Ptr MessageFactoryNG::createRedirect ( const QString toStr,
const QString ccStr = QString(),
const QString bccStr = QString(),
int  transportId = -1,
const QString fcc = QString(),
int  identity = -1 
)

Create a new message that is a redirect to this message, filling all required header fields with the proper values.

The returned message is not stored in any folder. Marks this message as replied. Redirects differ from forwards so they are forwarded to some other user, mail is not changed and the reply-to field is set to the email address of the original sender.

Definition at line 457 of file messagefactoryng.cpp.

void MessageFactoryNG::createReplyAsync ( )

Create a new message that is a reply to this message, filling all required header fields with the proper values.

The returned message is not stored in any folder. Marks this message as replied.

Definition at line 124 of file messagefactoryng.cpp.

bool MessageFactoryNG::MDNConfirmMultipleRecipients ( const KMime::Message::Ptr msg)
static

If sending an MDN requires confirmation due to multiple addresses.

RFC 2298: [ Confirmation from the user SHOULD be obtained (or no MDN sent) ] if there is more than one distinct address in the Disposition-Notification-To header.

Definition at line 803 of file messagefactoryng.cpp.

bool MessageFactoryNG::MDNMDNUnknownOption ( const KMime::Message::Ptr msg)
static

If the MDN headers contain options that KMail can't parse.

Definition at line 872 of file messagefactoryng.cpp.

bool MessageFactoryNG::MDNRequested ( const KMime::Message::Ptr msg)
static

When creating MDNs, the user needs to be asked for confirmation in specific cases according to RFC 2298.

Definition at line 789 of file messagefactoryng.cpp.

bool MessageFactoryNG::MDNReturnPathEmpty ( const KMime::Message::Ptr msg)
static

If sending an MDN requires confirmation due to discrepancy between MDN header and Return-Path header.

RFC 2298: MDNs SHOULD NOT be sent automatically if the address in the Disposition-Notification-To header differs from the address in the Return-Path header. [...] Confirmation from the user SHOULD be obtained (or no MDN sent) if there is no Return-Path header in the message [...]

Definition at line 824 of file messagefactoryng.cpp.

void MessageFactoryNG::putRepliesInSameFolder ( Akonadi::Item::Id  parentColId = -1)

Whether or not to put the reply to a message in the same folder as the message itself.

If so, specify the folder id in which to put them. Default is -1, which means to not put replies in the same folder at all.

Definition at line 784 of file messagefactoryng.cpp.

void MessageFactoryNG::setFolderIdentity ( Akonadi::Item::Id  folderIdentityId)

Set the identity that is set for the folder in which the given message is.

It is used as a fallback when finding the identity if it can't be found in any other way. Also used if putRepliesInSameFolder is set to true.

Definition at line 779 of file messagefactoryng.cpp.

void MessageFactoryNG::setIdentityManager ( KIdentityManagement::IdentityManager ident)

Set the identity manager to be used when creating messages.

Required to be set before create* is called, otherwise the created messages might have the wrong identity data.

Definition at line 749 of file messagefactoryng.cpp.

void MessageFactoryNG::setMailingListAddresses ( const KMime::Types::Mailbox::List &  listAddresses)

Set extra mailinglist addresses to send the created message to.

Any mailing-list addresses specified in the original message itself will be added by MessageFactoryNG, so no need to add those manually.

Definition at line 774 of file messagefactoryng.cpp.

void MessageFactoryNG::setQuote ( bool  quote)

Whether to quote the original message in the reply.

Default is to quote.

Definition at line 764 of file messagefactoryng.cpp.

void MessageFactoryNG::setReplyStrategy ( MessageComposer::ReplyStrategy  replyStrategy)

Set the reply strategy to use.

Default is ReplySmart.

Definition at line 754 of file messagefactoryng.cpp.

void MessageFactoryNG::setSelection ( const QString selection)

Set the selection to be used to base the reply on.

Definition at line 759 of file messagefactoryng.cpp.

void MessageFactoryNG::setTemplate ( const QString templ)

Set the template to be used when creating the reply.

Default is to not use any template at all.

Definition at line 769 of file messagefactoryng.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Sep 19 2020 23:12:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.