MessageComposer::MessageFactoryNG

Search for usage in LXR

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, QList< 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 QList< KMime::MDN::DispositionModifier > &m=QList< 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 (uint folderIdentityId)
 
void setIdentityManager (KIdentityManagementCore::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)
 
QBindable< QStringbindableObjectName ()
 
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 () const const
 
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 QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
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_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 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
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, 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 *context, Functor functor, 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)
 
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, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Public Types inherited from QObject
typedef  QObjectList
 
- Properties inherited from QObject
 objectName
 
- 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 46 of file messagefactoryng.h.

Constructor & Destructor Documentation

◆ MessageFactoryNG()

MessageFactoryNG::MessageFactoryNG ( const KMime::Message::Ptr & origMsg,
Akonadi::Item::Id id,
const Akonadi::Collection & col = Akonadi::Collection(),
QObject * parent = nullptr )
explicit

Definition at line 66 of file messagefactoryng.cpp.

Member Function Documentation

◆ createAttachedForward()

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

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 357 of file messagefactoryng.cpp.

◆ createDeliveryReceipt()

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

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

The returned message is not stored in any folder.

Definition at line 559 of file messagefactoryng.cpp.

◆ createForwardAsync()

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 296 of file messagefactoryng.cpp.

◆ createForwardDigestMIME()

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

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 695 of file messagefactoryng.cpp.

◆ createMDN()

KMime::Message::Ptr MessageFactoryNG::createMDN ( KMime::MDN::ActionMode a,
KMime::MDN::DispositionType d,
KMime::MDN::SendingMode s,
int mdnQuoteOriginal = 0,
const QList< KMime::MDN::DispositionModifier > & m = QList<KMime::MDN::DispositionModifier>() )
nodiscard

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 589 of file messagefactoryng.cpp.

◆ createRedirect()

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 )
nodiscard

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 447 of file messagefactoryng.cpp.

◆ createReplyAsync()

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 119 of file messagefactoryng.cpp.

◆ createResend()

KMime::Message::Ptr MessageFactoryNG::createResend ( )
nodiscard

Definition at line 428 of file messagefactoryng.cpp.

◆ MDNConfirmMultipleRecipients()

bool MessageFactoryNG::MDNConfirmMultipleRecipients ( const KMime::Message::Ptr & msg)
staticnodiscard

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 799 of file messagefactoryng.cpp.

◆ MDNMDNUnknownOption()

bool MessageFactoryNG::MDNMDNUnknownOption ( const KMime::Message::Ptr & msg)
staticnodiscard

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

Definition at line 865 of file messagefactoryng.cpp.

◆ MDNRequested()

bool MessageFactoryNG::MDNRequested ( const KMime::Message::Ptr & msg)
staticnodiscard

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

Definition at line 785 of file messagefactoryng.cpp.

◆ MDNReturnPathEmpty()

bool MessageFactoryNG::MDNReturnPathEmpty ( const KMime::Message::Ptr & msg)
staticnodiscard

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 819 of file messagefactoryng.cpp.

◆ MDNReturnPathNotInRecieptTo()

bool MessageFactoryNG::MDNReturnPathNotInRecieptTo ( const KMime::Message::Ptr & msg)
staticnodiscard

Definition at line 842 of file messagefactoryng.cpp.

◆ putRepliesInSameFolder()

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 780 of file messagefactoryng.cpp.

◆ replyAsHtml()

bool MessageFactoryNG::replyAsHtml ( ) const
nodiscard

Definition at line 418 of file messagefactoryng.cpp.

◆ setFolderIdentity()

void MessageFactoryNG::setFolderIdentity ( uint 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.

Parameters
folderIdentityIdan uoid of KIdentityManagementCore::Identity

Definition at line 775 of file messagefactoryng.cpp.

◆ setIdentityManager()

void MessageFactoryNG::setIdentityManager ( KIdentityManagementCore::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 745 of file messagefactoryng.cpp.

◆ setMailingListAddresses()

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 770 of file messagefactoryng.cpp.

◆ setQuote()

void MessageFactoryNG::setQuote ( bool quote)

Whether to quote the original message in the reply.

Default is to quote.

Definition at line 760 of file messagefactoryng.cpp.

◆ setReplyAsHtml()

void MessageFactoryNG::setReplyAsHtml ( bool replyAsHtml)

Definition at line 423 of file messagefactoryng.cpp.

◆ setReplyStrategy()

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

Set the reply strategy to use.

Default is ReplySmart.

Definition at line 750 of file messagefactoryng.cpp.

◆ setSelection()

void MessageFactoryNG::setSelection ( const QString & selection)

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

Definition at line 755 of file messagefactoryng.cpp.

◆ setTemplate()

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 765 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-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:05:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.