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