• 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
32class TQGridLayout;
33class TQSpinBox;
34class TQPushButton;
35class TQCheckBox;
36class TQRadioButton;
37class KComboBox;
38class KLineEdit;
39class KProgressDialog;
40
41namespace TDEABC {
42
49
50 class KABC_EXPORT LdapConfigWidget : public TQWidget
51 {
52 TQ_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
KComboBox
KLineEdit
KProgressDialog
TDEABC::LDAPUrl
LDAPUrl.
Definition ldapurl.h:43
TDEABC::LDIF
LDIF.
Definition ldif.h:41
TDEABC::LdapConfigWidget::sizeLimit
int sizeLimit() const
Returns the size limit.
Definition ldapconfigwidget.cpp:584
TDEABC::LdapConfigWidget::setDn
void setDn(const TQString &dn)
Sets the LDAP Base DN.
Definition ldapconfigwidget.cpp:480
TDEABC::LdapConfigWidget::timeLimit
int timeLimit() const
Returns the time limit.
Definition ldapconfigwidget.cpp:594
TDEABC::LdapConfigWidget::setUser
void setUser(const TQString &user)
Sets the user name.
Definition ldapconfigwidget.cpp:410
TDEABC::LdapConfigWidget::setAuthSimple
void setAuthSimple(bool b=true)
Sets the authentication to simple.
Definition ldapconfigwidget.cpp:559
TDEABC::LdapConfigWidget::setSizeLimit
void setSizeLimit(int sizelimit)
Sets the size limit.
Definition ldapconfigwidget.cpp:579
TDEABC::LdapConfigWidget::setBindDN
void setBindDN(const TQString &binddn)
Sets the bind dn.
Definition ldapconfigwidget.cpp:430
TDEABC::LdapConfigWidget::setMech
void setMech(const TQString &mech)
Sets the SASL Mechanism.
Definition ldapconfigwidget.cpp:500
TDEABC::LdapConfigWidget::url
TDEABC::LDAPUrl url() const
Returns a LDAP Url constructed from the settings given.
Definition ldapconfigwidget.cpp:378
TDEABC::LdapConfigWidget::isSecNO
bool isSecNO() const
Returns true if no transport security selected.
Definition ldapconfigwidget.cpp:524
TDEABC::LdapConfigWidget::setVer
void setVer(int ver)
Sets the LDAP protocol version.
Definition ldapconfigwidget.cpp:470
TDEABC::LdapConfigWidget::setAuthAnon
void setAuthAnon(bool b=true)
Sets the authentication to anonymous.
Definition ldapconfigwidget.cpp:549
TDEABC::LdapConfigWidget::isSecSSL
bool isSecSSL() const
Returns true if SSL selected.
Definition ldapconfigwidget.cpp:544
TDEABC::LdapConfigWidget::realm
TQString realm() const
Gets the SASL realm.
Definition ldapconfigwidget.cpp:445
TDEABC::LdapConfigWidget::isAuthSimple
bool isAuthSimple() const
Returns true if Simple authentication selected.
Definition ldapconfigwidget.cpp:564
TDEABC::LdapConfigWidget::isSecTLS
bool isSecTLS() const
Returns true if TLS selected.
Definition ldapconfigwidget.cpp:534
TDEABC::LdapConfigWidget::setPassword
void setPassword(const TQString &password)
Sets the password.
Definition ldapconfigwidget.cpp:420
TDEABC::LdapConfigWidget::setFilter
void setFilter(const TQString &filter)
Sets the LDAP Filter.
Definition ldapconfigwidget.cpp:490
TDEABC::LdapConfigWidget::bindDN
TQString bindDN() const
Gets the bind dn.
Definition ldapconfigwidget.cpp:435
TDEABC::LdapConfigWidget::port
int port() const
Gets the LDAP port.
Definition ldapconfigwidget.cpp:465
TDEABC::LdapConfigWidget::host
TQString host() const
Gets the host name.
Definition ldapconfigwidget.cpp:455
TDEABC::LdapConfigWidget::mech
TQString mech() const
Gets the SASL Mechanism.
Definition ldapconfigwidget.cpp:514
TDEABC::LdapConfigWidget::filter
TQString filter() const
Gets the LDAP Filter.
Definition ldapconfigwidget.cpp:495
TDEABC::LdapConfigWidget::dn
TQString dn() const
Gets the LDAP Base DN.
Definition ldapconfigwidget.cpp:485
TDEABC::LdapConfigWidget::setSecTLS
void setSecTLS(bool b=true)
Sets the configuration to TLS.
Definition ldapconfigwidget.cpp:529
TDEABC::LdapConfigWidget::setAuthSASL
void setAuthSASL(bool b=true)
Sets the authentication to SASL.
Definition ldapconfigwidget.cpp:569
TDEABC::LdapConfigWidget::password
TQString password() const
Gets the password.
Definition ldapconfigwidget.cpp:425
TDEABC::LdapConfigWidget::setHost
void setHost(const TQString &host)
Sets the host name.
Definition ldapconfigwidget.cpp:450
TDEABC::LdapConfigWidget::LdapConfigWidget
LdapConfigWidget(TQWidget *parent=0, const char *name=0, WFlags fl=0)
Constructs an empty configuration widget.
Definition ldapconfigwidget.cpp:47
TDEABC::LdapConfigWidget::setPort
void setPort(int port)
Sets the LDAP port.
Definition ldapconfigwidget.cpp:460
TDEABC::LdapConfigWidget::setSecNO
void setSecNO(bool b=true)
Sets the configuration to no transport security.
Definition ldapconfigwidget.cpp:519
TDEABC::LdapConfigWidget::setSecSSL
void setSecSSL(bool b=true)
Sets the configuration to SSL.
Definition ldapconfigwidget.cpp:539
TDEABC::LdapConfigWidget::isAuthAnon
bool isAuthAnon() const
Returns true if Anonymous authentication selected.
Definition ldapconfigwidget.cpp:554
TDEABC::LdapConfigWidget::setTimeLimit
void setTimeLimit(int timelimit)
Sets the time limit.
Definition ldapconfigwidget.cpp:589
TDEABC::LdapConfigWidget::setRealm
void setRealm(const TQString &realm)
Sets the SASL realm.
Definition ldapconfigwidget.cpp:440
TDEABC::LdapConfigWidget::isAuthSASL
bool isAuthSASL() const
Returns true if SASL authentication selected.
Definition ldapconfigwidget.cpp:574
TDEABC::LdapConfigWidget::user
TQString user() const
Gets the user name.
Definition ldapconfigwidget.cpp:415
TDEABC::LdapConfigWidget::ver
int ver() const
Gets the LDAP protocol version.
Definition ldapconfigwidget.cpp:475
TDEABC
static data, shared by ALL addressee objects
Definition address.h:48

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.15.0
This website is maintained by Timothy Pearson.