Akonadi Mime

transportattribute.h
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadi-mime_export.h"
10
11#include <Akonadi/Attribute>
12
13#include <memory>
14
15namespace Akonadi
16{
17class TransportAttributePrivate;
18
19/**
20 Attribute determining which transport to use for sending a message.
21
22 @see mailtransport
23 @see TransportManager.
24
25 @author Constantin Berzan <exit3219@gmail.com>
26 @since 4.4
27*/
28class AKONADI_MIME_EXPORT TransportAttribute : public Akonadi::Attribute
29{
30public:
31 /**
32 Creates a new TransportAttribute.
33 */
34 explicit TransportAttribute(int id = -1);
35
36 /**
37 Destroys this TransportAttribute.
38 */
40
41 /* reimpl */
42 TransportAttribute *clone() const override;
43 [[nodiscard]] QByteArray type() const override;
44 [[nodiscard]] QByteArray serialized() const override;
45 void deserialize(const QByteArray &data) override;
46
47 /**
48 Returns the transport id to use for sending this message.
49 @see TransportManager.
50 */
51 [[nodiscard]] int transportId() const;
52
53 /**
54 Sets the transport id to use for sending this message.
55 */
56 void setTransportId(int id);
57
58private:
59 std::unique_ptr<TransportAttributePrivate> const d;
60};
61} // namespace MailTransport
TransportAttribute(int id=-1)
Creates a new TransportAttribute.
~TransportAttribute() override
Destroys this TransportAttribute.
void setTransportId(int id)
Sets the transport id to use for sending this message.
int transportId() const
Returns the transport id to use for sending this message.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:08 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.