1/*	$NetBSD: LDAPExtResult.h,v 1.1.1.2 2010/03/08 02:14:14 lukem Exp $	*/
2
3// OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPExtResult.h,v 1.4.10.1 2008/04/14 23:09:26 quanah Exp
4/*
5 * Copyright 2000, 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
16class 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 */
22class 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