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

tdeabc

  • tdeabc
ldapconfigwidget.cpp
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#include <tqapplication.h>
21
22#include <tqobjectlist.h>
23#include <tqcheckbox.h>
24#include <tqlabel.h>
25#include <tqlayout.h>
26#include <tqpushbutton.h>
27#include <tqspinbox.h>
28#include <tqvgroupbox.h>
29#include <tqhbuttongroup.h>
30#include <tqradiobutton.h>
31
32#include <tdemessagebox.h>
33#include <tdeaccelmanager.h>
34#include <kdialogbase.h>
35#include <tdelocale.h>
36#include <klineedit.h>
37#include <kcombobox.h>
38#include <kprogress.h>
39
40#include <kdebug.h>
41
42#include "ldapconfigwidget.h"
43#include "ldapconfigwidget.moc"
44
45using namespace TDEABC;
46
47LdapConfigWidget::LdapConfigWidget( TQWidget* parent,
48 const char* name, WFlags fl ) : TQWidget( parent, name, fl )
49{
50 mProg = 0;
51 mFlags = 0;
52 mainLayout = new TQGridLayout( this, 12, 4, 0,
53 KDialog::spacingHint() );
54}
55
56LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent,
57 const char* name, WFlags fl ) : TQWidget( parent, name, fl )
58{
59 mFlags = flags;
60 mProg = 0;
61 mainLayout = new TQGridLayout( this, 12, 4, 0,
62 KDialog::spacingHint() );
63 initWidget();
64}
65
66LdapConfigWidget::~LdapConfigWidget()
67{
68}
69
70void LdapConfigWidget::initWidget()
71{
72 TQLabel *label;
73
74 mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0;
75 mPort = mVer = mTimeLimit = mSizeLimit = 0;
76 mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = 0;
77 mEditButton = mQueryMech = 0;
78 mMech = 0;
79 int row = 0;
80 int col;
81
82 if ( mFlags & W_USER ) {
83 label = new TQLabel( i18n( "User:" ), this );
84 mUser = new KLineEdit( this, "kcfg_ldapuser" );
85
86 mainLayout->addWidget( label, row, 0 );
87 mainLayout->addMultiCellWidget( mUser, row, row, 1, 3 );
88 row++;
89 }
90
91 if ( mFlags & W_BINDDN ) {
92 label = new TQLabel( i18n( "Bind DN:" ), this );
93 mBindDN = new KLineEdit( this, "kcfg_ldapbinddn" );
94
95 mainLayout->addWidget( label, row, 0 );
96 mainLayout->addMultiCellWidget( mBindDN, row, row, 1, 3 );
97 row++;
98 }
99
100 if ( mFlags & W_REALM ) {
101 label = new TQLabel( i18n( "Realm:" ), this );
102 mRealm = new KLineEdit( this, "kcfg_ldaprealm" );
103
104 mainLayout->addWidget( label, row, 0 );
105 mainLayout->addMultiCellWidget( mRealm, row, row, 1, 3 );
106 row++;
107 }
108
109 if ( mFlags & W_PASS ) {
110 label = new TQLabel( i18n( "Password:" ), this );
111 mPassword = new KLineEdit( this, "kcfg_ldappassword" );
112 mPassword->setEchoMode( KLineEdit::Password );
113
114 mainLayout->addWidget( label, row, 0 );
115 mainLayout->addMultiCellWidget( mPassword, row, row, 1, 3 );
116 row++;
117 }
118
119 if ( mFlags & W_HOST ) {
120 label = new TQLabel( i18n( "Host:" ), this );
121 mHost = new KLineEdit( this, "kcfg_ldaphost" );
122
123 mainLayout->addWidget( label, row, 0 );
124 mainLayout->addMultiCellWidget( mHost, row, row, 1, 3 );
125 row++;
126 }
127
128 col = 0;
129 if ( mFlags & W_PORT ) {
130 label = new TQLabel( i18n( "Port:" ), this );
131 mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" );
132 mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
133 mPort->setValue( 389 );
134
135 mainLayout->addWidget( label, row, col );
136 mainLayout->addWidget( mPort, row, col+1 );
137 col += 2;
138 }
139
140 if ( mFlags & W_VER ) {
141 label = new TQLabel( i18n( "LDAP version:" ), this );
142 mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" );
143 mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
144 mVer->setValue( 3 );
145 mainLayout->addWidget( label, row, col );
146 mainLayout->addWidget( mVer, row, col+1 );
147 }
148 if ( mFlags & ( W_PORT | W_VER ) ) row++;
149
150 col = 0;
151 if ( mFlags & W_SIZELIMIT ) {
152 label = new TQLabel( i18n( "Size limit:" ), this );
153 mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" );
154 mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
155 mSizeLimit->setValue( 0 );
156 mSizeLimit->setSpecialValueText( i18n("Default") );
157 mainLayout->addWidget( label, row, col );
158 mainLayout->addWidget( mSizeLimit, row, col+1 );
159 col += 2;
160 }
161
162 if ( mFlags & W_TIMELIMIT ) {
163 label = new TQLabel( i18n( "Time limit:" ), this );
164 mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" );
165 mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
166 mTimeLimit->setValue( 0 );
167 mTimeLimit->setSuffix( i18n(" sec") );
168 mTimeLimit->setSpecialValueText( i18n("Default") );
169 mainLayout->addWidget( label, row, col );
170 mainLayout->addWidget( mTimeLimit, row, col+1 );
171 }
172 if ( mFlags & ( W_SIZELIMIT | W_TIMELIMIT ) ) row++;
173
174 if ( mFlags & W_DN ) {
175 label = new TQLabel( i18n( "Distinguished Name", "DN:" ), this );
176 mDn = new KLineEdit( this, "kcfg_ldapdn" );
177
178 mainLayout->addWidget( label, row, 0 );
179 mainLayout->addMultiCellWidget( mDn, row, row, 1, 1 );
180 //without host query doesn't make sense
181 if ( mHost ) {
182 TQPushButton *dnquery = new TQPushButton( i18n( "Query Server" ), this );
183 connect( dnquery, TQ_SIGNAL( clicked() ), TQ_SLOT( mQueryDNClicked() ) );
184 mainLayout->addMultiCellWidget( dnquery, row, row, 2, 3 );
185 }
186 row++;
187 }
188
189 if ( mFlags & W_FILTER ) {
190 label = new TQLabel( i18n( "Filter:" ), this );
191 mFilter = new KLineEdit( this, "kcfg_ldapfilter" );
192
193 mainLayout->addWidget( label, row, 0 );
194 mainLayout->addMultiCellWidget( mFilter, row, row, 1, 3 );
195 row++;
196 }
197
198 if ( mFlags & W_SECBOX ) {
199 TQHButtonGroup *btgroup = new TQHButtonGroup( i18n( "Security" ), this );
200 mSecNO = new TQRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" );
201 mSecTLS = new TQRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" );
202 mSecSSL = new TQRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" );
203 mainLayout->addMultiCellWidget( btgroup, row, row, 0, 3 );
204
205 connect( mSecNO, TQ_SIGNAL( clicked() ), TQ_SLOT( setLDAPPort() ) );
206 connect( mSecTLS, TQ_SIGNAL( clicked() ), TQ_SLOT( setLDAPPort() ) );
207 connect( mSecSSL, TQ_SIGNAL( clicked() ), TQ_SLOT( setLDAPSPort( ) ) );
208
209 mSecNO->setChecked( true );
210 row++;
211 }
212
213 if ( mFlags & W_AUTHBOX ) {
214
215 TQButtonGroup *authbox =
216 new TQButtonGroup( 3, TQt::Horizontal, i18n( "Authentication" ), this );
217
218 mAnonymous = new TQRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" );
219 mSimple = new TQRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" );
220 mSASL = new TQRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" );
221
222 label = new TQLabel( i18n( "SASL mechanism:" ), authbox );
223 mMech = new KComboBox( false, authbox, "kcfg_ldapsaslmech" );
224 mMech->setEditable( true );
225 mMech->insertItem( "DIGEST-MD5" );
226 mMech->insertItem( "GSSAPI" );
227 mMech->insertItem( "PLAIN" );
228
229 //without host query doesn't make sense
230 if ( mHost ) {
231 mQueryMech = new TQPushButton( i18n( "Query Server" ), authbox );
232 connect( mQueryMech, TQ_SIGNAL( clicked() ), TQ_SLOT( mQueryMechClicked() ) );
233 }
234
235 mainLayout->addMultiCellWidget( authbox, row, row+1, 0, 3 );
236
237 connect( mAnonymous, TQ_SIGNAL( stateChanged(int) ), TQ_SLOT( setAnonymous(int) ) );
238 connect( mSimple, TQ_SIGNAL( stateChanged(int) ), TQ_SLOT( setSimple(int) ) );
239 connect( mSASL, TQ_SIGNAL( stateChanged(int) ), TQ_SLOT( setSASL(int) ) );
240
241 mAnonymous->setChecked( true );
242 }
243
244}
245
246void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d )
247{
248 LDIF::ParseVal ret;
249
250 if ( d.size() ) {
251 mLdif.setLDIF( d );
252 } else {
253 mLdif.endLDIF();
254 }
255 do {
256 ret = mLdif.nextItem();
257 if ( ret == LDIF::Item && mLdif.attr().lower() == mAttr ) {
258 mProg->progressBar()->advance( 1 );
259 mQResult.push_back( TQString::fromUtf8( mLdif.val(), mLdif.val().size() ) );
260 }
261 } while ( ret != LDIF::MoreData );
262}
263
264void LdapConfigWidget::loadResult( TDEIO::Job* job)
265{
266 int error = job->error();
267 if ( error && error != TDEIO::ERR_USER_CANCELED )
268 mErrorMsg = job->errorString();
269 else
270 mErrorMsg = "";
271
272 mCancelled = false;
273 mProg->close();
274}
275
276void LdapConfigWidget::sendQuery()
277{
278 LDAPUrl _url;
279
280 mQResult.clear();
281 mCancelled = true;
282
283 _url.setProtocol( ( mSecSSL && mSecSSL->isChecked() ) ? "ldaps" : "ldap" );
284 if ( mHost ) _url.setHost( mHost->text() );
285 if ( mPort ) _url.setPort( mPort->value() );
286 _url.setDn( "" );
287 _url.setAttributes( mAttr );
288 _url.setScope( LDAPUrl::Base );
289 if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) );
290 if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls", "" );
291
292 kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl;
293 mLdif.startParsing();
294 TDEIO::Job *job = TDEIO::get( _url, true, false );
295 job->addMetaData("no-auth-prompt","true");
296 connect( job, TQ_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ),
297 this, TQ_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) );
298 connect( job, TQ_SIGNAL( result( TDEIO::Job* ) ),
299 this, TQ_SLOT( loadResult( TDEIO::Job* ) ) );
300
301 if ( mProg == NULL )
302 mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true );
303 else
304 mProg->setLabel( _url.prettyURL() );
305 mProg->progressBar()->setValue( 0 );
306 mProg->progressBar()->setTotalSteps( 1 );
307 mProg->exec();
308 if ( mCancelled ) {
309 kdDebug(5700) << "query cancelled!" << endl;
310 job->kill( true );
311 } else {
312 if ( !mErrorMsg.isEmpty() ) KMessageBox::error( this, mErrorMsg );
313 }
314}
315
316void LdapConfigWidget::mQueryMechClicked()
317{
318 mAttr = "supportedsaslmechanisms";
319 sendQuery();
320 if ( !mQResult.isEmpty() ) {
321 mQResult.sort();
322 mMech->clear();
323 mMech->insertStringList( mQResult );
324 }
325}
326
327void LdapConfigWidget::mQueryDNClicked()
328{
329 mAttr = "namingcontexts";
330 sendQuery();
331 if ( !mQResult.isEmpty() ) mDn->setText( mQResult.first() );
332}
333
334void LdapConfigWidget::setAnonymous( int state )
335{
336 if ( state == TQButton::Off ) return;
337 if ( mUser ) mUser->setEnabled(false);
338 if ( mPassword ) mPassword->setEnabled(false);
339 if ( mBindDN ) mBindDN->setEnabled(false);
340 if ( mRealm ) mRealm->setEnabled(false);
341 if ( mMech ) mMech->setEnabled(false);
342 if ( mQueryMech ) mQueryMech->setEnabled(false);
343}
344
345void LdapConfigWidget::setSimple( int state )
346{
347 if ( state == TQButton::Off ) return;
348 if ( mUser ) mUser->setEnabled(true);
349 if ( mPassword ) mPassword->setEnabled(true);
350 if ( mBindDN ) mBindDN->setEnabled(false);
351 if ( mRealm ) mRealm->setEnabled(false);
352 if ( mMech ) mMech->setEnabled(false);
353 if ( mQueryMech ) mQueryMech->setEnabled(false);
354}
355
356void LdapConfigWidget::setSASL( int state )
357{
358 if ( state == TQButton::Off ) return;
359 if ( mUser ) mUser->setEnabled(true);
360 if ( mPassword ) mPassword->setEnabled(true);
361 if ( mBindDN ) mBindDN->setEnabled(true);
362 if ( mRealm ) mRealm->setEnabled(true);
363 if ( mMech ) mMech->setEnabled(true);
364 if ( mQueryMech ) mQueryMech->setEnabled(true);
365}
366
367void LdapConfigWidget::setLDAPPort()
368{
369 mPort->setValue( 389 );
370}
371
372void LdapConfigWidget::setLDAPSPort()
373{
374 mPort->setValue( 636 );
375}
376
377
378LDAPUrl LdapConfigWidget::url() const
379{
380 LDAPUrl _url;
381 if ( mSecSSL && mSecSSL->isChecked() )
382 _url.setProtocol( "ldaps" );
383 else
384 _url.setProtocol( "ldap" );
385
386 if ( mUser ) _url.setUser( mUser->text() );
387 if ( mPassword ) _url.setPass( mPassword->text() );
388 if ( mHost ) _url.setHost( mHost->text() );
389 if ( mPort ) _url.setPort( mPort->value() );
390 if ( mDn ) _url.setDn( mDn->text() );
391 if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) );
392 if ( mSizeLimit && mSizeLimit->value() != 0 )
393 _url.setExtension( "x-sizelimit", TQString::number( mSizeLimit->value() ) );
394 if ( mTimeLimit && mTimeLimit->value() != 0 )
395 _url.setExtension( "x-timelimit", TQString::number( mTimeLimit->value() ) );
396 if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls","" );
397 if ( mFilter && !mFilter->text().isEmpty() )
398 _url.setFilter( mFilter->text() );
399 if ( mSASL && mSASL->isChecked() ) {
400 _url.setExtension( "x-sasl", "" );
401 _url.setExtension( "x-mech", mMech->currentText() );
402 if ( mBindDN && !mBindDN->text().isEmpty() )
403 _url.setExtension( "bindname", mBindDN->text() );
404 if ( mRealm && !mRealm->text().isEmpty() )
405 _url.setExtension( "x-realm", mRealm->text() );
406 }
407 return ( _url );
408}
409
410void LdapConfigWidget::setUser( const TQString &user )
411{
412 if ( mUser ) mUser->setText( user );
413}
414
415TQString LdapConfigWidget::user() const
416{
417 return ( mUser ? mUser->text() : TQString::null );
418}
419
420void LdapConfigWidget::setPassword( const TQString &password )
421{
422 if ( mPassword ) mPassword->setText( password );
423}
424
425TQString LdapConfigWidget::password() const
426{
427 return ( mPassword ? mPassword->text() : TQString::null );
428}
429
430void LdapConfigWidget::setBindDN( const TQString &binddn )
431{
432 if ( mBindDN ) mBindDN->setText( binddn );
433}
434
435TQString LdapConfigWidget::bindDN() const
436{
437 return ( mBindDN ? mBindDN->text() : TQString::null );
438}
439
440void LdapConfigWidget::setRealm( const TQString &realm )
441{
442 if ( mRealm ) mRealm->setText( realm );
443}
444
445TQString LdapConfigWidget::realm() const
446{
447 return ( mRealm ? mRealm->text() : TQString::null );
448}
449
450void LdapConfigWidget::setHost( const TQString &host )
451{
452 if ( mHost ) mHost->setText( host );
453}
454
455TQString LdapConfigWidget::host() const
456{
457 return ( mHost ? mHost->text() : TQString::null );
458}
459
460void LdapConfigWidget::setPort( int port )
461{
462 if ( mPort ) mPort->setValue( port );
463}
464
465int LdapConfigWidget::port() const
466{
467 return ( mPort ? mPort->value() : 389 );
468}
469
470void LdapConfigWidget::setVer( int ver )
471{
472 if ( mVer ) mVer->setValue( ver );
473}
474
475int LdapConfigWidget::ver() const
476{
477 return ( mVer ? mVer->value() : 3 );
478}
479
480void LdapConfigWidget::setDn( const TQString &dn )
481{
482 if ( mDn ) mDn->setText( dn );
483}
484
485TQString LdapConfigWidget::dn() const
486{
487 return ( mDn ? mDn->text() : TQString::null );
488}
489
490void LdapConfigWidget::setFilter( const TQString &filter )
491{
492 if ( mFilter ) mFilter->setText( filter );
493}
494
495TQString LdapConfigWidget::filter() const
496{
497 return ( mFilter ? mFilter->text() : TQString::null );
498}
499
500void LdapConfigWidget::setMech( const TQString &mech )
501{
502 if ( mMech == 0 ) return;
503 if ( !mech.isEmpty() ) {
504 int i = 0;
505 while ( i < mMech->count() ) {
506 if ( mMech->text( i ) == mech ) break;
507 i++;
508 }
509 if ( i == mMech->count() ) mMech->insertItem( mech );
510 mMech->setCurrentItem( i );
511 }
512}
513
514TQString LdapConfigWidget::mech() const
515{
516 return ( mMech ? mMech->currentText() : TQString::null );
517}
518
519void LdapConfigWidget::setSecNO( bool b )
520{
521 if ( mSecNO ) mSecNO->setChecked( b );
522}
523
524bool LdapConfigWidget::isSecNO() const
525{
526 return ( mSecNO ? mSecNO->isChecked() : true );
527}
528
529void LdapConfigWidget::setSecTLS( bool b )
530{
531 if ( mSecTLS ) mSecTLS->setChecked( b );
532}
533
534bool LdapConfigWidget::isSecTLS() const
535{
536 return ( mSecTLS ? mSecTLS->isChecked() : false );
537}
538
539void LdapConfigWidget::setSecSSL( bool b )
540{
541 if ( mSecSSL ) mSecSSL->setChecked( b );
542}
543
544bool LdapConfigWidget::isSecSSL() const
545{
546 return ( mSecSSL ? mSecSSL->isChecked() : false );
547}
548
549void LdapConfigWidget::setAuthAnon( bool b )
550{
551 if ( mAnonymous ) mAnonymous->setChecked( b );
552}
553
554bool LdapConfigWidget::isAuthAnon() const
555{
556 return ( mAnonymous ? mAnonymous->isChecked() : true );
557}
558
559void LdapConfigWidget::setAuthSimple( bool b )
560{
561 if ( mSimple ) mSimple->setChecked( b );
562}
563
564bool LdapConfigWidget::isAuthSimple() const
565{
566 return ( mSimple ? mSimple->isChecked() : false );
567}
568
569void LdapConfigWidget::setAuthSASL( bool b )
570{
571 if ( mSASL ) mSASL->setChecked( b );
572}
573
574bool LdapConfigWidget::isAuthSASL() const
575{
576 return ( mSASL ? mSASL->isChecked() : false );
577}
578
579void LdapConfigWidget::setSizeLimit( int sizelimit )
580{
581 if ( mSizeLimit ) mSizeLimit->setValue( sizelimit );
582}
583
584int LdapConfigWidget::sizeLimit() const
585{
586 return ( mSizeLimit ? mSizeLimit->value() : 0 );
587}
588
589void LdapConfigWidget::setTimeLimit( int timelimit )
590{
591 if ( mTimeLimit ) mTimeLimit->setValue( timelimit );
592}
593
594int LdapConfigWidget::timeLimit() const
595{
596 return ( mTimeLimit ? mTimeLimit->value() : 0 );
597}
598
599int LdapConfigWidget::flags() const
600{
601 return mFlags;
602}
603
604void LdapConfigWidget::setFlags( int flags )
605{
606 mFlags = flags;
607
608 // First delete all the child widgets.
609 // FIXME: I hope it's correct
610 const TQObjectList ch = childrenListObject();
611 TQObjectList ch2 = ch;
612 TQObject *obj;
613 TQWidget *widget;
614
615 obj = ch2.first();
616 while ( obj != 0 ) {
617 widget = dynamic_cast<TQWidget*> (obj);
618 if ( widget && widget->parent() == this ) {
619 mainLayout->remove( widget );
620 delete ( widget );
621 }
622 obj = ch2.next();
623 }
624 // Re-create child widgets according to the new flags
625 initWidget();
626}
KComboBox
KComboBox::setCurrentItem
void setCurrentItem(const TQString &item, bool insert=false, int index=-1)
KDialog::spacingHint
static int spacingHint()
KLineEdit
KLineEdit::setText
virtual void setText(const TQString &)
KMessageBox::error
static void error(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, int options=Notify)
KProgressDialog
KProgressDialog::progressBar
KProgress * progressBar()
KProgressDialog::setLabel
void setLabel(const TQString &text)
KProgress::setValue
void setValue(int progress)
KProgress::setTotalSteps
void setTotalSteps(int totalSteps)
KProgress::advance
virtual void advance(int offset)
KURL::setUser
void setUser(const TQString &_txt)
KURL::setHost
void setHost(const TQString &_txt)
KURL::setPass
void setPass(const TQString &_txt)
KURL::setPort
void setPort(unsigned short int _p)
KURL::prettyURL
TQString prettyURL(int _trailing=0) const
KURL::setProtocol
void setProtocol(const TQString &_txt)
TDEABC::LDAPUrl
LDAPUrl.
Definition: ldapurl.h:43
TDEABC::LDAPUrl::setScope
void setScope(Scope scope)
Sets the scope part of the LDAP Url.
Definition: ldapurl.h:75
TDEABC::LDAPUrl::setAttributes
void setAttributes(const TQStringList &attributes)
Sets the attributes part of the LDAP Url.
Definition: ldapurl.h:69
TDEABC::LDAPUrl::setDn
void setDn(const TQString &dn)
Sets the the dn part of the LDAP Url.
Definition: ldapurl.cpp:47
TDEABC::LDAPUrl::setFilter
void setFilter(TQString filter)
Sets the filter part of the LDAP Url.
Definition: ldapurl.h:80
TDEABC::LDAPUrl::setExtension
void setExtension(const TQString &key, const Extension &ext)
Sets the specified extension key with the value and criticality in ext.
Definition: ldapurl.cpp:88
TDEABC::LDIF::setLDIF
void setLDIF(const TQByteArray &ldif)
Sets a chunk of LDIF.
Definition: ldif.h:111
TDEABC::LDIF::startParsing
void startParsing()
Starts the parsing of a new LDIF.
Definition: ldif.cpp:354
TDEABC::LDIF::endLDIF
void endLDIF()
Indicates the end of the LDIF file/stream.
Definition: ldif.cpp:344
TDEABC::LDIF::val
const TQByteArray & val() const
Returns the attribute value.
Definition: ldif.h:148
TDEABC::LDIF::nextItem
ParseVal nextItem()
Process the LDIF until a complete item can be returned.
Definition: ldif.cpp:308
TDEABC::LDIF::attr
const TQString & attr() const
Returns the attribute name.
Definition: ldif.h:144
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::~LdapConfigWidget
virtual ~LdapConfigWidget()
Destructs a configuration widget.
Definition: ldapconfigwidget.cpp:66
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
endl
kndbgstream & endl(kndbgstream &s)
kdDebug
kdbgstream kdDebug(int area=0)
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
TDEStdAccel::label
TQString label(StdAccel id)
tdelocale.h

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.9.4
This website is maintained by Timothy Pearson.