ldap-controls.rst 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. .. % $Id: ldap-controls.rst,v 1.2 2009/04/17 12:14:52 stroeder Exp $
  2. :mod:`ldap.controls` High-level access to LDAP controls
  3. ============================================================
  4. .. module:: ldap.controls
  5. :synopsis: High-level access to LDAP controls.
  6. .. moduleauthor:: python-ldap project (see http://www.python-ldap.org/)
  7. The :mod:`ldap.controls` module defines the following classes:
  8. .. % Author of the module code;
  9. .. class:: LDAPControl(controlType, criticality [, controlValue=:const:`None` [, encodedControlValue=:const:`None`]])
  10. Base class for all LDAP controls. This class should not be used directly,
  11. instead one of the following subclasses should be used as appropriate.
  12. .. method:: LDAPControl.encodeControlValue(value)
  13. Dummy method to be overridden by subclasses.
  14. .. method:: LDAPControl.decodeControlValue(value)
  15. Dummy method to be overridden by subclasses.
  16. .. method:: LDAPControl.getEncodedTuple()
  17. Return a readily encoded 3-tuple which can be directly passed to C module
  18. _ldap. This method is called by function :func:`ldap.EncodeControlTuples`.
  19. .. class:: BooleanControl(controlType, criticality [, controlValue=:const:`None` [, encodedControlValue=:const:`None`]])
  20. Base class for simple controls with booelan control value. In this base class
  21. *controlValue* has to be passed as boolean type (:const:`True`/:const:`False`
  22. or :const:`1`/:const:`0`).
  23. .. class:: SimplePagedResultsControl(controlType, criticality [, controlValue=:const:`None` [, encodedControlValue=:const:`None`]])
  24. The class provides the LDAP Control Extension for Simple Paged Results
  25. Manipulation. *controlType* is ignored in favor of
  26. :const:`ldap.LDAP_CONTROL_PAGE_OID`.
  27. .. seealso::
  28. :rfc:`2696` - LDAP Control Extension for Simple Paged Results Manipulation
  29. .. class:: MatchedValuesControl(criticality [, controlValue=:const:`None`])
  30. This class provides the LDAP Matched Values control. *controlValue* is an LDAP
  31. filter.
  32. .. seealso::
  33. :rfc:`3876` - Returning Matched Values with the Lightweight Directory Access Protocol version 3 (LDAPv3)
  34. The :mod:`ldap.controls` module defines the following functions:
  35. .. function:: EncodeControlTuples(ldapControls)
  36. Returns list of readily encoded 3-tuples which can be directly passed to C
  37. module _ldap.
  38. .. % -> list
  39. .. function:: DecodeControlTuples(ldapControlTuples)
  40. Decodes a list of readily encoded 3-tuples as returned by the C module _ldap.
  41. .. % -> list