2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 // $Id: LDAPModification.cpp,v 1.3 2000/08/31 17:43:49 rhafer Exp $
8 #include "LDAPModification.h"
10 LDAPModification::LDAPModification(const LDAPAttribute& attr, mod_op op){
15 LDAPMod *LDAPModification::toLDAPMod() const {
16 LDAPMod* ret=m_attr.toLDAPMod();
18 //The mod_op value of the LDAPMod-struct needs to be ORed with the right
19 // LDAP_MOD_* constant to preserve the BIN-flag (see CAPI-draft for explanation of
20 // the LDAPMod struct)
23 ret->mod_op |= LDAP_MOD_ADD;
26 ret->mod_op |= LDAP_MOD_DELETE;
29 ret->mod_op |= LDAP_MOD_REPLACE;