diff options
author | Timothy Pearson <[email protected]> | 2013-01-27 15:11:21 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-27 15:11:21 -0600 |
commit | 472156a41b1348c714986c772759ad950fffbe75 (patch) | |
tree | 86369dab3bbe3d52c49051665bdfb49b9dfc16e3 /tdeioslave/ldap/tdeio_ldap.h | |
parent | 3e891e81335e5243583dab27faeebf001b8139a6 (diff) | |
download | tdebase-472156a41b1348c714986c772759ad950fffbe75.tar.gz tdebase-472156a41b1348c714986c772759ad950fffbe75.zip |
Rename kioslaves
Diffstat (limited to 'tdeioslave/ldap/tdeio_ldap.h')
-rw-r--r-- | tdeioslave/ldap/tdeio_ldap.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tdeioslave/ldap/tdeio_ldap.h b/tdeioslave/ldap/tdeio_ldap.h new file mode 100644 index 000000000..f3bd61fe5 --- /dev/null +++ b/tdeioslave/ldap/tdeio_ldap.h @@ -0,0 +1,65 @@ +#ifndef __LDAP_H__ +#define __LDAP_H__ + +#include <tqstring.h> +#include <tqvaluelist.h> + +#include <tdeio/slavebase.h> +#include <tdeio/authinfo.h> + +#define LDAP_DEPRECATED 1 /* Needed for ldap_simple_bind_s with openldap >= 2.3.x */ +#include <lber.h> +#include <ldap.h> +#include <kabc/ldapurl.h> + +class LDAPProtocol : public TDEIO::SlaveBase +{ + public: + LDAPProtocol( const TQCString &protocol, const TQCString &pool, const TQCString &app ); + virtual ~LDAPProtocol(); + + virtual void setHost( const TQString& host, int port, + const TQString& user, const TQString& pass ); + + virtual void openConnection(); + virtual void closeConnection(); + + virtual void get( const KURL& url ); + virtual void stat( const KURL& url ); + virtual void listDir( const KURL& url ); + virtual void del( const KURL& url, bool isfile ); + virtual void put( const KURL& url, int permissions, bool overwrite, bool resume ); + + int saslInteract( void *in ); + + private: + + TQString mHost; + int mPort; + TQString mUser; + TQString mPassword; + LDAP *mLDAP; + int mVer, mSizeLimit, mTimeLimit; + bool mTLS; + bool mAuthSASL; + TQString mMech,mRealm,mBindName; + bool mCancel, mFirstAuth; + + void controlsFromMetaData( LDAPControl ***serverctrls, + LDAPControl ***clientctrls ); + void addControlOp( LDAPControl ***pctrls, const TQString &oid, + const TQByteArray &value, bool critical ); + void addModOp( LDAPMod ***pmods, int mod_type, + const TQString &attr, const TQByteArray &value ); + void LDAPEntry2UDSEntry( const TQString &dn, TDEIO::UDSEntry &entry, + const KABC::LDAPUrl &usrc, bool dir=false ); + int asyncSearch( KABC::LDAPUrl &usrc ); + + TQCString LDAPEntryAsLDIF( LDAPMessage *msg ); + void LDAPErr( const KURL &url, int err = LDAP_SUCCESS ); + void changeCheck( KABC::LDAPUrl &url ); + + void fillAuthInfo( TDEIO::AuthInfo &info ); +}; + +#endif |