Akonadi Mime

transportattribute.h
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
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 
15 namespace Akonadi
16 {
17 class 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 <[email protected]>
26  @since 4.4
27 */
28 class AKONADI_MIME_EXPORT TransportAttribute : public Akonadi::Attribute
29 {
30 public:
31  /**
32  Creates a new TransportAttribute.
33  */
34  explicit TransportAttribute(int id = -1);
35 
36  /**
37  Destroys this TransportAttribute.
38  */
39  ~TransportAttribute() override;
40 
41  /* reimpl */
42  TransportAttribute *clone() const override;
43  QByteArray type() const override;
44  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 
58 private:
59  std::unique_ptr<TransportAttributePrivate> const d;
60 };
61 } // namespace MailTransport
Attribute determining which transport to use for sending a message.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:11:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.