2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
11 #include <LDAPControlSet.h>
15 * This class represents any type of LDAP- Message returned
18 * This class is never not instantiated directly. Only
19 * its subclasses are used. The main feature of this class is the
20 * static method create() (see below)
24 //public Constants defining the Message types
25 static const int BIND_RESPONSE=LDAP_RES_BIND;
26 static const int SEARCH_ENTRY=LDAP_RES_SEARCH_ENTRY;
27 static const int SEARCH_DONE=LDAP_RES_SEARCH_RESULT;
28 static const int SEARCH_REFERENCE=LDAP_RES_SEARCH_REFERENCE;
29 static const int MODIFY_RESPONSE=LDAP_RES_MODIFY;
30 static const int ADD_RESPONSE=LDAP_RES_ADD;
31 static const int DEL_RESPONSE=LDAP_RES_DELETE;
32 static const int MODDN_RESPONSE=LDAP_RES_MODDN;
33 static const int COMPARE_RESPONSE=LDAP_RES_COMPARE;
34 static const int EXTENDED_RESPONSE=LDAP_RES_EXTENDED;
37 * The destructor has no implemenation, because this is an abstract
43 * This method is used by the library to parse the results returned
46 * Based on msgtype-Value of the *msg-Parameter this method creates
47 * an Object of one of the subtypes of LDAPMsg (e.g. LDAPSearchResult
48 * or LDAPResult) that represents the same Message as the
49 * *msg-Parameter. *msg is e.g. a Message returned by the C-API's
51 * @param req The LDAPRequest-object this result message is
53 * @param msg The LDAPMessage-structure from the C-API that
54 * contains the LDAP-message to parse.
55 * @return An Object of one of the subtypes of this class. It
56 * contains the parsed LDAP-message.
58 static LDAPMsg* create(const LDAPRequest *req, LDAPMessage *msg);
61 * @returns The Type of message that this object contains. Possible
66 * SEARCH_REFERENCE <BR>
67 * MODIFY_RESPONSE <BR>
71 * COMPARE_RESPONSE <BR>
72 * EXTENDED_REPONSE <BR>
77 * @returns The message-ID that the C-API return for the
83 * @returns If any Control was sent back by the server this method
84 * returns true. Otherwise false is returned.
86 bool hasControls() const;
89 * @returns Server controls that were sent back by the server.
90 * @note This feature is not test well yet.
92 const LDAPControlSet& getSrvControls() const;
96 * This constructor make a copy of a LDAPMsg-pointer. The object
97 * itself (no the pointer) is copied.
98 * Only for internal use.
100 LDAPMsg(LDAPMessage *msg);
103 * This attribute stores Server-Control that were returned with the
106 LDAPControlSet m_srvControls;
114 #endif //ifndef LDAP_MSG_H