MailTransport

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 "mailtransportakonadi_export.h"
10 
11 #include <Akonadi/Attribute>
12 
13 #include <memory>
14 
15 namespace MailTransport
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 MAILTRANSPORTAKONADI_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  Q_REQUIRED_RESULT 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 Feb 7 2023 03:58:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.