3 * Copyright 2000-2011 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
8 #ifndef LDAP_MESSAGE_QUEUE_H
9 #define LDAP_MESSAGE_QUEUE_H
13 #include <LDAPUrlList.h>
14 #include <LDAPMessage.h>
16 class LDAPAsynConnection;
18 class LDAPSearchRequest;
20 typedef std::stack<LDAPRequest*> LDAPRequestStack;
21 typedef std::list<LDAPRequest*> LDAPRequestList;
24 * This class is created for the asynchronous LDAP-operations. And can be
25 * used by the client to retrieve the results of an operation.
27 class LDAPMessageQueue{
31 * This creates a new LDAPMessageQueue. For a LDAP-request
33 * @param conn The Request for that is queue can be used to get
36 LDAPMessageQueue(LDAPRequest *conn);
43 * This method reads exactly one Message from the results of a
45 * @throws LDAPException
46 * @return A pointer to an object of one of the classes that were
47 * derived from LDAPMsg. The user has to cast it to the
48 * correct type (e.g. LDAPResult or LDAPSearchResult)
53 * For internat use only.
55 * The method is used to start the automatic referral chasing
57 LDAPRequest* chaseReferral(LDAPMsg* ref);
60 * For internal use only
62 * The referral chasing algorithm needs this method to see the
63 * currently active requests.
65 LDAPRequestStack* getRequestStack();
68 LDAPRequestStack m_activeReq;
69 LDAPRequestList m_issuedReq;
71 #endif //ifndef LDAP_MESSAGE_QUEUE_H