MailTransport

transporttype.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 "mailtransport_export.h"
10 #include "transport.h"
11 
12 #include <QString>
13 
14 namespace MailTransport
15 {
16 class AddTransportDialog;
17 class TransportManager;
18 class TransportTypePrivate;
19 
20 /**
21  @short A representation of a transport type.
22 
23  Represents an available transport type. SMTP is available
24 
25  All available transport types can be retrieved via TransportManager::types().
26 
27  @author Constantin Berzan <[email protected]>
28  @since 4.4
29 */
30 class MAILTRANSPORT_EXPORT TransportType
31 {
32  friend class AddTransportDialog;
33  friend class Transport;
34  friend class TransportManager;
35  friend class TransportManagerPrivate;
36 
37 public:
38  /**
39  Describes a list of transport types.
40  */
42 
43  /**
44  Constructs a new TransportType.
45  */
46  TransportType();
47 
48  /**
49  Creates a copy of the @p other TransportType.
50  */
51  TransportType(const TransportType &other);
52 
53  /**
54  Destroys the TransportType.
55  */
56  ~TransportType();
57 
58  /**
59  * Replaces the transport type by the @p other.
60  */
61  TransportType &operator=(const TransportType &other);
62 
63  /**
64  * Compares the transport type with the @p other.
65  */
66  Q_REQUIRED_RESULT bool operator==(const TransportType &other) const;
67 
68  /**
69  Returns whether the transport type is valid.
70  */
71  Q_REQUIRED_RESULT bool isValid() const;
72 
73  /**
74  Returns the i18n'ed name of the transport type.
75  */
76  Q_REQUIRED_RESULT QString name() const;
77 
78  /**
79  Returns a description of the transport type.
80  */
81  Q_REQUIRED_RESULT QString description() const;
82 
83  /**
84  * Returns a plugin identifier
85  */
86  Q_REQUIRED_RESULT QString identifier() const;
87 
88  Q_REQUIRED_RESULT bool isAkonadiResource() const;
89 
90 private:
91  //@cond PRIVATE
93  //@endcond
94 };
95 } // namespace MailTransport
96 
97 Q_DECLARE_METATYPE(MailTransport::TransportType)
98 Q_DECLARE_TYPEINFO(MailTransport::TransportType, Q_MOVABLE_TYPE);
99 
A representation of a transport type.
Definition: transporttype.h:30
Central transport management interface.
Represents the settings of a specific mail transport.
Definition: transport.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 23:21:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.