]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPConnection.h
Merge remote branch 'origin/mdb.master'
[openldap] / contrib / ldapc++ / src / LDAPConnection.h
index 93acf618cc4c0cecdc95e5cd383c794a318f8e2f..5428e8e230b6ac9efe302068b322b4bcba82bf15 100644 (file)
@@ -1,5 +1,6 @@
+// $OpenLDAP$
 /*
- * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -71,10 +72,11 @@ class LDAPConnection : private LDAPAsynConnection {
         /**
          * Start TLS on this connection.  This isn't in the constructor,
          * because it could fail (i.e. server doesn't have SSL cert, client
-         * api wasn't compiled against OpenSSL, etc.).  If you need TLS,
-         * then you should error if this call fails with an error code.
+         * api wasn't compiled against OpenSSL, etc.). 
+         * @throws LDAPException if the TLS Layer could not be setup 
+         * correctly
          */
-        int start_tls();
+        void start_tls();
 
         /** 
          * Performs a simple authentication with the server
@@ -87,6 +89,10 @@ class LDAPConnection : private LDAPAsynConnection {
          */
         void bind(const std::string& dn="", const std::string& passwd="",
                 LDAPConstraints* cons=0);
+        void saslInteractiveBind(const std::string& mech,
+                int flags=0,
+                SaslInteractionHandler *sih=0,
+                const LDAPConstraints *cons=0);
         
         /**
          * Performs the UNBIND-operation on the destination server
@@ -229,22 +235,7 @@ class LDAPConnection : private LDAPAsynConnection {
         void setConstraints(LDAPConstraints *cons);
         
         const LDAPConstraints* getConstraints() const ;
-
-        /**
-         * Turn on caching, maxmem is in MB and timeout is in seconds.
-         * maxmem can be zero if you want to restrict caching by timeout only.
-         */
-        int enableCache(long timeout, long maxmem);
-        /// disable caching.
-        void disableCache();
-        /// is cacheEnabled?
-        bool getCacheEnabled();
-        /// uncache a specific dn.  Used internally by methods that write.
-        void uncache_entry(std::string &dn);
-        /// used to clear the cache.  Probably should be used after creating
-        /// an object that a cached search should find.
-        void flush_cache();
-
+        TlsOptions getTlsOptions() const;
 };
 
 #endif //LDAP_CONNECTION_H