kabc
resourceldapkio.h
00001 /* 00002 This file is part of libkabc. 00003 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 00004 Copyright (c) 2004 Szombathelyi György <gyurco@freemail.hu> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KABC_RESOURCELDAPKIO_H 00023 #define KABC_RESOURCELDAPKIO_H 00024 00025 #include <kio/job.h> 00026 #include "kabc/resource.h" 00027 00028 namespace KABC { 00029 00030 class KABC_LDAPKIO_EXPORT ResourceLDAPKIO : public Resource 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 enum CachePolicy { 00036 Cache_No, 00037 Cache_NoConnection, 00038 Cache_Always 00039 }; 00040 00041 ResourceLDAPKIO(); 00042 explicit ResourceLDAPKIO( const KConfigGroup &group ); 00043 virtual ~ResourceLDAPKIO(); 00047 virtual void init(); 00048 00049 virtual void writeConfig( KConfigGroup &group ); 00050 00051 virtual bool doOpen(); 00052 virtual void doClose(); 00053 00054 virtual Ticket *requestSaveTicket(); 00055 virtual void releaseSaveTicket( Ticket *ticket ); 00056 00057 virtual bool readOnly() const { return Resource::readOnly(); } 00058 virtual void setReadOnly( bool value ); 00059 00060 virtual bool load(); 00061 virtual bool asyncLoad(); 00062 virtual bool save( Ticket *ticket ); 00063 virtual bool asyncSave( Ticket *ticket ); 00064 00065 virtual void removeAddressee( const Addressee &addr ); 00066 00067 void setUser( const QString &user ); 00068 QString user() const; 00069 00070 void setPassword( const QString &password ); 00071 QString password() const; 00072 00073 void setRealm( const QString &realm ); 00074 QString realm() const; 00075 00076 void setBindDN( const QString &binddn ); 00077 QString bindDN() const; 00078 00079 void setDn( const QString &dn ); 00080 QString dn() const; 00081 00082 void setHost( const QString &host ); 00083 QString host() const; 00084 00085 void setPort( int port ); 00086 int port() const; 00087 00088 void setVer( int ver ); 00089 int ver() const; 00090 00091 void setSizeLimit( int sizelimit ); 00092 int sizeLimit(); 00093 00094 void setTimeLimit( int timelimit ); 00095 int timeLimit(); 00096 00097 void setFilter( const QString &filter ); 00098 QString filter() const; 00099 00100 void setIsAnonymous( bool value ); 00101 bool isAnonymous() const; 00102 00103 void setAttributes( const QMap<QString, QString> &attributes ); 00104 QMap<QString, QString> attributes() const; 00105 00106 void setRDNPrefix( int value ); 00107 int RDNPrefix() const; 00108 00109 void setIsTLS( bool value ); 00110 bool isTLS() const; 00111 00112 void setIsSSL( bool value ); 00113 bool isSSL() const; 00114 00115 void setIsSubTree( bool value ); 00116 bool isSubTree() const; 00117 00118 void setIsSASL( bool value ); 00119 bool isSASL() const; 00120 00121 void setMech( const QString &mech ); 00122 QString mech() const; 00123 00124 void setCachePolicy( int pol ); 00125 int cachePolicy() const; 00126 00127 void setAutoCache( bool value ); 00128 bool autoCache(); 00129 00130 QString cacheDst() const; 00131 00132 protected Q_SLOTS: 00133 void entries( KIO::Job *job, const KIO::UDSEntryList &list ); 00134 void data( KIO::Job *job, const QByteArray &data ); 00135 void result( KJob *job ); 00136 void listResult( KJob *job ); 00137 void syncLoadSaveResult( KJob *job ); 00138 void saveResult( KJob *job ); 00139 void saveData( KIO::Job *job, QByteArray &data ); 00140 void loadCacheResult( KJob *job ); 00141 00142 Q_SIGNALS: 00143 void leaveModality(); 00144 00145 private: 00146 class Private; 00147 Private *const d; 00148 }; 00149 00150 } 00151 00152 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:26:07 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:26:07 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.