diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 11:11:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 11:11:40 +0000 |
commit | 7731832751ab9f3c6ddeb66f186d3d7fa1934a6d (patch) | |
tree | e91015872543a59be2aad26c2fea02e41b57005d /contrib/ldapc++/src/LDAPMessageQueue.h | |
parent | Initial commit. (diff) | |
download | openldap-7731832751ab9f3c6ddeb66f186d3d7fa1934a6d.tar.xz openldap-7731832751ab9f3c6ddeb66f186d3d7fa1934a6d.zip |
Adding upstream version 2.4.57+dfsg.upstream/2.4.57+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/ldapc++/src/LDAPMessageQueue.h')
-rw-r--r-- | contrib/ldapc++/src/LDAPMessageQueue.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/contrib/ldapc++/src/LDAPMessageQueue.h b/contrib/ldapc++/src/LDAPMessageQueue.h new file mode 100644 index 0000000..ca0e957 --- /dev/null +++ b/contrib/ldapc++/src/LDAPMessageQueue.h @@ -0,0 +1,72 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2021 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + + +#ifndef LDAP_MESSAGE_QUEUE_H +#define LDAP_MESSAGE_QUEUE_H + +#include <stack> + +#include <LDAPUrlList.h> +#include <LDAPMessage.h> + +class LDAPAsynConnection; +class LDAPRequest; +class LDAPSearchRequest; +class LDAPUrl; +typedef std::stack<LDAPRequest*> LDAPRequestStack; +typedef std::list<LDAPRequest*> LDAPRequestList; + +/** + * This class is created for the asynchronous LDAP-operations. And can be + * used by the client to retrieve the results of an operation. + */ +class LDAPMessageQueue{ + public : + + /** + * This creates a new LDAPMessageQueue. For a LDAP-request + * + * @param conn The Request for that is queue can be used to get + * the results. + */ + LDAPMessageQueue(LDAPRequest *conn); + /** + * Destructor + */ + ~LDAPMessageQueue(); + + /** + * This method reads exactly one Message from the results of a + * Request. + * @throws LDAPException + * @return A pointer to an object of one of the classes that were + * derived from LDAPMsg. The user has to cast it to the + * correct type (e.g. LDAPResult or LDAPSearchResult) + */ + LDAPMsg* getNext(); + + /** + * For internat use only. + * + * The method is used to start the automatic referral chasing + */ + LDAPRequest* chaseReferral(LDAPMsg* ref); + + /** + * For internal use only + * + * The referral chasing algorithm needs this method to see the + * currently active requests. + */ + LDAPRequestStack* getRequestStack(); + + private : + LDAPRequestStack m_activeReq; + LDAPRequestList m_issuedReq; +}; +#endif //ifndef LDAP_MESSAGE_QUEUE_H + |