00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MAILTRANSPORT_TRANSPORT_H
00021 #define MAILTRANSPORT_TRANSPORT_H
00022
00023 #include <mailtransport/mailtransport_export.h>
00024 #include <mailtransport/transportbase.h>
00025 #include <mailtransport/transporttype.h>
00026
00027 class TransportPrivate;
00028
00029 namespace MailTransport {
00030
00031 class TransportType;
00032
00044
00045
00046
00047
00048
00049
00050 class MAILTRANSPORT_EXPORT Transport : public TransportBase
00051 {
00052 Q_OBJECT
00053 friend class TransportManager;
00054 friend class TransportManagerPrivate;
00055
00056 public:
00060 virtual ~Transport();
00061
00062 typedef QList<Transport*> List;
00063
00067 bool isValid() const;
00068
00072 QString password();
00073
00078 void setPassword( const QString &passwd );
00079
00085 void forceUniqueName();
00086
00097 void updatePasswordState();
00098
00104 bool isComplete() const;
00105
00109 QString authenticationTypeString() const;
00110
00118 static QString authenticationTypeString( int type );
00119
00128 Transport *clone() const;
00129
00135 TransportType transportType() const;
00136
00142 void setTransportType( const TransportType &type );
00143
00144 protected:
00149 Transport( const QString &cfgGroup );
00150
00151 virtual void usrReadConfig();
00152 virtual void usrWriteConfig();
00153
00157 bool needsWalletMigration() const;
00158
00162 void migrateToWallet();
00163
00164 private Q_SLOTS:
00165
00166
00167 void readPassword();
00168
00169 private:
00170 TransportPrivate *const d;
00171 };
00172
00173 }
00174
00175 #endif // MAILTRANSPORT_TRANSPORT_H