From b527294153be3b79563c82c66102adc0004736c0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 19:54:12 +0200 Subject: Adding upstream version 2.6.7+dfsg. Signed-off-by: Daniel Baumann --- contrib/ldapc++/src/LDAPSearchResults.h | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 contrib/ldapc++/src/LDAPSearchResults.h (limited to 'contrib/ldapc++/src/LDAPSearchResults.h') diff --git a/contrib/ldapc++/src/LDAPSearchResults.h b/contrib/ldapc++/src/LDAPSearchResults.h new file mode 100644 index 0000000..f675de1 --- /dev/null +++ b/contrib/ldapc++/src/LDAPSearchResults.h @@ -0,0 +1,56 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2022 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDAP_SEARCH_RESULTS_H +#define LDAP_SEARCH_RESULTS_H + +#include +#include +#include +#include +#include +#include + +class LDAPResult; + +/** + * The class stores the results of a synchronous SEARCH-Operation + */ +class LDAPSearchResults{ + public: + /** + * Default-Constructor + */ + LDAPSearchResults(); + + /** + * For internal use only. + * + * This method reads Search result entries from a + * LDAPMessageQueue-object. + * @param msg The message queue to read + */ + LDAPResult* readMessageQueue(LDAPMessageQueue* msg); + + /** + * The method is used by the client-application to read the + * result entries of the SEARCH-Operation. Every call of this + * method returns one entry. If all entries were read it return 0. + * @throws LDAPReferralException If a Search Reference was + * returned by the server + * @returns A LDAPEntry-object as a result of a SEARCH-Operation or + * 0 if no more entries are there to return. + */ + LDAPEntry* getNext(); + private : + LDAPEntryList entryList; + LDAPReferenceList refList; + LDAPEntryList::const_iterator entryPos; + LDAPReferenceList::const_iterator refPos; +}; +#endif //LDAP_SEARCH_RESULTS_H + + -- cgit v1.2.3