%PDF- %PDF-
Direktori : /lib/python3/dist-packages/samba/__pycache__/ |
Current File : //lib/python3/dist-packages/samba/__pycache__/ndr.cpython-312.pyc |
� �I�d7 � �N � d Z d� Zdd�Zd� Zd� Zd d�Zdd�Zd� Zd d�Zdd �Z d � Z y)z@Network Data Representation (NDR) marshalling and unmarshalling.c �J � t | dd� }|�t d| z � � |� S )zmPack a NDR object. :param object: Object to pack :return: String object with marshalled object. �__ndr_pack__N�%r is not a NDR object��getattr� TypeError)�object�ndr_packs �+/usr/lib/python3/dist-packages/samba/ndr.pyr r s1 � � �v�~�t�4�H����0�6�9�:�:��:�� c �b � | � }t |dd� }|�t d|z � � |||�� |S )z�NDR unpack an object. :param cls: Class of the object to unpack :param data: Buffer to unpack :param allow_remaining: allows remaining data at the end (default=False) :return: Unpacked object �__ndr_unpack__Nr ��allow_remainingr )�cls�datar r � ndr_unpacks r r r $ s@ � � �U�F���!1�4�8�J����0�6�9�:�:��t�_�5��Mr c �J � t | dd � }|�t | � d�� � |� S )N� __ndr_print__z is not a NDR objectr )r � ndr_prints r r r 4 s1 � �����6�I����6�(�"6�7�8�8��;�r c � � t | dd� }|�t d| z � � |� }t | � } |� }t |dd� }|�t d|z � � ||d�� |S )zzCreate a deep copy of a NDR object, using pack/unpack :param object: Object to copy :return: The object copy r Nr r Fr )r r �type)r r r r �copyr s r �ndr_deepcopyr ; su � � �v�~�t�4�H����0�6�9�:�:��:�D� �v�,�C��5�D���/��6�J����0�4�7�8�8��t�U�+��Kr c �P � t | dd� }|�t d| z � � |||�� S )z�Pack the input of an NDR function object. :param object: Object to pack :param bigendian: use LIBNDR_FLAG_BIGENDIAN (default=False) :param ndr64: use LIBNDR_FLAG_NDR64 (default=False) :return: String object with marshalled object. �__ndr_pack_in__N�%r is not a NDR function object�� bigendian�ndr64r )r r r �ndr_pack_in_fns r �ndr_pack_inr! N s7 � � �V�%6��=�N����9�F�B�C�C��I�U�;�;r c �X � t | dd� }|�t d| z � � |||||�� | S )ac Unpack the input of an NDR function object. :param cls: Class of the object to unpack :param data: Buffer to unpack :param bigendian: use LIBNDR_FLAG_BIGENDIAN (default=False) :param ndr64: use LIBNDR_FLAG_NDR64 (default=False) :param allow_remaining: allows remaining data at the end (default=False) :return: Unpacked object �__ndr_unpack_in__Nr �r r r r )r r r r r �ndr_unpack_in_fns r � ndr_unpack_inr&