o
    Xzjã  ã                   @   s$   d dl mZmZ G dd„ deƒZdS )é    )ÚABCÚabstractmethodc                   @   s  e Zd Zdd„ Zd*dd„Zedd„ ƒZeedd	„ ƒƒZeed
d„ ƒƒZ	eedd„ ƒƒZ
eedd„ ƒƒZejedd„ ƒƒZeedd„ ƒƒZejedd„ ƒƒZedd„ ƒZedd„ ƒZedd„ ƒZdd„ Zedd„ ƒZedd„ ƒZed d!„ ƒZed"d#„ ƒZed$d%„ ƒZed&d'„ ƒZed(d)„ ƒZdS )+ÚSessionc                 C   s   d S ©N© ©Úselfr   r   úU/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telethon/sessions/abstract.pyÚ__init__   s   zSession.__init__Nc                 C   s   |p|   ¡ S )z7
        Creates a clone of this session file.
        )Ú	__class__)r   Úto_instancer   r   r	   Úclone   s   zSession.clonec                 C   ó   t ‚)z¸
        Sets the information of the data center address and port that
        the library should connect to, as well as the data center ID,
        which is currently unused.
        ©ÚNotImplementedError)r   Údc_idÚserver_addressÚportr   r   r	   Úset_dc   ó   zSession.set_dcc                 C   r   )z<
        Returns the currently-used data center ID.
        r   r   r   r   r	   r      ó   zSession.dc_idc                 C   r   )zQ
        Returns the server address where the library should connect to.
        r   r   r   r   r	   r      r   zSession.server_addressc                 C   r   )zJ
        Returns the port to which the library should connect to.
        r   r   r   r   r	   r   '   r   zSession.portc                 C   r   )zŒ
        Returns an ``AuthKey`` instance associated with the saved
        data center, or `None` if a new one should be generated.
        r   r   r   r   r	   Úauth_key/   r   zSession.auth_keyc                 C   r   )zL
        Sets the ``AuthKey`` to be used for the saved data center.
        r   ©r   Úvaluer   r   r	   r   8   r   c                 C   r   )zš
        Returns an ID of the takeout process initialized for this session,
        or `None` if there's no were any unfinished takeout requests.
        r   r   r   r   r	   Ú
takeout_id@   r   zSession.takeout_idc                 C   r   )zQ
        Sets the ID of the unfinished takeout process for this session.
        r   r   r   r   r	   r   I   r   c                 C   r   )a	  
        Returns the ``UpdateState`` associated with the given `entity_id`.
        If the `entity_id` is 0, it should return the ``UpdateState`` for
        no specific channel (the "general" state). If no state is known
        it should ``return None``.
        r   )r   Ú	entity_idr   r   r	   Úget_update_stateQ   ó   zSession.get_update_statec                 C   r   )zÃ
        Sets the given ``UpdateState`` for the specified `entity_id`, which
        should be 0 if the ``UpdateState`` is the "general" state (and not
        for any specific channel).
        r   )r   r   Ústater   r   r	   Úset_update_state[   r   zSession.set_update_statec                 C   ó   dS )z\
        Returns an iterable over all known pairs of ``(entity ID, update state)``.
        Nr   r   r   r   r	   Úget_update_statesd   ó    zSession.get_update_statesc                 C   r    )z
        Called on client disconnection. Should be used to
        free any used resources. Can be left empty if none.
        Nr   r   r   r   r	   Úclosej   r"   zSession.closec                 C   r   )z‡
        Called whenever important properties change. It should
        make persist the relevant session information to disk.
        r   r   r   r   r	   Úsavep   r   zSession.savec                 C   r   )z„
        Called upon client.log_out(). Should delete the stored
        information from disk since it's not valid anymore.
        r   r   r   r   r	   Údeletex   r   zSession.deletec                 C   s   g S )zK
        Lists available sessions. Not used by the library itself.
        r   )Úclsr   r   r	   Úlist_sessions€   s   zSession.list_sessionsc                 C   r   )zŒ
        Processes the input ``TLObject`` or ``list`` and saves
        whatever information is relevant (e.g., ID or access hash).
        r   )r   Útlor   r   r	   Úprocess_entities‡   r   zSession.process_entitiesc                 C   r   )a  
        Turns the given key into an ``InputPeer`` (e.g. ``InputPeerUser``).
        The library uses this method whenever an ``InputPeer`` is needed
        to suit several purposes (e.g. user only provided its ID or wishes
        to use a cached username to avoid extra RPC).
        r   )r   Úkeyr   r   r	   Úget_input_entity�   r   zSession.get_input_entityc                 C   r   )a"  
        Caches the given file information persistently, so that it
        doesn't need to be re-uploaded in case the file is used again.

        The ``instance`` will be either an ``InputPhoto`` or ``InputDocument``,
        both with an ``.id`` and ``.access_hash`` attributes.
        r   )r   Ú
md5_digestÚ	file_sizeÚinstancer   r   r	   Ú
cache_file™   s   	zSession.cache_filec                 C   r   )a  
        Returns an instance of ``cls`` if the ``md5_digest`` and ``file_size``
        match an existing saved record. The class will either be an
        ``InputPhoto`` or ``InputDocument``, both with two parameters
        ``id`` and ``access_hash`` in that order.
        r   )r   r,   r-   r&   r   r   r	   Úget_file¤   r   zSession.get_filer   )Ú__name__Ú
__module__Ú__qualname__r
   r   r   r   Úpropertyr   r   r   r   Úsetterr   r   r   r!   r#   r$   r%   Úclassmethodr'   r)   r+   r/   r0   r   r   r   r	   r      s^    


	






	

r   N)Úabcr   r   r   r   r   r   r	   Ú<module>   s    