Debian Codegraph @

contrib/ldapc++/src/LDAPSearchResults.h

raw
1 // $OpenLDAP$
2 /*
3 * Copyright 2000-2024 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5 */
6
7 #ifndef LDAP_SEARCH_RESULTS_H
8 #define LDAP_SEARCH_RESULTS_H
9
10 #include <LDAPEntry.h>
11 #include <LDAPEntryList.h>
12 #include <LDAPMessage.h>
13 #include <LDAPMessageQueue.h>
14 #include <LDAPReferenceList.h>
15 #include <LDAPSearchReference.h>
16
17 class LDAPResult;
18
19 /**
20 * The class stores the results of a synchronous SEARCH-Operation
21 */
22 class LDAPSearchResults{
23 public:
24 /**
25 * Default-Constructor
26 */
27 LDAPSearchResults();
28
29 /**
30 * For internal use only.
31 *
32 * This method reads Search result entries from a
33 * LDAPMessageQueue-object.
34 * @param msg The message queue to read
35 */
36 LDAPResult* readMessageQueue(LDAPMessageQueue* msg);
37
38 /**
39 * The method is used by the client-application to read the
40 * result entries of the SEARCH-Operation. Every call of this
41 * method returns one entry. If all entries were read it return 0.
42 * @throws LDAPReferralException If a Search Reference was
43 * returned by the server
44 * @returns A LDAPEntry-object as a result of a SEARCH-Operation or
45 * 0 if no more entries are there to return.
46 */
47 LDAPEntry* getNext();
48 private :
49 LDAPEntryList entryList;
50 LDAPReferenceList refList;
51 LDAPEntryList::const_iterator entryPos;
52 LDAPReferenceList::const_iterator refPos;
53 };
54 #endif //LDAP_SEARCH_RESULTS_H
55
56