
    tj                         d Z ddlmZmZmZ ddlZddlZddlZddl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 da G d	 d
ej*                        Zy# e$ r  e
       w xY w)zXwslink is a module that extends any
wslink related classes for the purposes of vtkWeb.

    )absolute_importdivisionprint_functionN)WebDependencyMissingError)	websocket)register)	protocols)vtkWebApplicationc                   4    e Zd ZdZd Zd Zd Zd Zd Zd Z	y)	ServerProtocolaN  
    Defines the core server protocol for vtkWeb. Adds support to
    marshall/unmarshall RPC callbacks that involve ServerManager proxies as
    arguments or return values.

    Applications typically don't use this class directly, but instead
    sub-class it and call self.registerVtkWebProtocol() with useful vtkWebProtocols.
    c                     t        j                  d       | j                  d| j                                t        j
                  j                  |        y )NzCreating SPapp)logginginfosetSharedObjectinitApplicationr   r   __init__selfs    B/DATA/.local/lib/python3.12/site-packages/vtkmodules/web/wslink.pyr   zServerProtocol.__init__*   s;    ]#UD$8$8$:;  ))$/    c                 .    t         s
t               a t         S )z{
        Let subclass optionally initialize a custom application in lieu
        of the default vtkWebApplication.
        )applicationr
   r   s    r   r   zServerProtocol.initApplication/   s     +-Kr   c                 (    | j                  d|       y Nr   )r   )r   r   s     r   setApplicationzServerProtocol.setApplication9   s    UK0r   c                 $    | j                  d      S r   )getSharedObjectr   s    r   getApplicationzServerProtocol.getApplication<   s    ##E**r   c                 &    | j                  |       y N)registerLinkProtocol)r   protocols     r   registerVtkWebProtocolz%ServerProtocol.registerVtkWebProtocol?   s    !!(+r   c                 "    | j                         S r!   )getLinkProtocolsr   s    r   getVtkWebProtocolsz!ServerProtocol.getVtkWebProtocolsB   s    $$&&r   N)
__name__
__module____qualname____doc__r   r   r   r   r$   r'    r   r   r   r       s%    0
1+,'r   r   )r+   
__future__r   r   r   jsonbase64r   timevtkmodules.web.errorsr   wslinkr   r   	exportRpcImportErrorvtkmodules.webr	   vtkmodules.vtkWebCorer
   r   r   r,   r   r   <module>r7      sd   
 A @ # " ;& , % 3 #'Y-- #'!  &
#
%%&s   A A!