DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER,
" host:" << hostname << endl << " port:" << port << endl);
cur_session=0;
+ m_constr = 0;
this->init(hostname, port);
this->setConstraints(cons);
}
* @param cons A set of constraints that should be used with this
* request
*/
- LDAPMessageQueue* compare(const std::string& dn, const LDAPAttribute& attr,
+ LDAPMessageQueue* compare(const std::string& dn,
+ const LDAPAttribute& attr,
const LDAPConstraints *cons=0);
/** Add an entry to the directory
* destination server, a LDAPException-object contains the
* error that occured.
* @param dn Distiguished Name of the Entry to modify
- * @param modstd::list A set of modification that should be applied
+ * @param modlist A set of modification that should be applied
* to the Entry
* @param cons A set of constraints that should be used with this
* request
*/
- LDAPMessageQueue* modify(const std::string& dn, const LDAPModList *modlist,
+ LDAPMessageQueue* modify(const std::string& dn,
+ const LDAPModList *modlist,
const LDAPConstraints *cons=0);
/** modify the DN of an entry
* @param newParentDN The DN of the new parent entry of the entry
* 0 to keep the old one
*/
- LDAPMessageQueue* rename(const std::string& dn, const std::string& newRDN,
+ LDAPMessageQueue* rename(const std::string& dn,
+ const std::string& newRDN,
bool delOldRDN=false, const std::string& newParentDN="",
const LDAPConstraints* cons=0);
"LDAPDeleteRequest::~LDAPDeleteRequest()" << endl);
// TODO -- flush the entire cache here? or does this invalidate
// cached searches that may have found the deleted entry.
- m_connection->uncache_entry(m_dn);
+ // m_connection->uncache_entry(m_dn);
+ m_connection->flush_cache();
}
LDAPMessageQueue* LDAPDeleteRequest::sendRequest(){
DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPEntry::LDAPEntry()" << endl);
char* tmp=ldap_get_dn(ld->getSessionHandle(),msg);
m_dn=string(tmp);
- free(tmp);
+ ldap_memfree(tmp);
m_attrs = new LDAPAttributeList(ld, msg);
}
m_attrs=attrs;
}
-const string LDAPEntry::getDN() const{
+const string& LDAPEntry::getDN() const{
DEBUG(LDAP_DEBUG_TRACE,"LDAPEntry::getDN()" << endl);
return m_dn;
}
/**
* @returns The current DN of the entry.
*/
- const std::string getDN() const ;
+ const std::string& getDN() const ;
/**
* @returns A const pointer to the attributes of the entry.
/**
* Constructs a LDAPException-object from the parameters
* @param res_code A valid LDAP result code.
- * @param err_std::string An addional error message for the error
+ * @param err_string An addional error message for the error
* that happend (optional)
*/
LDAPException(int res_code, const std::string& err_string=std::string());
public :
/**
- * Constructs an empty std::list.
+ * Constructs an empty list.
*/
LDAPModList();
LDAPModList(const LDAPModList&);
/**
- * Adds one element to the end of the std::list.
+ * Adds one element to the end of the list.
* @param mod The LDAPModification to add to the std::list.
*/
void addModification(const LDAPModification &mod);
/**
- * Translates the std::list to a 0-terminated array of
+ * Translates the list to a 0-terminated array of
* LDAPMod-structures as needed by the C-API
*/
LDAPMod** toLDAPModArray();
"LDAPModifyRequest::~LDAPModifyRequest()" << endl);
delete m_modList;
// flush this entry from cache.
- m_connection->uncache_entry(m_dn);
+ //m_connection->uncache_entry(m_dn);
+ // I think we need to do this... (j.costlow)
+ m_connection->flush_cache();
}
LDAPMessageQueue* LDAPModifyRequest::sendRequest(){
typedef std::list<LDAPSearchReference> RefList;
/**
- * Container class for storing a std::list of Search References
+ * Container class for storing a list of Search References
*
* Used internally only by LDAPSearchResults
*/
typedef RefList::const_iterator const_iterator;
/**
- * Constructs an empty std::list.
+ * Constructs an empty list.
*/
LDAPReferenceList();
public :
/**
- * Creates an object that is initialized with a std::list of URLs
+ * Creates an object that is initialized with a list of URLs
*/
LDAPReferralException(const LDAPUrlList& urls);
public :
/**
- * Create a new object from a c-std::string that contains a LDAP-Url
+ * Create a new object from a c-string that contains a LDAP-Url
*/
LDAPUrl(const char *url);
int getScope() const;
/**
- * @return The complete URL as a std::string
+ * @return The complete URL as a string
*/
const std::string& getURLString() const;
typedef UrlList::const_iterator const_iterator;
/**
- * Constructs an empty std::list.
+ * Constructs an empty list.
*/
LDAPUrlList();
* For internal use only
*
* This constructor is used by the library internally to create a
- * std::list of URLs from a array of C-std::strings that was return by
+ * std::list of URLs from a array of C-strings that was return by
* the C-API
*/
LDAPUrlList(char** urls);
typedef std::list<std::string> ListType;
/**
- * Container class to store multiple std::string-objects
+ * Container class to store multiple string-objects
*/
class StringList{
private:
typedef ListType::const_iterator const_iterator;
/**
- * Constructs an empty std::list.
+ * Constructs an empty list.
*/
StringList();
* For internal use only
*
* This constructor is used by the library internally to create a
- * std::list of std::string from a array for c-Strings (char*)thar was
+ * list of string from a array for c-Strings (char*)thar was
* returned by the C-API
*/
StringList(char** values);