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