ó
[łXMc           @   s6   d  d l  Z  e  j d e d  d d d     YZ d S(   i˙˙˙˙NsZ   Create your own event dispatching mechanism, twisted.python.dispatch will soon be no more.i   t   EventDispatcherc           B   s5   e  Z d  Z d d  Z d   Z d   Z d   Z RS(   sj  
    A global event dispatcher for events.
    I'm used for any events that need to span disparate objects in the client.

    I should only be used when one object needs to signal an object that it's
    not got a direct reference to (unless you really want to pass it through
    here, in which case I won't mind).

    I'm mainly useful for complex GUIs.
    t   event_c         C   s   | |  _  i  |  _ d  S(   N(   t   prefixt	   callbacks(   t   selfR   (    (    s;   /usr/lib/python2.7/dist-packages/twisted/python/dispatch.pyt   __init__   s    	c         C   s    |  j  j | g   j |  d  S(   N(   R   t
   setdefaultt   append(   R   t   namet   meth(    (    s;   /usr/lib/python2.7/dist-packages/twisted/python/dispatch.pyt   registerHandler   s    c         C   s]   d d l  m } i  } | j | | |  j  x* | j   D] \ } } |  j | |  q9 Wd  S(   Ni˙˙˙˙(   t   reflect(   t   twisted.pythonR   t   accumulateMethodsR   t   itemsR
   (   R   t   objR   t   dt   kt   v(    (    s;   /usr/lib/python2.7/dist-packages/twisted/python/dispatch.pyt   autoRegister    s
    c         O   s)   x" |  j  | D] } | | |   q Wd  S(   N(   R   (   R   R   t   argst   kwargst   cb(    (    s;   /usr/lib/python2.7/dist-packages/twisted/python/dispatch.pyt   publishEvent(   s    (   t   __name__t
   __module__t   __doc__R   R
   R   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/twisted/python/dispatch.pyR       s
   
		(    (   t   warningst   warnt   DeprecationWarningR    (    (    (    s;   /usr/lib/python2.7/dist-packages/twisted/python/dispatch.pyt   <module>   s   
