author | ulf69 <ulf69> | 2004-10-13 21:27:10 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-13 21:27:10 (UTC) |
commit | 737183a5abd7d7b02048e8a939bafd0a8e803918 (patch) (side-by-side diff) | |
tree | ddacf864a06a6669911b1d48862e564399eeb33b /kabc/plugins/ldap/resourceldap.cpp | |
parent | 7bb6c5f55d29ad4632b1f5c7361eee4c0d8b7cb0 (diff) | |
download | kdepimpi-737183a5abd7d7b02048e8a939bafd0a8e803918.zip kdepimpi-737183a5abd7d7b02048e8a939bafd0a8e803918.tar.gz kdepimpi-737183a5abd7d7b02048e8a939bafd0a8e803918.tar.bz2 |
removal of syncresources
Diffstat (limited to 'kabc/plugins/ldap/resourceldap.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/ldap/resourceldap.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp index 17f115d..55c43af 100644 --- a/kabc/plugins/ldap/resourceldap.cpp +++ b/kabc/plugins/ldap/resourceldap.cpp @@ -1,120 +1,119 @@ /* This file is part of libkabc. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <kdebug.h> #include <kglobal.h> #include <klineedit.h> #include <klocale.h> #include <kconfig.h> #include <kstringhandler.h> #include <stdlib.h> #include "resourceldap.h" #include "resourceldapconfig.h" -#include "syncprefwidget.h" using namespace KABC; extern "C" { //US void *init_kabc_ldap() void *init_microkabc_ldap() { - return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidgetContainer>(); + return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig>(); } } void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); -ResourceLDAP::ResourceLDAP( const KConfig *config, bool syncable ) - : Resource( config, syncable ), mPort( 389 ), mLdap( 0 ) +ResourceLDAP::ResourceLDAP( const KConfig *config ) + : Resource( config ), mPort( 389 ), mLdap( 0 ) { KConfig *cfg = (KConfig *)config; if ( cfg ) { mUser = cfg->readEntry( "LdapUser" ); mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) ); mDn = cfg->readEntry( "LdapDn" ); mHost = cfg->readEntry( "LdapHost" ); mPort = cfg->readNumEntry( "LdapPort", 389 ); mFilter = cfg->readEntry( "LdapFilter" ); mAnonymous = cfg->readBoolEntry( "LdapAnonymous" ); QStringList attributes = cfg->readListEntry( "LdapAttributes" ); for ( uint pos = 0; pos < attributes.count(); pos += 2 ) mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] ); } /** If you want to add new attributes, append them here, add a translation string in the ctor of AttributesDialog and handle them in the load() method below. These are the default values from */ if ( mAttributes.count() == 0 ) { mAttributes.insert( "commonName", "cn" ); mAttributes.insert( "formattedName", "displayName" ); mAttributes.insert( "familyName", "sn" ); mAttributes.insert( "givenName", "givenName" ); mAttributes.insert( "mail", "mail" ); mAttributes.insert( "mailAlias", "" ); mAttributes.insert( "phoneNumber", "telephoneNumber" ); mAttributes.insert( "uid", "uid" ); } } void ResourceLDAP::writeConfig( KConfig *config ) { Resource::writeConfig( config ); config->writeEntry( "LdapUser", mUser ); config->writeEntry( "LdapPassword", KStringHandler::obscure( mPassword ) ); config->writeEntry( "LdapDn", mDn ); config->writeEntry( "LdapHost", mHost ); config->writeEntry( "LdapPort", mPort ); config->writeEntry( "LdapFilter", mFilter ); config->writeEntry( "LdapAnonymous", mAnonymous ); QStringList attributes; QMap<QString, QString>::Iterator it; for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) attributes << it.key() << it.data(); config->writeEntry( "LdapAttributes", attributes ); } Ticket *ResourceLDAP::requestSaveTicket() { if ( !addressBook() ) { kdDebug(5700) << "no addressbook" << endl; return 0; } return createTicket( this ); } |