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
14typedef std::list<LDAPCtrl> CtrlList;
15
20 typedef CtrlList::const_iterator const_iterator;
21 public :
26
27
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
std::list< LDAPCtrl > CtrlList
Definition: LDAPControlSet.h:14
This container class is used to store multiple LDAPCtrl-objects.
Definition: LDAPControlSet.h:19
LDAPControlSet()
Constructs an empty std::list.
Definition: LDAPControlSet.cpp:12
bool empty() const
Definition: LDAPControlSet.cpp:39
const_iterator begin() const
Definition: LDAPControlSet.cpp:44
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
const_iterator end() const
Definition: LDAPControlSet.cpp:50
size_t size() const
Definition: LDAPControlSet.cpp:34
static void freeLDAPControlArray(LDAPControl **ctrl)
Definition: LDAPControlSet.cpp:76
void add(const LDAPCtrl &ctrl)
Adds one element to the end of the list.
Definition: LDAPControlSet.cpp:55
~LDAPControlSet()
Destructor.
Definition: LDAPControlSet.cpp:30
This class is used to store Controls.
Definition: LDAPControl.h:17