xref: /netbsd-src/external/bsd/openldap/dist/contrib/ldapc++/src/LDAPExtResult.h (revision 549b59ed3ccf0d36d3097190a0db27b770f3a839)
1 /*	$NetBSD: LDAPExtResult.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 #ifndef LDAP_EXT_RESULT_H
10 #define LDAP_EXT_RESULT_H
11 
12 #include <ldap.h>
13 
14 #include <LDAPResult.h>
15 
16 class LDAPRequest;
17 
18 /**
19  * Object of this class are created by the LDAPMsg::create method if
20  * results for an Extended Operation were returned by a LDAP server.
21  */
22 class LDAPExtResult : public LDAPResult {
23     public :
24         /**
25          * Constructor that creates an LDAPExtResult-object from the C-API
26          * structures
27          */
28         LDAPExtResult(const LDAPRequest* req, LDAPMessage* msg);
29 
30         /**
31          * The Destructor
32          */
33         virtual ~LDAPExtResult();
34 
35         /**
36          * @returns The OID of the Extended Operation that has returned
37          *          this result.
38          */
39         const std::string& getResponseOid() const;
40 
41         /**
42          * @returns If the result contained data this method will return
43          *          the data to the caller as a std::string.
44          */
45         const std::string& getResponse() const;
46 
47     private:
48         std::string m_oid;
49         std::string m_data;
50 };
51 
52 #endif // LDAP_EXT_RESULT_H
53