a „oeØCã@s–ddlZddlZddlZddlmZddlmZmZddl m Z ddl m Z Gdd„de ƒZ Gdd „d e ƒZGd d „d e ƒZGd d „d e ƒZGdd„de ƒZGdd„dƒZGdd„deƒZGdd„deƒZGdd„dƒZGdd„deƒZGdd„deƒZGdd„dƒZGdd„dƒZGd d!„d!ƒZGd"d#„d#ƒZGd$d%„d%ƒZGd&d'„d'ƒZGd(d)„d)ƒZGd*d+„d+ƒZGd,d-„d-ƒZ Gd.d/„d/ƒZ!Gd0d1„d1ƒZ"dS)2éN)Úaxdebug)Ú RaiseNotImplÚ_wrap)Ú Exception)ÚListEnumeratorGatewayc@seZdZdZejgZdS)ÚEnumDebugCodeContextsaA class to expose a Python sequence as an EnumDebugCodeContexts Create an instance of this class passing a sequence (list, tuple, or any sequence protocol supporting object) and it will automatically support the EnumDebugCodeContexts interface for the object. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rZIID_IEnumDebugCodeContextsÚ_com_interfaces_©r r ú=C:\Program Files\Certbot\pkgs\win32comext\axdebug\gateways.pyr src@seZdZdZejgZdS)ÚEnumDebugStackFramesaA class to expose a Python sequence as an EnumDebugStackFrames Create an instance of this class passing a sequence (list, tuple, or any sequence protocol supporting object) and it will automatically support the EnumDebugStackFrames interface for the object. N)rr r r rZIID_IEnumDebugStackFramesr r r r rrsrc@seZdZdZejgZdS)ÚEnumDebugApplicationNodesaA class to expose a Python sequence as an EnumDebugStackFrames Create an instance of this class passing a sequence (list, tuple, or any sequence protocol supporting object) and it will automatically support the EnumDebugApplicationNodes interface for the object. N)rr r r rZIID_IEnumDebugApplicationNodesr r r r rr$src@seZdZejgZdS)ÚEnumRemoteDebugApplicationsN)rr r rZ IID_IEnumRemoteDebugApplicationsr r r r rr0src@seZdZejgZdS)Ú!EnumRemoteDebugApplicationThreadsN)rr r rZ&IID_IEnumRemoteDebugApplicationThreadsr r r r rr4src@s4eZdZddgZejgZdd„Zdd„Zdd„Z d S) ÚDebugDocumentInfoÚGetNameÚGetDocumentClassIdcCsdS©Nr ©Úselfr r rÚ__init__<szDebugDocumentInfo.__init__cCs tdƒdS)zTGet the one of the name of the document dnt -- int DOCUMENTNAMETYPE rN©r)rZdntr r rr?szDebugDocumentInfo.GetNamecCs tdƒdS)zL Result must be an IID object (or string representing one). rNrrr r rrEsz$DebugDocumentInfo.GetDocumentClassIdN) rr r Ú_public_methods_rZIID_IDebugDocumentInfor rrrr r r rr8s rc@s.eZdZejdgZejejgZdd„ZdS)ÚDebugDocumentProviderÚ GetDocumentcCs tdƒdS)Nrrrr r rrRsz!DebugDocumentProvider.GetDocumentN) rr r rrr rÚIID_IDebugDocumentProviderrr r r rrLs  ÿrc@sdeZdZdZd ¡ejZejgej Z dd„Z dd„Z dd„Z d d „Z d d „Zd d„Zdd„ZdS)ÚDebugApplicationNodez[Provides the functionality of IDebugDocumentProvider, plus a context within a project tree.zREnumChildren GetParent SetDocumentProvider Close Attach DetachcCst |¡dSr)rrrr r rrbszDebugApplicationNode.__init__cCs tdƒdS)NÚ EnumChildrenrrr r rr esz!DebugApplicationNode.EnumChildrencCs tdƒdS)NÚ GetParentrrr r rr!iszDebugApplicationNode.GetParentcCs tdƒdS)NÚSetDocumentProviderr)rZpddpr r rr"msz(DebugApplicationNode.SetDocumentProvidercCs tdƒdS)NÚCloserrr r rr#qszDebugApplicationNode.ClosecCs tdƒdS)NÚAttachr©rÚparentr r rr$uszDebugApplicationNode.AttachcCs tdƒdS)NÚDetachrrr r rr'yszDebugApplicationNode.DetachN)rr r r Úsplitrrrrr rr r!r"r#r$r'r r r rrVs þÿÿþrc@sHeZdZdZd ¡ZejgZdd„Z dd„Z dd„Z d d „Z d d „Z d S)ÚDebugApplicationNodeEventsz0Event interface for DebugApplicationNode object.z!onAddChild onRemoveChild onDetachcCsdSrr rr r rr„sz#DebugApplicationNodeEvents.__init__cCs tdƒdS)NÚ onAddChildr©rÚchildr r rr*‡sz%DebugApplicationNodeEvents.onAddChildcCs tdƒdS)NÚ onRemoveChildrr+r r rr-‹sz(DebugApplicationNodeEvents.onRemoveChildcCs tdƒdS)NÚonDetachrrr r rr.�sz#DebugApplicationNodeEvents.onDetachcCs tdƒdS)NÚonAttachrr%r r rr/“sz#DebugApplicationNodeEvents.onAttachN)rr r r r(rrZIID_IDebugApplicationNodeEventsr rr*r-r.r/r r r rr)~sr)c@s$eZdZdZejZejgejZdS)Ú DebugDocumentz*The base interface to all debug documents.N) rr r r rrrZIID_IDebugDocumentr r r r rr0˜sr0c@sleZdZdZejgejZgd¢ejZdd„Z dd„Z dd„Z d d „Z d d „Z d d„Zdd„Zdd„ZdS)ÚDebugDocumentTextz,The interface to a text only debug document.)ÚGetDocumentAttributesÚGetSizeÚGetPositionOfLineÚGetLineOfPositionÚGetTextÚGetPositionOfContextÚGetContextOfPositioncCsdSrr rr r rr­szDebugDocumentText.__init__cCs tdƒdS)Nr2rrr r rr2±sz'DebugDocumentText.GetDocumentAttributescCs tdƒdS)Nr3rrr r rr3µszDebugDocumentText.GetSizecCs tdƒdS)Nr4r)rZ cLineNumberr r rr4¹sz#DebugDocumentText.GetPositionOfLinecCs tdƒdS)Nr5r)rÚcharPosr r rr5½sz#DebugDocumentText.GetLineOfPositioncCs tdƒdS)zçParams charPos -- integer maxChars -- integer wantAttr -- Should the function compute attributes. Return value must be (string, attribtues). attributes may be None if(not wantAttr) r6Nr)rr9ÚmaxCharsZwantAttrr r rr6Ás zDebugDocumentText.GetTextcCs tdƒdS)zƒParams debugDocumentContext -- a PyIDebugDocumentContext object. Return value must be (charPos, numChars) r7Nr)rZdebugDocumentContextr r rr7Ìsz&DebugDocumentText.GetPositionOfContextcCst|ƒtdƒdS)zYParams are integers. Return value must be PyIDebugDocumentContext object r8N)Úprintr)rr9r:r r rr8Ôsz&DebugDocumentText.GetContextOfPositionN)rr r r rZIID_IDebugDocumentTextr0r rrr2r3r4r5r6r7r8r r r rr1Ÿsø  r1c@s@eZdZdZgd¢ZejgZdd„Zdd„Z dd„Z d d „Z d S) ÚDebugDocumentTextExternalAuthorzAllow external editors to edit file-based debugger documents, and to notify the document when the source file has been changed.)Ú GetPathNameÚ GetFileNameÚ NotifyChangedcCsdSrr rr r rrâsz(DebugDocumentTextExternalAuthor.__init__cCs tdƒdS)a›Return the full path (including file name) to the document's source file. Result must be (filename, fIsOriginal), where - if fIsOriginalPath is TRUE if the path refers to the original file for the document. - if fIsOriginalPath is FALSE if the path refers to a newly created temporary file. raise Exception(winerror.E_FAIL) if no source file can be created/determined. r=Nrrr r rr=ås z+DebugDocumentTextExternalAuthor.GetPathNamecCs tdƒdS)z}Return just the name of the document, with no path information. (Used for "Save As...") Result is a string r>Nrrr r rr>ðsz+DebugDocumentTextExternalAuthor.GetFileNamecCs tdƒdS)zzNotify the host that the document's source file has been saved and that its contents should be refreshed. r?Nrrr r rr?÷sz-DebugDocumentTextExternalAuthor.NotifyChangedN) rr r r rrZ$IID_IDebugDocumentTextExternalAuthorr rr=r>r?r r r rr<Üs r<c@sTeZdZd ¡ZejgZdd„Zdd„Z dd„Z dd „Z d d „Z d d „Z dd„ZdS)ÚDebugDocumentTextEventszonDestroy onInsertText onRemoveText onReplaceText onUpdateTextAttributes onUpdateDocumentAttributescCsdSrr rr r rrsz DebugDocumentTextEvents.__init__cCs tdƒdS)NÚ onDestroyrrr r rrAsz!DebugDocumentTextEvents.onDestroycCs tdƒdS)NÚ onInsertTextr)rÚcCharacterPositionZ cNumToInsertr r rrB sz$DebugDocumentTextEvents.onInsertTextcCs tdƒdS)NÚ onRemoveTextr)rrCZ cNumToRemover r rrDsz$DebugDocumentTextEvents.onRemoveTextcCs tdƒdS)NÚ onReplaceTextr)rrCZ cNumToReplacer r rrEsz%DebugDocumentTextEvents.onReplaceTextcCs tdƒdS)NÚonUpdateTextAttributesr)rrCZ cNumToUpdater r rrFsz.DebugDocumentTextEvents.onUpdateTextAttributescCs tdƒdS)NÚonUpdateDocumentAttributesr)rZ textdocattrr r rrGsz2DebugDocumentTextEvents.onUpdateDocumentAttributesN)rr r r(rrÚIID_IDebugDocumentTextEventsr rrArBrDrErFrGr r r rr@þsr@c@s4eZdZddgZejgZdd„Zdd„Zdd„Z d S) ÚDebugDocumentContextrÚEnumCodeContextscCsdSrr rr r rr$szDebugDocumentContext.__init__cCs tdƒdS)z.Return value must be a PyIDebugDocument objectrNrrr r rr'sz DebugDocumentContext.GetDocumentcCs tdƒdS)z6Return value must be a PyIEnumDebugCodeContexts objectrJNrrr r rrJ+sz%DebugDocumentContext.EnumCodeContextsN) rr r rrZIID_IDebugDocumentContextr rrrJr r r rrI s rIc@s4eZdZddgZejgZdd„Zdd„Zdd„Z d S) ÚDebugCodeContextÚGetDocumentContextÚ SetBreakPointcCsdSrr rr r rr4szDebugCodeContext.__init__cCs tdƒdS)z5Return value must be a PyIDebugDocumentContext objectrLNrrr r rrL7sz#DebugCodeContext.GetDocumentContextcCs tdƒdS)zbps -- an integer with flags.rMNr)rZbpsr r rrM;szDebugCodeContext.SetBreakPointN) rr r rrZIID_IDebugCodeContextr rrLrMr r r rrK0s rKc@sPeZdZdZgd¢ZejgZdd„Zdd„Z dd„Z d d „Z d d „Z d d„Z dS)ÚDebugStackFramezHAbstraction representing a logical stack frame on the stack of a thread.)ÚGetCodeContextÚGetDescriptionStringÚGetLanguageStringÚ GetThreadÚGetDebugPropertycCsdSrr rr r rrLszDebugStackFrame.__init__cCs tdƒdS)zƒReturns the current code context associated with the stack frame. Return value must be a IDebugCodeContext object rONrrr r rrOOszDebugStackFrame.GetCodeContextcCs tdƒdS)z}Returns a textual description of the stack frame. fLong -- A flag indicating if the long name is requested. rPNr)rZfLongr r rrPVsz$DebugStackFrame.GetDescriptionStringcCs tdƒdS)zˆReturns a short or long textual description of the language. fLong -- A flag indicating if the long name is requested. rQNrrr r rrQ]sz!DebugStackFrame.GetLanguageStringcCs tdƒdS)zoReturns the thread associated with this stack frame. Result must be a IDebugApplicationThread rRNrrr r rrRdszDebugStackFrame.GetThreadcCs tdƒdS)NrSrrr r rrSksz DebugStackFrame.GetDebugPropertyN)rr r r rrZIID_IDebugStackFramer rrOrPrQrRrSr r r rrN@srNc@sXeZdZdZgd¢ZejgZdd„Zdd„Z dd„Z d d „Z d d „Z d d„Z dd„ZdS)ÚDebugDocumentHostz°The interface from the IDebugDocumentHelper back to the smart host or language engine. This interface exposes host specific functionality such as syntax coloring. )ÚGetDeferredTextÚGetScriptTextAttributesÚOnCreateDocumentContextr=r>r?cCsdSrr rr r rrszDebugDocumentHost.__init__cCs tdƒdS)NrUr)rZdwTextStartCookier:Z bWantAttrr r rrU‚sz!DebugDocumentHost.GetDeferredTextcCs tdƒdS)NrVr)rZcodeTextZ delimterTextÚflagsr r rrV…sz)DebugDocumentHost.GetScriptTextAttributescCs tdƒdS)NrWrrr r rrW‰sz)DebugDocumentHost.OnCreateDocumentContextcCs tdƒdS)Nr=rrr r rr=�szDebugDocumentHost.GetPathNamecCs tdƒdS)Nr>rrr r rr>”szDebugDocumentHost.GetFileNamecCs tdƒdS)Nr?rrr r rr?˜szDebugDocumentHost.NotifyChangedN)rr r r rrZIID_IDebugDocumentHostr rrUrVrWr=r>r?r r r rrTosrTc@sleZdZejjjejjjZe j e j gZ dd„Z dd„Zdd„Zdd„Zd d „Zd d „Zd d„Zdd„ZdS)ÚDebugDocumentTextConnectServercCsd|_i|_dS)Néÿÿÿÿ)ÚcookieNoÚ connectionsrr r rrªsz'DebugDocumentTextConnectServer.__init__cCs tdƒdS)NÚEnumConnectionsrrr r rr]®sz.DebugDocumentTextConnectServer.EnumConnectionscCs tdƒdS)NÚGetConnectionInterfacerrr r rr^±sz5DebugDocumentTextConnectServer.GetConnectionInterfacecCst|ƒSr)rrr r rÚGetConnectionPointContainer´sz:DebugDocumentTextConnectServer.GetConnectionPointContainercCs,| tjd¡}|jd|_||j|j<|jS)Né)ZQueryInterfacerrHr[r\)rZpUnkZ interfacer r rÚAdvise·s  z%DebugDocumentTextConnectServer.AdvisecCs0z |j|=Wnty*ttjd�YS0dS©N)Zscode)r\ÚKeyErrorrÚwinerrorZ E_UNEXPECTED)rÚcookier r rÚUnadvise¿s  z'DebugDocumentTextConnectServer.UnadvisecCs tdƒdS)NÚEnumConnectionPointsrrr r rrgÇsz3DebugDocumentTextConnectServer.EnumConnectionPointscCs"|tjkrt|ƒSttjd�‚dSrb)rrHrrrdZ E_NOINTERFACE)rZiidr r rÚFindConnectionPointÊs z2DebugDocumentTextConnectServer.FindConnectionPointN)rr r Úwin32comZserverZconnectZ!IConnectionPointContainer_methodsZIConnectionPoint_methodsrÚ pythoncomZIID_IConnectionPointZIID_IConnectionPointContainerr rr]r^r_rarfrgrhr r r rrYŸsÿÿþrYc@sleZdZgd¢ZejgZdd„Zdd„Zdd„Z dd „Z d d „Z d d „Z dd„Z dd„Zdd„Zdd„ZdS)ÚRemoteDebugApplicationEvents) ÚOnConnectDebuggerÚOnDisconnectDebuggerÚ OnSetNameÚ OnDebugOutputÚOnCloseÚOnEnterBreakPointÚOnLeaveBreakPointÚOnCreateThreadÚOnDestroyThreadÚOnBreakFlagChangecCs tdƒdS)z'appDebugger -- a PyIApplicationDebuggerrlNr)rZ appDebuggerr r rrlàsz.RemoteDebugApplicationEvents.OnConnectDebuggercCs tdƒdS)Nrmrrr r rrmäsz1RemoteDebugApplicationEvents.OnDisconnectDebuggercCs tdƒdS)Nrnr)rÚnamer r rrnçsz&RemoteDebugApplicationEvents.OnSetNamecCs tdƒdS)Nror)rÚstringr r rroêsz*RemoteDebugApplicationEvents.OnDebugOutputcCs tdƒdS)Nrprrr r rrpísz$RemoteDebugApplicationEvents.OnClosecCs tdƒdS)ú'rdat -- PyIRemoteDebugApplicationThreadrqNr©rÚrdatr r rrqðsz.RemoteDebugApplicationEvents.OnEnterBreakPointcCs tdƒdS)rxrrNrryr r rrrôsz.RemoteDebugApplicationEvents.OnLeaveBreakPointcCs tdƒdS)rxrsNrryr r rrsøsz+RemoteDebugApplicationEvents.OnCreateThreadcCs tdƒdS)rxrtNrryr r rrtüsz,RemoteDebugApplicationEvents.OnDestroyThreadcCsdS)zšabf -- int - one of the axdebug.APPBREAKFLAGS constants rdat -- PyIRemoteDebugApplicationThread RaiseNotImpl("OnBreakFlagChange") Nr )rZabfrzr r rrusz.RemoteDebugApplicationEvents.OnBreakFlagChangeN)rr r rrZ!IID_IRemoteDebugApplicationEventsr rlrmrnrorprqrrrsrtrur r r rrkÑs rkc@s4eZdZddgZejgZdd„Zdd„Zdd„Z d S) ÚDebugExpressionContextÚParseLanguageTextÚGetLanguageInfocCsdSrr rr r rr szDebugExpressionContext.__init__cCs tdƒdS)z, result is IDebugExpression r|Nr)rÚcodeÚradixÚdelimrXr r rr|sz(DebugExpressionContext.ParseLanguageTextcCs tdƒdS)z9 result is (string langName, iid langId) r}Nrrr r rr}sz&DebugExpressionContext.GetLanguageInfoN) rr r rrZIID_IDebugExpressionContextr rr|r}r r r rr{s r{c@sDeZdZgd¢ZejgZdd„Zdd„Zdd„Z dd „Z d d „Z d S) ÚDebugExpression)ÚStartÚAbortÚQueryIsCompleteÚGetResultAsStringÚGetResultAsDebugPropertycCs tdƒdS)zP callback -- an IDebugExpressionCallback result - void r‚Nr)rÚcallbackr r rr‚%szDebugExpression.StartcCs tdƒdS)ú2 no params result -- void rƒNrrr r rrƒ-szDebugExpression.AbortcCs tdƒdS)rˆr„Nrrr r rr„4szDebugExpression.QueryIsCompletecCs tdƒdS)Nr…rrr r rr…;sz!DebugExpression.GetResultAsStringcCs tdƒdS)Nr†rrr r rr†>sz(DebugExpression.GetResultAsDebugPropertyN) rr r rrZIID_IDebugExpressionr r‚rƒr„r…r†r r r rr�sr�c@s"eZdZdgZejgZdd„ZdS)ÚProvideExpressionContextsÚEnumExpressionContextscCs tdƒdS)NrŠrrr r rrŠFsz0ProvideExpressionContexts.EnumExpressionContextsN)rr r rrZIID_IProvideExpressionContextsr rŠr r r rr‰Bsr‰)#rjZwin32com.server.connectrirdZwin32com.axdebugrZwin32com.axdebug.utilrrZwin32com.server.exceptionrZwin32com.server.utilrrrrrrrrrr)r0r1r<r@rIrKrNrTrYrkr{r�r‰r r r rÚs8       (=""/026'