2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
13 * This class is used to store Controls. Controls are a mechanism to extend
14 * and modify LDAP-Operations.
21 LDAPCtrl(const LDAPCtrl& c);
25 * @param oid: The Object Identifier of the Control
26 * @param critical: "true" if the Control should be handled
27 * critical by the server.
28 * @param data: If there is data for the control, put it here.
29 * @param length: The length of the data field
31 LDAPCtrl(const char *oid, bool critical, const char *data=0,
36 * @param oid: The Object Identifier of the Control
37 * @param critical: "true" if the Control should be handled
38 * critical by the server.
39 * @param data: If there is data for the control, put it here.
41 LDAPCtrl(const std::string& oid, bool critical=false,
42 const std::string& data=std::string());
45 * Creates a copy of the Control that "ctrl is pointing to
47 LDAPCtrl(const LDAPControl* ctrl);
55 * @return The OID of the control
57 std::string getOID() const;
60 * @return The Data of the control as a std::string-Objekt
62 std::string getData() const;
65 * @return "true" if the control is critical
67 bool isCritical() const;
70 * For internal use only.
72 * Translates the control to a LDAPControl-structure as needed by
75 LDAPControl* getControlStruct() const;
76 static void freeLDAPControlStruct(LDAPControl *ctrl);
84 #endif //LDAP_CONTROL_H