1
// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPModification.cpp,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp $
3
* Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
4
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
8
#include "LDAPModification.h"
13
LDAPModification::LDAPModification(const LDAPAttribute& attr, mod_op op){
14
DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModification::LDAPModification()" << endl);
15
DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER,
16
" attr:" << attr << endl);
21
LDAPMod* LDAPModification::toLDAPMod() const {
22
DEBUG(LDAP_DEBUG_TRACE,"LDAPModification::toLDAPMod()" << endl);
23
LDAPMod* ret=m_attr.toLDAPMod();
25
//The mod_op value of the LDAPMod-struct needs to be ORed with the right
26
// LDAP_MOD_* constant to preserve the BIN-flag (see CAPI-draft for
27
// explanation of the LDAPMod struct)
30
ret->mod_op |= LDAP_MOD_ADD;
33
ret->mod_op |= LDAP_MOD_DELETE;
36
ret->mod_op |= LDAP_MOD_REPLACE;