2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7 #ifndef LDAP_MESSAGE_QUEUE_H
8 #define LDAP_MESSAGE_QUEUE_H
12 #include <LDAPUrlList.h>
13 #include <LDAPMessage.h>
15 class LDAPAsynConnection;
17 class LDAPSearchRequest;
19 typedef std::stack<LDAPRequest*> LDAPRequestStack;
20 typedef std::list<LDAPRequest*> LDAPRequestList;
23 * This class is created for the asynchronous LDAP-operations. And can be
24 * used by the client to retrieve the results of an operation.
26 class LDAPMessageQueue{
30 * This creates a new LDAPMessageQueue. For a LDAP-request
32 * @param conn The Request for that is queue can be used to get
35 LDAPMessageQueue(LDAPRequest *conn);
42 * This method reads exactly one Message from the results of a
44 * @throws LDAPException
45 * @return A pointer to an object of one of the classes that were
46 * derived from LDAPMsg. The user has to cast it to the
47 * correct type (e.g. LDAPResult or LDAPSearchResult)
52 * For internat use only.
54 * The method is used to start the automatic referral chasing
56 LDAPRequest* chaseReferral(LDAPMsg* ref);
59 * For internal use only
61 * The referral chasing algorithm needs this method to see the
62 * currently active requests.
64 LDAPRequestStack* getRequestStack();
67 LDAPRequestStack m_activeReq;
68 LDAPRequestList m_issuedReq;
70 #endif //ifndef LDAP_MESSAGE_QUEUE_H