Back to index

openldap  2.4.31
LDAPControlSet.h
Go to the documentation of this file.
00001 // $OpenLDAP$
00002 /*
00003  * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
00004  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
00005  */
00006 
00007 #ifndef LDAP_CONTROL_SET_H
00008 #define LDAP_CONTROL_SET_H
00009 
00010 #include <list>
00011 #include <ldap.h>
00012 #include <LDAPControl.h>
00013 
00014 typedef std::list<LDAPCtrl> CtrlList;
00015 
00019 class LDAPControlSet {
00020     typedef CtrlList::const_iterator const_iterator;
00021     public :
00025         LDAPControlSet();   
00026 
00027 
00031         LDAPControlSet(const LDAPControlSet& cs);
00032         
00044         LDAPControlSet(LDAPControl** controls);
00045 
00049         ~LDAPControlSet();
00050 
00055         size_t size() const ;
00056         
00061         bool empty() const;
00062         
00066         const_iterator begin() const;
00067 
00072         const_iterator end() const;
00073        
00078         void add(const LDAPCtrl& ctrl); 
00079         
00084         LDAPControl** toLDAPControlArray()const ;
00085        static void freeLDAPControlArray(LDAPControl **ctrl);
00086     private :
00087         CtrlList data;
00088 } ;
00089 #endif //LDAP_CONTROL_SET_H