summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/ldap/resourceldap.cpp
Unidiff
Diffstat (limited to 'kabc/plugins/ldap/resourceldap.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/ldap/resourceldap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp
index 4b9dede..198e80a 100644
--- a/kabc/plugins/ldap/resourceldap.cpp
+++ b/kabc/plugins/ldap/resourceldap.cpp
@@ -15,58 +15,58 @@
15 You should have received a copy of the GNU Library General Public License 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 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <kdebug.h> 28#include <kdebug.h>
29#include <kglobal.h> 29#include <kglobal.h>
30#include <klineedit.h> 30#include <klineedit.h>
31#include <klocale.h> 31#include <klocale.h>
32#include <kconfig.h> 32#include <kconfig.h>
33#include <kstringhandler.h> 33#include <kstringhandler.h>
34 34
35#include <stdlib.h> 35#include <stdlib.h>
36 36
37#include "resourceldap.h" 37#include "resourceldap.h"
38#include "resourceldapconfig.h" 38#include "resourceldapconfig.h"
39#include "syncwidget.h" 39#include "syncprefwidget.h"
40 40
41using namespace KABC; 41using namespace KABC;
42 42
43extern "C" 43extern "C"
44{ 44{
45//US void *init_kabc_ldap() 45//US void *init_kabc_ldap()
46 void *init_microkabc_ldap() 46 void *init_microkabc_ldap()
47 { 47 {
48 return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, KRES::SyncWidget>(); 48 return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidget>();
49 } 49 }
50} 50}
51 51
52void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); 52void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value );
53 53
54 54
55ResourceLDAP::ResourceLDAP( const KConfig *config, bool syncable ) 55ResourceLDAP::ResourceLDAP( const KConfig *config, bool syncable )
56 : Resource( config, syncable ), mPort( 389 ), mLdap( 0 ) 56 : Resource( config, syncable ), mPort( 389 ), mLdap( 0 )
57{ 57{
58 KConfig *cfg = (KConfig *)config; 58 KConfig *cfg = (KConfig *)config;
59 if ( cfg ) { 59 if ( cfg ) {
60 mUser = cfg->readEntry( "LdapUser" ); 60 mUser = cfg->readEntry( "LdapUser" );
61 mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) ); 61 mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) );
62 mDn = cfg->readEntry( "LdapDn" ); 62 mDn = cfg->readEntry( "LdapDn" );
63 mHost = cfg->readEntry( "LdapHost" ); 63 mHost = cfg->readEntry( "LdapHost" );
64 mPort = cfg->readNumEntry( "LdapPort", 389 ); 64 mPort = cfg->readNumEntry( "LdapPort", 389 );
65 mFilter = cfg->readEntry( "LdapFilter" ); 65 mFilter = cfg->readEntry( "LdapFilter" );
66 mAnonymous = cfg->readBoolEntry( "LdapAnonymous" ); 66 mAnonymous = cfg->readBoolEntry( "LdapAnonymous" );
67 67
68 QStringList attributes = cfg->readListEntry( "LdapAttributes" ); 68 QStringList attributes = cfg->readListEntry( "LdapAttributes" );
69 for ( uint pos = 0; pos < attributes.count(); pos += 2 ) 69 for ( uint pos = 0; pos < attributes.count(); pos += 2 )
70 mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] ); 70 mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] );
71 } 71 }
72 72