3 * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
12 #include <LDAPControlSet.h>
16 * This class represents any type of LDAP- Message returned
19 * This class is never not instantiated directly. Only
20 * its subclasses are used. The main feature of this class is the
21 * static method create() (see below)
25 //public Constants defining the response message types
26 static const int BIND_RESPONSE=LDAP_RES_BIND;
27 static const int SEARCH_ENTRY=LDAP_RES_SEARCH_ENTRY;
28 static const int SEARCH_DONE=LDAP_RES_SEARCH_RESULT;
29 static const int SEARCH_REFERENCE=LDAP_RES_SEARCH_REFERENCE;
30 static const int MODIFY_RESPONSE=LDAP_RES_MODIFY;
31 static const int ADD_RESPONSE=LDAP_RES_ADD;
32 static const int DEL_RESPONSE=LDAP_RES_DELETE;
33 static const int MODDN_RESPONSE=LDAP_RES_MODDN;
34 static const int COMPARE_RESPONSE=LDAP_RES_COMPARE;
35 static const int EXTENDED_RESPONSE=LDAP_RES_EXTENDED;
36 //public Constants defining the request message types
37 static const int BIND_REQUEST=LDAP_REQ_BIND;
38 static const int UNBIND_REQUEST=LDAP_REQ_UNBIND;
39 static const int SEARCH_REQUEST=LDAP_REQ_SEARCH;
40 static const int MODIFY_REQUEST=LDAP_REQ_MODIFY;
41 static const int ADD_REQUEST=LDAP_REQ_ADD;
42 static const int DELETE_REQUEST=LDAP_REQ_DELETE;
43 static const int MODRDN_REQUEST=LDAP_REQ_MODRDN;
44 static const int COMPARE_REQUEST=LDAP_REQ_COMPARE;
45 static const int ABANDON_REQUEST=LDAP_REQ_ABANDON;
46 static const int EXTENDED_REQUEST=LDAP_REQ_EXTENDED;
49 * The destructor has no implemenation, because this is an abstract
55 * This method is used by the library to parse the results returned
58 * Based on msgtype-Value of the *msg-Parameter this method creates
59 * an Object of one of the subtypes of LDAPMsg (e.g. LDAPSearchResult
60 * or LDAPResult) that represents the same Message as the
61 * *msg-Parameter. *msg is e.g. a Message returned by the C-API's
63 * @param req The LDAPRequest-object this result message is
65 * @param msg The LDAPMessage-structure from the C-API that
66 * contains the LDAP-message to parse.
67 * @return An Object of one of the subtypes of this class. It
68 * contains the parsed LDAP-message.
70 static LDAPMsg* create(const LDAPRequest *req, LDAPMessage *msg);
73 * @returns The Type of message that this object contains. Possible
78 * SEARCH_REFERENCE <BR>
79 * MODIFY_RESPONSE <BR>
83 * COMPARE_RESPONSE <BR>
84 * EXTENDED_REPONSE <BR>
89 * @returns The message-ID that the C-API return for the
95 * @returns If any Control was sent back by the server this method
96 * returns true. Otherwise false is returned.
98 bool hasControls() const;
101 * @returns Server controls that were sent back by the server.
102 * @note This feature is not test well yet.
104 const LDAPControlSet& getSrvControls() const;
108 * This constructor make a copy of a LDAPMsg-pointer. The object
109 * itself (no the pointer) is copied.
110 * Only for internal use.
112 LDAPMsg(LDAPMessage *msg);
113 LDAPMsg(int msgType, int msgID);
116 * This attribute stores Server-Control that were returned with the
119 LDAPControlSet m_srvControls;
127 #endif //ifndef LDAP_MSG_H