MailTransport

transport.h
1 /*
2  Copyright (c) 2006 - 2007 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef MAILTRANSPORT_TRANSPORT_H
8 #define MAILTRANSPORT_TRANSPORT_H
9 
10 #include <mailtransport_export.h>
11 #include <transportbase.h>
12 #include <transporttype.h>
13 
14 class TransportPrivate;
15 
16 namespace MailTransport {
17 class TransportType;
18 
27 class MAILTRANSPORT_EXPORT Transport : public TransportBase
28 {
29  Q_OBJECT
30  friend class TransportManager;
31  friend class TransportManagerPrivate;
32 
33 public:
37  ~Transport() override;
38 
39  typedef QList<Transport *> List;
40 
44  Q_REQUIRED_RESULT bool isValid() const;
45 
49  Q_REQUIRED_RESULT QString password();
50 
55  void setPassword(const QString &passwd);
56 
62  void forceUniqueName();
63 
74  void updatePasswordState();
75 
81  Q_REQUIRED_RESULT bool isComplete() const;
82 
86  Q_REQUIRED_RESULT QString authenticationTypeString() const;
87 
95  static QString authenticationTypeString(int type);
96 
105  Transport *clone() const;
106 
112  Q_REQUIRED_RESULT TransportType transportType() const;
113 
114 protected:
119  Transport(const QString &cfgGroup);
120 
121  void usrRead() override;
122  bool usrSave() override;
123 
127  bool needsWalletMigration() const;
128 
132  void migrateToWallet();
133 
134 private Q_SLOTS:
135 
136  // Used by our friend, TransportManager
137  void readPassword();
138 
139 private:
140  TransportPrivate *const d;
141 };
142 } // namespace MailTransport
143 
144 #endif // MAILTRANSPORT_TRANSPORT_H
A representation of a transport type.
Definition: transporttype.h:29
Central transport management interface.
Represents the settings of a specific mail transport.
Definition: transport.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 23:16:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.