xref: /netbsd-src/external/bsd/openldap/dist/contrib/ldapc++/src/LDAPModification.h (revision 549b59ed3ccf0d36d3097190a0db27b770f3a839)
1 /*	$NetBSD: LDAPModification.h,v 1.3 2021/08/14 16:14:49 christos Exp $	*/
2 
3 // $OpenLDAP$
4 /*
5  * Copyright 2000-2021 The OpenLDAP Foundation, All Rights Reserved.
6  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7  */
8 
9 
10 #ifndef LDAP_MODIFICATION_H
11 #define LDAP_MODIFICATION_H
12 
13 #include <ldap.h>
14 #include <LDAPAttribute.h>
15 
16 class LDAPModification{
17 	public:
18 		enum mod_op {OP_ADD, OP_DELETE, OP_REPLACE};
19 
20 		LDAPModification(const LDAPAttribute& attr, mod_op op);
21 		LDAPMod *toLDAPMod() const;
22 
23 		const LDAPAttribute* getAttribute() const;
24 		mod_op getOperation() const;
25 
26 	private:
27 		LDAPAttribute m_attr;
28 		mod_op m_mod_op;
29 
30 };
31 #endif //LDAP_MODIFICATION_H
32 
33