LDAPSearchResults.h 1.56 KB
Newer Older
1
// $OpenLDAP$
2
/*
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
3
 * Copyright 2000-2018 The OpenLDAP Foundation, All Rights Reserved.
4
5
6
7
8
9
 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 */

#ifndef LDAP_SEARCH_RESULTS_H
#define LDAP_SEARCH_RESULTS_H

10
11
12
13
14
15
#include <LDAPEntry.h>
#include <LDAPEntryList.h>
#include <LDAPMessage.h>
#include <LDAPMessageQueue.h>
#include <LDAPReferenceList.h>
#include <LDAPSearchReference.h>
16
17
18

class LDAPResult;

Ralf Haferkamp's avatar
Ralf Haferkamp committed
19
20
21
/**
 * The class stores the results of a synchronous SEARCH-Operation 
 */
22
class LDAPSearchResults{
Ralf Haferkamp's avatar
Ralf Haferkamp committed
23
24
25
26
27
28
29
30
31
    public:
        /**
         * Default-Constructor
         */
        LDAPSearchResults();

        /**
         * For internal use only.
         *
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
32
         * This method reads Search result entries from a
Ralf Haferkamp's avatar
Ralf Haferkamp committed
33
34
35
36
37
38
         * LDAPMessageQueue-object.
         * @param msg The message queue to read
         */
        LDAPResult* readMessageQueue(LDAPMessageQueue* msg);

        /**
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
39
         * The method is used by the client-application to read the
Ralf Haferkamp's avatar
Ralf Haferkamp committed
40
41
42
43
44
45
46
47
         * 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();
48
49
50
51
52
53
54
55
56
    private :
        LDAPEntryList entryList;
        LDAPReferenceList refList;
        LDAPEntryList::const_iterator entryPos;
        LDAPReferenceList::const_iterator refPos;
};
#endif //LDAP_SEARCH_RESULTS_H