3 * Copyright 2000-2011 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
14 * This class is used to store Controls. Controls are a mechanism to extend
15 * and modify LDAP-Operations.
21 * @param oid: The Object Identifier of the Control
22 * @param critical: "true" if the Control should be handled
23 * critical by the server.
24 * @param data: If there is data for the control, put it here.
25 * @param length: The length of the data field
27 LDAPCtrl(const char *oid, bool critical=false, const char *data=0,
32 * @param oid: The Object Identifier of the Control
33 * @param critical: "true" if the Control should be handled
34 * critical by the server.
35 * @param data: If there is data for the control, put it here.
37 LDAPCtrl(const std::string& oid, bool critical,
38 const std::string& data);
41 * Creates a copy of the Control that "ctrl is pointing to
43 LDAPCtrl(const LDAPControl* ctrl);
51 * @return The OID of the control
53 std::string getOID() const;
56 * @return true if there is no "Control Value" (there is a
57 * difference between no and an empty control value)
62 * @return The Data of the control as a std::string-Object
64 std::string getData() const;
67 * @return "true" if the control is critical
69 bool isCritical() const;
72 * For internal use only.
74 * Translates the control to a LDAPControl-structure as needed by
77 LDAPControl* getControlStruct() const;
78 static void freeLDAPControlStruct(LDAPControl *ctrl);
87 #endif //LDAP_CONTROL_H