On Tue, 2007-10-23 at 09:15 +0800, James Andrewartha wrote:
> Hi,
>
> The first patch removes an invalid LDAP option. The second updates the
> LDAPObject documentation, and the third updates LDAPObject docstrings.
> Hopefully I'll have time to look at updating the rest of the docs soon.
Here's one for ldap-controls.tex, and a minor fix to ldap/controls.py
to use the constant it defines. I've noted that the controlValue passed
to SimplePagedResultsControl's constructor is ignored, but didn't remove
it because that would be an API change.
James Andrewartha
Index: Lib/ldap/controls.py
===================================================================
RCS file: /cvsroot/python-ldap/python-ldap/Lib/ldap/controls.py,v
retrieving revision 1.5
diff -p -u -p -u -r1.5 controls.py
--- Lib/ldap/controls.py 16 Jul 2007 10:49:48 -0000 1.5
+++ Lib/ldap/controls.py 23 Oct 2007 09:22:36 -0000
@@ -71,7 +71,7 @@ class SimplePagedResultsControl(LDAPCont
controlType = ldap.LDAP_CONTROL_PAGE_OID
def __init__(self,controlType,criticality,controlValue=None,encodedControlValue=None):
- LDAPControl.__init__(self,ldap.LDAP_CONTROL_PAGE_OID,criticality,controlValue,encodedControlValue)
+ LDAPControl.__init__(self,self.controlType,criticality,controlValue,encodedControlValue)
def encodeControlValue(self,value):
size,cookie = value
Index: Doc/ldap-controls.tex
===================================================================
RCS file: /cvsroot/python-ldap/python-ldap/Doc/ldap-controls.tex,v
retrieving revision 1.1
diff -u -r1.1 ldap-controls.tex
--- Doc/ldap-controls.tex 2 Mar 2005 09:32:52 -0000 1.1
+++ Doc/ldap-controls.tex 23 Oct 2007 09:20:10 -0000
@@ -12,16 +12,56 @@
\modulesynopsis{High-level access to LDAP controls.}
-The \module{ldap.controls} module defines the following functions:
+The \module{ldap.controls} module defines the following classes:
-\begin{funcdesc}{EncodeControlTuples}{ldapControls} % -> list
+\begin{classdesc}{LDAPControl}{controlType, criticality \optional{, controlValue=\constant{None} \optional{, encodedControlValue=\constant{None}}}}
+Base class for all LDAP controls. This class should not be used directly,
+instead one of the following subclasses should be used as appropriate.
+
+\begin{methoddesc}[LDAPControl]{encodeControlValue}{value}
+Dummy class to be overridden by subclasses.
+\end{methoddesc}
+
+\begin{methoddesc}[LDAPControl]{decodeControlValue}{value}
+Dummy class to be overridden by subclasses.
+\end{methoddesc}
+
+\begin{methoddesc}[LDAPControl]{getEncodedTuple}{}
+Return a readily encoded 3-tuple which can be directly
+passed to C module _ldap. Called by \function{ldap.EncodeControlTuples}.
+\end{methoddesc}
+\end{classdesc}
+
+\begin{classdesc}{BooleanControl}{controlType, criticality \optional{, controlValue=\constant{None} \optional{, encodedControlValue=\constant{None}}}}
+Base class for simple controls with booelan control value.
+
+In this base class \var{controlValue} has to be passed as
+boolean type (\constant{True}/\constant{False} or \constant{1}/\constant{0}).
+\end{classdesc}
+\begin{classdesc}{SimplePagedResultsControl}{controlType, criticality \optional{, controlValue=\constant{None} \optional{, encodedControlValue=\constant{None}}}}
+The class provides the LDAP Control Extension for Simple Paged Results Manipulation. \var{controlType} is ignored
+in favor of \constant{ldap.LDAP_CONTROL_PAGE_OID}.
+\begin{seealso}
+\seerfc{2696}{LDAP Control Extension for Simple Paged Results Manipulation}{}
+\end{seealso}
+\end{classdesc}
+
+\begin{classdesc}{MatchedValuesControl}{criticality \optional{, controlValue=\constant{None}}}
+This class provides the LDAP Matched Values control. \var{controlValue} is an LDAP filter.
+\begin{seealso}
+\seerfc{3876}{Returning Matched Values with the Lightweight Directory Access Protocol version 3 (LDAPv3)}{}
+\end{seealso}
+\end{classdesc}
+The \module{ldap.controls} module defines the following functions:
+\begin{funcdesc}{EncodeControlTuples}{ldapControls} % -> list
+ Return list of readily encoded 3-tuples which can be directly
+ passed to C module _ldap.
\end{funcdesc}
\begin{funcdesc}{DecodeControlTuples}{ldapControlTuples} % -> list
-
-
+ Decode a list of readily encoded 3-tuples as returned by the C module _ldap.
\end{funcdesc}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev