
    :j	                    j    d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
mZ d	Z G d
 de          ZdS )z:
Controller to interface with the DashCast app namespace.
    )annotations   )APP_DASHCAST)CastMessage)chain_on_success   )CallbackTypeBaseControllerzurn:x-cast:com.madmod.dashcastc                  D     e Zd ZdZeefd fdZddZddddddZ xZ	S )DashCastControllerz3Controller to interact with DashCast app namespace.appNamespacestrappIdreturnNonec                L    t                                          ||           d S )N)super__init__)selfr   r   	__class__s      W/home/user/adhan/venv/lib/python3.11/site-packages/pychromecast/controllers/dashcast.pyr   zDashCastController.__init__   s%     	u-----    _messager   _datadictboolc                    dS )a6  
        Called when a load complete message is received.

        This is currently un-used by this controller. It is implemented
        so that we don't get "Message unhandled" warnings. In the future
        it might be used to update a public status object like the media
        controller does.
        T )r   r   r   s      r   receive_messagez"DashCastController.receive_message   s	     tr   Fr   N)forcereload_secondscallback_functionurlr    r!   floatr"   CallbackType | Nonec               h     d fd}                      t          ||                     dS )	a  
        Starts loading a URL with an optional reload time
        in seconds.

        Setting force to True may load pages which block
        iframe embedding, but will prevent reload from
        working and will cause calls to load_url()
        to reload the app.
        r"   r%   r   r   c                f     odv}|sdndz  }||d}                     |d|            dS )z'Loads requested URL after app launched.)r   Nr   i  )r#   r    reloadreload_timeT)inc_session_idr"   N)send_message)r"   should_reloadreload_millisecondsmsgr    r!   r   r#   s       r   launch_callbackz4DashCastController.load_url.<locals>.launch_callback8   sq     %II.	*IM+8"S!!nt>S'2	 C D<M      r   )r"   N)r"   r%   r   r   )launchr   )r   r#   r    r!   r"   r/   s   ````  r   load_urlzDashCastController.load_url&   sh    $	 	 	 	 	 	 	 	 	 	.@QRR 	 	
 	
 	
 	
 	
r   )r   r   r   r   r   r   )r   r   r   r   r   r   )
r#   r   r    r   r!   r$   r"   r%   r   r   )
__name__
__module____qualname____doc__APP_NAMESPACEr   r   r   r1   __classcell__)r   s   @r   r   r      s        == #0l. . . . . . .

 
 
 
   !15#
 #
 #
 #
 #
 #
 #
 #
 #
 #
r   r   N)r5   
__future__r   configr   generated.cast_channel_pb2r   response_handlerr    r	   r
   r6   r   r   r   r   <module>r=      s     # " " " " " ! ! ! ! ! !      0 / / / / / * * * * * * * * 17
 7
 7
 7
 7
 7
 7
 7
 7
 7
r   