summaryrefslogtreecommitdiffstats
path: root/contrib/ldapc++/src/LDAPExtResult.h
blob: 90e81afbdabe34a6404bebb9a342e3a264f1e1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// $OpenLDAP$
/*
 * Copyright 2000-2022 The OpenLDAP Foundation, All Rights Reserved.
 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 */

#ifndef LDAP_EXT_RESULT_H
#define LDAP_EXT_RESULT_H

#include <ldap.h>

#include <LDAPResult.h>

class LDAPRequest;

/**
 * Object of this class are created by the LDAPMsg::create method if
 * results for an Extended Operation were returned by a LDAP server.
 */
class LDAPExtResult : public LDAPResult {
    public :
        /**
         * Constructor that creates an LDAPExtResult-object from the C-API
         * structures
         */
        LDAPExtResult(const LDAPRequest* req, LDAPMessage* msg);

        /**
         * The Destructor
         */
        virtual ~LDAPExtResult();

        /**
         * @returns The OID of the Extended Operation that has returned
         *          this result. 
         */
        const std::string& getResponseOid() const;

        /**
         * @returns If the result contained data this method will return
         *          the data to the caller as a std::string.
         */
        const std::string& getResponse() const;

    private:
        std::string m_oid;
        std::string m_data;
};

#endif // LDAP_EXT_RESULT_H