kmail Library API Documentation

kmtransport.h

00001 00020 #ifndef _KMTRANSPORT_H_ 00021 #define _KMTRANSPORT_H_ 00022 00023 #include <kdialogbase.h> 00024 00025 class QCheckBox; 00026 class QLabel; 00027 class QLineEdit; 00028 class QRadioButton; 00029 class KMServerTest; 00030 class QButtonGroup; 00031 00032 class KMTransportInfo : public QObject 00033 { 00034 public: 00035 KMTransportInfo(); 00036 virtual ~KMTransportInfo(); 00037 void readConfig(int id); 00038 void writeConfig(int id); 00039 static int findTransport(const QString &name); 00040 static QStringList availableTransports(); 00041 QString type, name, host, port, user, pass, precommand, encryption, authType; 00042 QString localHostname; 00043 bool auth, storePass, specifyHostname; 00044 }; 00045 00046 class KMTransportSelDlg : public KDialogBase 00047 { 00048 Q_OBJECT 00049 00050 public: 00051 KMTransportSelDlg( QWidget *parent=0, const char *name=0, bool modal=TRUE ); 00052 int selected() const; 00053 00054 private slots: 00055 void buttonClicked( int id ); 00056 00057 private: 00058 int mSelectedButton; 00059 }; 00060 00061 class KMTransportDialog : public KDialogBase 00062 { 00063 Q_OBJECT 00064 00065 public: 00066 KMTransportDialog( const QString & caption, KMTransportInfo *transportInfo, 00067 QWidget *parent=0, const char *name=0, bool modal=TRUE ); 00068 virtual ~KMTransportDialog(); 00069 00070 private slots: 00071 virtual void slotOk(); 00072 void slotSendmailChooser(); 00073 void slotRequiresAuthClicked(); 00074 void slotSmtpEncryptionChanged(int); 00075 void slotCheckSmtpCapabilities(); 00076 void slotSmtpCapabilities(const QStringList &, const QString &, const QString &, const QString &); 00077 void slotSendmailEditPath(const QString &); 00078 private: 00079 struct SendmailWidgets 00080 { 00081 QLabel *titleLabel; 00082 QLineEdit *nameEdit; 00083 QLineEdit *locationEdit; 00084 QPushButton *chooseButton; 00085 }; 00086 struct SmtpWidgets 00087 { 00088 QLabel *titleLabel; 00089 QLineEdit *nameEdit; 00090 QLineEdit *hostEdit; 00091 QLineEdit *portEdit; 00092 QCheckBox *authCheck; 00093 QLabel *loginLabel; 00094 QLineEdit *loginEdit; 00095 QLabel *passwordLabel; 00096 QLineEdit *passwordEdit; 00097 QLineEdit *precommand; 00098 QButtonGroup *encryptionGroup; 00099 QRadioButton *encryptionNone; 00100 QRadioButton *encryptionSSL; 00101 QRadioButton *encryptionTLS; 00102 QButtonGroup *authGroup; 00103 QRadioButton *authPlain; 00104 QRadioButton *authLogin; 00105 QRadioButton *authCramMd5; 00106 QRadioButton *authDigestMd5; 00107 QPushButton *checkCapabilities; 00108 QCheckBox *storePasswordCheck; 00109 QCheckBox *specifyHostnameCheck; 00110 QLineEdit *localHostnameEdit; 00111 QLabel *localHostnameLabel; 00112 }; 00113 00114 void makeSendmailPage(); 00115 void makeSmtpPage(); 00116 void setupSettings(); 00117 void saveSettings(); 00118 void checkHighest( QButtonGroup * ); 00119 void enableAuthMethods( unsigned int which ); 00120 static unsigned int authMethodsFromString( const QString & s ); 00121 static unsigned int authMethodsFromStringList( const QStringList & sl ); 00122 00123 KMServerTest *mServerTest; 00124 SmtpWidgets mSmtp; 00125 SendmailWidgets mSendmail; 00126 KMTransportInfo *mTransportInfo; 00127 enum EncryptionMethods { 00128 NoEncryption = 0, 00129 SSL = 1, 00130 TLS = 2 00131 }; 00132 enum AuthMethods { 00133 NoAuth = 0, 00134 LOGIN = 1, 00135 PLAIN = 2, 00136 CRAM_MD5 = 4, 00137 DIGEST_MD5 = 8, 00138 AllAuth = 0xffffffff 00139 }; 00140 unsigned int mAuthNone, mAuthSSL, mAuthTLS; 00141 }; 00142 00143 00144 #endif
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:04 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003