ldapsdk  0.0.1
LDAPControlSet.h
Go to the documentation of this file.
1 // $OpenLDAP$
2 /*
3  * Copyright 2000-2013 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6 
7 #ifndef LDAP_CONTROL_SET_H
8 #define LDAP_CONTROL_SET_H
9 
10 #include <list>
11 #include <ldap.h>
12 #include <LDAPControl.h>
13 
14 typedef std::list<LDAPCtrl> CtrlList;
15 
20  typedef CtrlList::const_iterator const_iterator;
21  public :
25  LDAPControlSet();
26 
27 
31  LDAPControlSet(const LDAPControlSet& cs);
32 
44  LDAPControlSet(LDAPControl** controls);
45 
50 
55  size_t size() const ;
56 
61  bool empty() const;
62 
66  const_iterator begin() const;
67 
72  const_iterator end() const;
73 
78  void add(const LDAPCtrl& ctrl);
79 
84  LDAPControl** toLDAPControlArray()const ;
85  static void freeLDAPControlArray(LDAPControl **ctrl);
86  private :
87  CtrlList data;
88 } ;
89 #endif //LDAP_CONTROL_SET_H
LDAPControlSet.h
LDAP_DEBUG_TRACE
#define LDAP_DEBUG_TRACE
Definition: debug.h:12
LDAPControlSet::begin
const_iterator begin() const
Definition: LDAPControlSet.cpp:44
LDAPControlSet::empty
bool empty() const
Definition: LDAPControlSet.cpp:39
LDAPCtrl
This class is used to store Controls.
Definition: LDAPControl.h:17
LDAPControlSet::toLDAPControlArray
LDAPControl ** toLDAPControlArray() const
Translates the list to a 0-terminated array of pointers to LDAPControl-structures as needed by the C-...
Definition: LDAPControlSet.cpp:60
LDAPControlSet::add
void add(const LDAPCtrl &ctrl)
Adds one element to the end of the list.
Definition: LDAPControlSet.cpp:55
DEBUG
#define DEBUG(level, arg)
Definition: debug.h:30
LDAP_DEBUG_DESTROY
#define LDAP_DEBUG_DESTROY
Definition: debug.h:14
LDAPControlSet::~LDAPControlSet
~LDAPControlSet()
Destructor.
Definition: LDAPControlSet.cpp:30
LDAPControlSet
This container class is used to store multiple LDAPCtrl-objects.
Definition: LDAPControlSet.h:19
LDAP_DEBUG_CONSTRUCT
#define LDAP_DEBUG_CONSTRUCT
Definition: debug.h:13
LDAPControl.h
CtrlList
std::list< LDAPCtrl > CtrlList
Definition: LDAPControlSet.h:14
LDAPControlSet::size
size_t size() const
Definition: LDAPControlSet.cpp:34
LDAPControlSet::freeLDAPControlArray
static void freeLDAPControlArray(LDAPControl **ctrl)
Definition: LDAPControlSet.cpp:76
LDAPControlSet::LDAPControlSet
LDAPControlSet()
Constructs an empty std::list.
Definition: LDAPControlSet.cpp:12
LDAPCtrl::freeLDAPControlStruct
static void freeLDAPControlStruct(LDAPControl *ctrl)
Definition: LDAPControl.cpp:87
LDAPControlSet::end
const_iterator end() const
Definition: LDAPControlSet.cpp:50
debug.h