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

tdeabc

  • tdeabc
  • plugins
  • ldaptdeio
resourceldaptdeio.h
1 /*
2  This file is part of libtdeabc.
3  Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4  Copyright (c) 2004 Szombathelyi György <gyurco@freemail.hu>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KABC_RESOURCELDAP_H
23 #define KABC_RESOURCELDAP_H
24 
25 #include <tdeabc/resource.h>
26 #include <tdeabc/ldif.h>
27 #include <tdeio/job.h>
28 
29 class TDEConfig;
30 
31 namespace TDEABC {
32 
33 class KABC_EXPORT ResourceLDAPTDEIO : public Resource
34 {
35  TQ_OBJECT
36 
37  public:
38  enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always };
39 
40  ResourceLDAPTDEIO( const TDEConfig* );
41  virtual ~ResourceLDAPTDEIO();
45  virtual void init();
46 
47  virtual void writeConfig( TDEConfig* );
48 
49  virtual bool doOpen();
50  virtual void doClose();
51 
52  virtual Ticket *requestSaveTicket();
53  virtual void releaseSaveTicket( Ticket* );
54 
55  virtual bool readOnly() const { return Resource::readOnly(); }
56  virtual void setReadOnly( bool value );
57 
58  virtual bool load();
59  virtual bool asyncLoad();
60  virtual bool save( Ticket * ticket );
61  virtual bool asyncSave( Ticket * ticket );
62 
63  virtual void removeAddressee( const Addressee& addr );
64 
65  void setUser( const TQString &user );
66  TQString user() const;
67 
68  void setPassword( const TQString &password );
69  TQString password() const;
70 
71  void setRealm( const TQString &realm );
72  TQString realm() const;
73 
74  void setBindDN( const TQString &binddn );
75  TQString bindDN() const;
76 
77  void setDn( const TQString &dn );
78  TQString dn() const;
79 
80  void setHost( const TQString &host );
81  TQString host() const;
82 
83  void setPort( int port );
84  int port() const;
85 
86  void setVer( int ver );
87  int ver() const;
88 
89  void setSizeLimit( int sizelimit );
90  int sizeLimit();
91 
92  void setTimeLimit( int timelimit );
93  int timeLimit();
94 
95  void setFilter( const TQString &filter );
96  TQString filter() const;
97 
98  void setIsAnonymous( bool value );
99  bool isAnonymous() const;
100 
101  void setAttributes( const TQMap<TQString, TQString> &attributes );
102  TQMap<TQString, TQString> attributes() const;
103 
104  void setRDNPrefix( int value );
105  int RDNPrefix() const;
106 
107  void setIsTLS( bool value );
108  bool isTLS() const ;
109 
110  void setIsSSL( bool value );
111  bool isSSL() const;
112 
113  void setIsSubTree( bool value );
114  bool isSubTree() const ;
115 
116  void setIsSASL( bool value );
117  bool isSASL() const ;
118 
119  void setMech( const TQString &mech );
120  TQString mech() const;
121 
122  void setCachePolicy( int pol );
123  int cachePolicy() const;
124 
125  void setAutoCache( bool value );
126  bool autoCache();
127 
128  TQString cacheDst() const;
129 
130 protected slots:
131  void entries( TDEIO::Job*, const TDEIO::UDSEntryList& );
132  void data( TDEIO::Job*, const TQByteArray& );
133  void result( TDEIO::Job* );
134  void listResult( TDEIO::Job* );
135  void syncLoadSaveResult( TDEIO::Job* );
136  void saveResult( TDEIO::Job* );
137  void saveData( TDEIO::Job*, TQByteArray& );
138  void loadCacheResult( TDEIO::Job* );
139 
140  private:
141  TQString mUser;
142  TQString mPassword;
143  TQString mDn;
144  TQString mHost;
145  TQString mFilter;
146  int mPort;
147  bool mAnonymous;
148  TQMap<TQString, TQString> mAttributes;
149 
150  KURL mLDAPUrl;
151  int mGetCounter; //KDE 4: remove
152  bool mErrorOccured; //KDE 4: remove
153  TQString mErrorMsg;
154  TQMap<TDEIO::Job*, TQByteArray> mJobMap; //KDE 4: remove
155 
156  TDEIO::Job *loadFromCache();
157  void createCache();
158  void activateCache();
159  void enter_loop();
160  TQCString addEntry( const TQString &attr, const TQString &value, bool mod );
161  TQString findUid( const TQString &uid );
162  bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr,
163  const TQString &olddn );
164 
165  class ResourceLDAPTDEIOPrivate;
166  ResourceLDAPTDEIOPrivate *d;
167 };
168 
169 }
170 
171 #endif
KURL
TDEConfig
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
TDEStdAccel::save
const TDEShortcut & save()

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