B
    f’»dÝ
  ã               @   s2   d dl Z d dlZd dlmZmZ G dd„ dƒZdS )é    N)ÚListÚTuplec               @   s  e Zd ZdZdZdZdZdZedœdd„Z	d	d
„ Z
dd„ Zdd„ Zdd„ Zeeeeeeef  dœdd„Zedœdd„Zedœdd„Zedœdd„Zefedœdd„Zefedœd d!„Zefedœd"d#„Zefedœd$d%„Zefedœd&d'„Zefedœd(d)„Zefedœd*d+„Zd,d-„ Zd.S )/ÚStoragez	>B?256sI?z	>B?256sQ?i_  id  z
>BI?256sQ?)Únamec             C   s
   || _ d S )N)r   )Úselfr   © r   ú</tmp/pip-unpacked-wheel-rcokkf2l/pyrogram/storage/storage.pyÚ__init__    s    zStorage.__init__c             Ã   s   t ‚d S )N)ÚNotImplementedError)r   r   r   r   Úopen#   s    zStorage.openc             Ã   s   t ‚d S )N)r
   )r   r   r   r   Úsave&   s    zStorage.savec             Ã   s   t ‚d S )N)r
   )r   r   r   r   Úclose)   s    zStorage.closec             Ã   s   t ‚d S )N)r
   )r   r   r   r   Údelete,   s    zStorage.delete)Úpeersc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úupdate_peers/   s    zStorage.update_peers)Úpeer_idc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úget_peer_by_id2   s    zStorage.get_peer_by_id)Úusernamec             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úget_peer_by_username5   s    zStorage.get_peer_by_username)Úphone_numberc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úget_peer_by_phone_number8   s    z Storage.get_peer_by_phone_number)Úvaluec             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Údc_id;   s    zStorage.dc_idc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úapi_id>   s    zStorage.api_idc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Ú	test_modeA   s    zStorage.test_modec             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úauth_keyD   s    zStorage.auth_keyc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   ÚdateG   s    zStorage.datec             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úuser_idJ   s    zStorage.user_idc             Ã   s   t ‚d S )N)r
   )r   r   r   r   r   Úis_botM   s    zStorage.is_botc          
   Ã   sh   t  | j|  ¡ I d H |  ¡ I d H |  ¡ I d H |  ¡ I d H |  ¡ I d H |  ¡ I d H ¡}t	 
|¡ ¡  d¡S )Nú=)ÚstructÚpackÚSESSION_STRING_FORMATr   r   r   r   r   r   Úbase64Úurlsafe_b64encodeÚdecodeÚrstrip)r   Úpackedr   r   r   Úexport_session_stringP   s    zStorage.export_session_stringN) Ú__name__Ú
__module__Ú__qualname__ZOLD_SESSION_STRING_FORMATZOLD_SESSION_STRING_FORMAT_64ZSESSION_STRING_SIZEZSESSION_STRING_SIZE_64r"   Ústrr	   r   r   r   r   r   r   Úintr   r   r   r   Úobjectr   r   Úboolr   Úbytesr   r   r   r   r(   r   r   r   r   r      s,    r   )r#   r    Útypingr   r   r   r   r   r   r   Ú<module>   s   