Akonadi::DispatchModeAttribute Class

class Akonadi::DispatchModeAttribute
Header: #include <Akonadi/DispatchModeAttribute>
CMake: find_package(KPim6AkonadiMime REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiMime)

Public Types

enum DispatchMode { Automatic, Manual }

Public Functions

DispatchModeAttribute(Akonadi::DispatchModeAttribute::DispatchMode mode = Automatic)
virtual ~DispatchModeAttribute() override
Akonadi::DispatchModeAttribute::DispatchMode dispatchMode() const
QDateTime sendAfter() const
void setDispatchMode(Akonadi::DispatchModeAttribute::DispatchMode mode)
void setSendAfter(const QDateTime &date)

Reimplemented Public Functions

virtual Akonadi::DispatchModeAttribute *clone() const override
virtual void deserialize(const QByteArray &data) override
virtual QByteArray serialized() const override
virtual QByteArray type() const override

Detailed Description

Attribute determining how and when a message from the outbox should be dispatched. Messages can be sent immediately, sent only when the user explicitly requests it, or sent automatically at a certain date and time.

Author: Constantin Berzan <exit3219@gmail.com>

Member Type Documentation

enum DispatchModeAttribute::DispatchMode

Determines how the message is sent.

Member Function Documentation

[explicit] DispatchModeAttribute::DispatchModeAttribute(Akonadi::DispatchModeAttribute::DispatchMode mode = Automatic)

Creates a new DispatchModeAttribute.

[override virtual noexcept] DispatchModeAttribute::~DispatchModeAttribute()

Destroys the DispatchModeAttribute.

[override virtual] Akonadi::DispatchModeAttribute *DispatchModeAttribute::clone() const

Returns a copy of this attribute.

[override virtual] void DispatchModeAttribute::deserialize(const QByteArray &data)

Deserializes the attribute from the given data. data the serialized data

Akonadi::DispatchModeAttribute::DispatchMode DispatchModeAttribute::dispatchMode() const

Returns the dispatch mode for the message.

See also setDispatchMode() and DispatchMode.

QDateTime DispatchModeAttribute::sendAfter() const

Returns the date and time when the message should be sent. Only valid if dispatchMode() is Automatic.

See also setSendAfter().

[override virtual] QByteArray DispatchModeAttribute::serialized() const

Returns the serialized representation of the attribute.

void DispatchModeAttribute::setDispatchMode(Akonadi::DispatchModeAttribute::DispatchMode mode)

Sets the dispatch mode for the message. mode the dispatch mode to set

See also dispatchMode() and DispatchMode.

void DispatchModeAttribute::setSendAfter(const QDateTime &date)

Sets the date and time when the message should be sent. date the date and time to set

See also sendAfter() and setDispatchMode.

[override virtual] QByteArray DispatchModeAttribute::type() const

Returns the type of the attribute.