20 #ifndef _KMTRANSPORT_H_
21 #define _KMTRANSPORT_H_
23 #include <kdialogbase.h>
32 class KMTransportInfo :
public TQObject
36 virtual ~KMTransportInfo();
37 void readConfig(
int id);
38 void writeConfig(
int id);
39 static int findTransport(
const TQString &name);
40 static TQStringList availableTransports();
41 uint id()
const {
return mId; }
44 TQString passwd()
const;
45 void setPasswd(
const TQString& passwd );
48 bool storePasswd()
const {
return mStorePasswd; }
49 void setStorePasswd(
bool store );
52 void readPassword()
const;
54 TQString type, name, host, port, user, precommand, encryption, authType;
55 TQString localHostname;
56 bool auth, specifyHostname;
59 mutable TQString mPasswd;
60 bool mPasswdDirty, mStorePasswd, mStorePasswdInConfig;
64 class KMTransportSelDlg :
public KDialogBase
70 KMTransportSelDlg( TQWidget *parent=0,
const char *name=0,
bool modal=TRUE );
74 void buttonClicked(
int id );
80 class KMTransportDialog :
public KDialogBase
86 KMTransportDialog(
const TQString & caption, KMTransportInfo *transportInfo,
87 TQWidget *parent=0,
const char *name=0,
bool modal=TRUE );
88 virtual ~KMTransportDialog();
91 virtual void slotOk();
92 void slotSendmailChooser();
93 void slotRequiresAuthClicked();
94 void slotSmtpEncryptionChanged(
int);
95 void slotCheckSmtpCapabilities();
96 void slotSmtpCapabilities(
const TQStringList &,
const TQStringList &,
97 const TQString &,
const TQString &,
99 void slotSendmailEditPath(
const TQString &);
101 struct SendmailWidgets
104 TQLineEdit *nameEdit;
105 TQLineEdit *locationEdit;
106 TQPushButton *chooseButton;
111 TQLineEdit *nameEdit;
112 TQLineEdit *hostEdit;
113 TQLineEdit *portEdit;
114 TQCheckBox *authCheck;
116 TQLineEdit *loginEdit;
117 TQLabel *passwordLabel;
118 TQLineEdit *passwordEdit;
119 TQLineEdit *precommand;
120 TQButtonGroup *encryptionGroup;
121 TQRadioButton *encryptionNone;
122 TQRadioButton *encryptionSSL;
123 TQRadioButton *encryptionTLS;
124 TQButtonGroup *authGroup;
125 TQRadioButton *authPlain;
126 TQRadioButton *authLogin;
127 TQRadioButton *authCramMd5;
128 TQRadioButton *authDigestMd5;
129 TQRadioButton *authNTLM;
130 TQRadioButton *authGSSAPI;
131 TQPushButton *checkCapabilities;
132 TQCheckBox *storePasswordCheck;
133 TQCheckBox *specifyHostnameCheck;
134 TQLineEdit *localHostnameEdit;
135 TQLabel *localHostnameLabel;
138 void makeSendmailPage();
140 void setupSettings();
142 void checkHighest( TQButtonGroup * );
143 void enableAuthMethods(
unsigned int which );
144 bool sanityCheckSmtpInput();
145 static unsigned int authMethodsFromString(
const TQString & s );
146 static unsigned int authMethodsFromStringList(
const TQStringList & sl );
148 KMServerTest *mServerTest;
150 SendmailWidgets mSendmail;
151 KMTransportInfo *mTransportInfo;
152 enum EncryptionMethods {
167 unsigned int mAuthNone, mAuthSSL, mAuthTLS;