HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib64/python3.6/site-packages/ldap/controls/__pycache__/vlv.cpython-36.pyc
3

�`a�@s�dZddgZddlZddlmZddlmZmZmZm	Z	ddl
mZmZm
Z
mZmZddlmZmZGd	d
�d
ej�ZGdd�dej�ZGd
d�dej�ZGdd�de�Zeeej<Gdd�dej�ZGdd�dej�ZGdd�de�Zeeej<dS)z�
ldap.controls.vlv - classes for Virtual List View
(see draft-ietf-ldapext-ldapv3-vlv)

See https://www.python-ldap.org/ for project details.
�VLVRequestControl�VLVResponseControl�N)�
LDAPObject)�RequestControl�ResponseControl�KNOWN_RESPONSE_CONTROLS�DecodeControlTuples)�univ�	namedtype�tag�namedval�
constraint)�encoder�decoderc@sLeZdZejjjejej	ej
d��Zejej
dej��ej
dej���ZdS)�ByOffsetTyper�offset�contentCountN)�__name__�
__module__�__qualname__r	�SequenceZtagSetZ
tagImplicitlyr�Tag�tagClassContext�tagFormatSimpler
�
NamedTypes�	NamedType�Integer�
componentType�rr�/usr/lib64/python3.6/vlv.pyrs
rc	@sDeZdZejejde��ejdej�j	e
je
je
j
d�d���ZdS)�
TargetType�byOffset�greaterThanOrEqual�)ZimplicitTagN)rrrr
rrrr	�OctetString�subtyperrrrrrrrrr s
r c@sJeZdZejejdej��ejdej��ejde��ej	dej
���ZdS)�VirtualListViewRequestType�beforeCount�
afterCount�target�	contextIDN)rrrr
rrr	rr �OptionalNamedTyper$rrrrrr&'s
r&c@s"eZdZdZd	dd�Zdd�ZdS)
rz2.16.840.1.113730.3.4.9FrNcCsXtj||j|�|dk	r |dk	s0|s0ttd���||_||_||_||_||_	||_
dS)NzSoffset and content_count must be set together or greater_than_or_equal must be used)r�__init__�controlType�AssertionError�
ValueError�before_count�after_countr�
content_count�greater_than_or_equal�
context_id)�self�criticalityr0r1rr2r3r4rrrr,2s
zVLVRequestControl.__init__cCs�t�}|jd|j�|jd|j�|jdk	rl|jdk	rlt�}|jd|j�|jd|j�t�}|jd|�n |jr�t�}|jd|j�nt	�|jd|�t
j|�S)Nr'r(rrr!r"r))r&ZsetComponentByNamer0r1rr2rr r3�NotImplementedErrorr�encode)r5�pZ	by_offsetr)rrr�encodeControlValueIs 
z$VLVRequestControl.encodeControlValue)FrrNNNN)rrrr-r,r:rrrrr/s
c@s(eZdZejdddddddddd�
ZdS) �VirtualListViewResultType�successr�operationsErrorr#�
protocolError��unwillingToPerform�5�insufficientAccessRights�2�adminLimitExceeded��innapropriateMatching��sortControlMissing�<�offsetRangeError�=�other�PN)r<r)r=r#)r>r?)r@rA)rBrC)rDrE)rFrG)rHrI)rJrK)rLrM)rrrrZNamedValuesZnamedValuesrrrrr;_sr;c@sJeZdZejejdej��ejdej��ejde��ej	dej
���ZdS)�VirtualListViewResponseType�targetPositionr�virtualListViewResultr*N)rrrr
rrr	rr;r+r$rrrrrrNnsrNc@s"eZdZdZddd�Zdd�ZdS)	rz2.16.840.1.113730.3.4.10FcCstj||j|�dS)N)rr,r-)r5r6rrrr,zszVLVResponseControl.__init__cCs�tj|t�d�\}}|s"td��t|jd��|_t|jd��|_|jd�}t|�|_|jd�}|j	�rtt
|�|_nd|_|j|_|j|_
|j|_|j|_dS)N)Zasn1Speczall data could not be decodedrOrrPr*)r�decoderNr.�intZgetComponentByNamerOrrPZhasValue�strr*Ztarget_positionr2�resultr4)r5Zencodedr9�restZvirtual_list_view_resultr4rrr�decodeControlValue}s


z%VLVResponseControl.decodeControlValueN)F)rrrr-r,rVrrrrrws
)�__doc__�__all__ZldapZldap.ldapobjectrZ
ldap.controlsrrrrZpyasn1.typer	r
rrr
Zpyasn1.codec.berrrrrZChoicer r&rr-Z
Enumeratedr;rNrrrrr�<module>s -