• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

  • tdeabc
ldapconfigwidget.h
1 /*
2  This file is part of libtdeabc.
3  Copyright (c) 2004 Szombathelyi György <gyurco@freemail.hu>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef LDAPCONFIGWIDGET_H
22 #define LDAPCONFIGWIDGET_H
23 
24 #include <tqwidget.h>
25 #include <tqmap.h>
26 #include <tqstring.h>
27 
28 #include <tdeabc/ldapurl.h>
29 #include <tdeabc/ldif.h>
30 #include <tdeio/job.h>
31 
32 class TQGridLayout;
33 class TQSpinBox;
34 class TQPushButton;
35 class TQCheckBox;
36 class TQRadioButton;
37 class KComboBox;
38 class KLineEdit;
39 class KProgressDialog;
40 
41 namespace TDEABC {
42 
50  class KABC_EXPORT LdapConfigWidget : public TQWidget
51  {
52  Q_OBJECT
53 
54  TQ_PROPERTY( LCW_Flags flags READ flagsProp WRITE setFlagsProp )
55  TQ_PROPERTY( TQString user READ user WRITE setUser )
56  TQ_PROPERTY( TQString password READ password WRITE setPassword )
57  TQ_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN )
58  TQ_PROPERTY( TQString realm READ realm WRITE setRealm )
59  TQ_PROPERTY( TQString host READ host WRITE setHost )
60  TQ_PROPERTY( int port READ port WRITE setPort )
61  TQ_PROPERTY( int ver READ ver WRITE setVer )
62  TQ_PROPERTY( TQString dn READ dn WRITE setDn )
63  TQ_PROPERTY( TQString filter READ filter WRITE setFilter )
64  TQ_PROPERTY( TQString mech READ mech WRITE setMech )
65  TQ_PROPERTY( bool secNO READ isSecNO WRITE setSecNO )
66  TQ_PROPERTY( bool secSSL READ isSecSSL WRITE setSecSSL )
67  TQ_PROPERTY( bool secTLS READ isSecSSL WRITE setSecTLS )
68  TQ_PROPERTY( bool authAnon READ isAuthAnon WRITE setAuthAnon )
69  TQ_PROPERTY( bool authSimple READ isAuthSimple WRITE setAuthSimple )
70  TQ_PROPERTY( bool authSASL READ isAuthSASL WRITE setAuthSASL )
71  TQ_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit )
72  TQ_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit )
73  TQ_SETS ( LCW_Flags )
74 
75  public:
76 
77  enum LCW_Flags {
78  W_USER = 0x1,
79  W_PASS = 0x2,
80  W_BINDDN = 0x4,
81  W_REALM = 0x8,
82  W_HOST = 0x10,
83  W_PORT = 0x20,
84  W_VER = 0x40,
85  W_DN = 0x80,
86  W_FILTER = 0x100,
87  W_SECBOX = 0x400,
88  W_AUTHBOX = 0x800,
89  W_TIMELIMIT = 0x1000,
90  W_SIZELIMIT = 0x2000,
91  W_ALL = 0xFFFFFFF
92  };
93 
97  LdapConfigWidget( TQWidget* parent = 0,
98  const char* name = 0, WFlags fl = 0 );
100  LdapConfigWidget( int flags, TQWidget* parent = 0,
101  const char* name = 0, WFlags fl = 0 );
103  virtual ~LdapConfigWidget();
104 
106  void setUser( const TQString &user );
108  TQString user() const;
109 
111  void setPassword( const TQString &password );
113  TQString password() const;
114 
119  void setBindDN( const TQString &binddn );
121  TQString bindDN() const;
122 
124  void setRealm( const TQString &realm );
126  TQString realm() const;
127 
129  void setHost( const TQString &host );
131  TQString host() const;
132 
134  void setPort( int port );
136  int port() const;
137 
139  void setVer( int ver );
141  int ver() const;
142 
144  void setDn( const TQString &dn );
146  TQString dn() const;
147 
149  void setFilter( const TQString &filter );
151  TQString filter() const;
152 
154  void setMech( const TQString &mech );
156  TQString mech() const;
157 
162  void setSecNO( bool b = true );
167  bool isSecNO() const;
168 
173  void setSecTLS( bool b = true );
178  bool isSecTLS() const;
179 
184  void setSecSSL( bool b = true );
189  bool isSecSSL() const;
190 
195  void setAuthAnon( bool b = true );
200  bool isAuthAnon() const;
201 
206  void setAuthSimple( bool b = true );
211  bool isAuthSimple() const;
212 
217  void setAuthSASL( bool b = true );
222  bool isAuthSASL() const;
223 
228  void setSizeLimit( int sizelimit );
233  int sizeLimit() const;
234 
239  void setTimeLimit( int timelimit );
244  int timeLimit() const;
245 
246  int flags() const;
247  void setFlags( int flags );
248  inline LCW_Flags flagsProp() const { return (LCW_Flags)flags(); }
249  inline void setFlagsProp( LCW_Flags flags ) { setFlags((int)flags); }
250 
255  TDEABC::LDAPUrl url() const;
256 
257  private slots:
258  void setLDAPPort();
259  void setLDAPSPort();
260  void setAnonymous( int state );
261  void setSimple( int state );
262  void setSASL( int state );
263  void mQueryDNClicked();
264  void mQueryMechClicked();
265  void loadData( TDEIO::Job*, const TQByteArray& );
266  void loadResult( TDEIO::Job* );
267  private:
268 
269  int mFlags;
270  LDIF mLdif;
271  TQStringList mQResult;
272  TQString mAttr;
273 
274  KLineEdit *mUser;
275  KLineEdit *mPassword;
276  KLineEdit *mHost;
277  TQSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit;
278  KLineEdit *mDn, *mBindDN, *mRealm;
279  KLineEdit *mFilter;
280  TQRadioButton *mAnonymous,*mSimple,*mSASL;
281  TQCheckBox *mSubTree;
282  TQPushButton *mEditButton;
283  TQPushButton *mQueryMech;
284  TQRadioButton *mSecNO,*mSecTLS,*mSecSSL;
285  KComboBox *mMech;
286 
287  TQString mErrorMsg;
288  bool mCancelled;
289  KProgressDialog *mProg;
290 
291  TQGridLayout *mainLayout;
292  class LDAPConfigWidgetPrivate;
293  LDAPConfigWidgetPrivate *d;
294 
295  void sendQuery();
296  void initWidget();
297  };
298 }
299 
300 #endif
TDEABC::LDAPUrl
LDAPUrl.
Definition: ldapurl.h:42
TDEABC::LdapConfigWidget
LDAP Configuration widget.
Definition: ldapconfigwidget.h:50
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
TDEABC::LDIF
LDIF.
Definition: ldif.h:40
KLineEdit
KProgressDialog
KComboBox

tdeabc

Skip menu "tdeabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.8.8
This website is maintained by Timothy Pearson.