a oe @sVdZddlZddlZddlZddlmZddlmZddgZgdZ Gd d d Z dS) zeUtilities for Server Side connections. A collection of helpers for server side connection points. N)olectl) ExceptionEnumConnectionPointsFindConnectionPoint)EnumConnectionsUnadviseAdviseGetConnectionPointContainerGetConnectionInterfacec@speZdZeeZejejgZ ddZ ddZ ddZ ddZ d d Zd d Zd dZddZddZddZdS)ConnectableServercCsd|_i|_dS)Nr)cookieNo connectionsselfr8C:\Program Files\Certbot\pkgs\win32com\server\connect.py__init__szConnectableServer.__init__cCsttjdSNrwinerrorZ E_NOTIMPLrrrrr$sz!ConnectableServer.EnumConnectionscCsttjdSrrrrrrr 'sz(ConnectableServer.GetConnectionInterfacecCstjj|Sr)win32comserverutilwraprrrrr *sz-ConnectableServer.GetConnectionPointContainercCsXz||jdtj}Wn tjy8ttjdYn0|jd|_||j |j<|jS)NrZscoder) ZQueryInterface_connect_interfaces_ pythoncomZ IID_IDispatch com_errorrrZCONNECT_E_NOCONNECTIONr r)rZpUnk interfacerrrr -s   zConnectableServer.AdvisecCs0z |j|=Wnty*ttjdYn0dS)Nr)rKeyErrorrrZ E_UNEXPECTED)rcookierrrr:s  zConnectableServer.UnadvisecCsttjdSrrrrrrrBsz&ConnectableServer.EnumConnectionPointscCs||jvrtjj|SdSr)rrrrr)rZiidrrrrEs z%ConnectableServer.FindConnectionPointc CsZ|jD]J}z||f|Wq tjyR}z|||WYd}~q d}~00q dSr)rvaluesrr _OnNotifyFail)rZ broadcasterZ extraArgsrdetailsrrr_BroadcastNotifyJs z"ConnectableServer._BroadcastNotifycCstdt|dS)Nz%Ignoring COM error to connection - %s)printrepr)rrr$rrrr#SszConnectableServer._OnNotifyFailN)__name__ __module__ __qualname__!IConnectionPointContainer_methodsIConnectionPoint_methodsZ_public_methods_rZIID_IConnectionPointZIID_IConnectionPointContainerZ_com_interfaces_rrr r r rrrr%r#rrrrr s  r ) __doc__rZwin32com.server.utilrrr exceptionrr+r,r rrrrs