ó
—ã=Pc           @   s‚   d  Z  d e f d „  ƒ  YZ d d d „  ƒ  YZ d d d „  ƒ  YZ d d d „  ƒ  YZ d	 d d
 „  ƒ  YZ d e f d „  ƒ  YZ d S(   s)   
Contains transport interface (classes).
t   TransportErrorc           B   s   e  Z d d  „ Z RS(   c         C   s&   t  j |  | ƒ | |  _ | |  _ d  S(   N(   t	   Exceptiont   __init__t   httpcodet   fp(   t   selft   reasonR   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR      s    	N(   t   __name__t
   __module__t   NoneR   (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR       s   t   Requestc           B   s#   e  Z d  Z d d „ Z d „  Z RS(   s  
    A transport request
    @ivar url: The url for the request.
    @type url: str
    @ivar message: The message to be sent in a POST request.
    @type message: str
    @ivar headers: The http headers to be used for the request.
    @type headers: dict
    c         C   s   | |  _  i  |  _ | |  _ d S(   s²   
        @param url: The url for the request.
        @type url: str
        @param message: The (optional) message to be send in the request.
        @type message: str
        N(   t   urlt   headerst   message(   R   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   '   s    		c         C   sX   g  } | j  d |  j ƒ | j  d |  j ƒ | j  d ƒ | j  |  j ƒ d j | ƒ S(   Ns   URL:%ss   HEADERS: %ss   MESSAGE:s   
(   t   appendR   R   R   t   join(   R   t   s(    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   __str__2   s    N(   R   R   t   __doc__R	   R   R   (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR
      s   	t   Replyc           B   s    e  Z d  Z d „  Z d „  Z RS(   s  
    A transport reply
    @ivar code: The http code returned.
    @type code: int
    @ivar message: The message to be sent in a POST request.
    @type message: str
    @ivar headers: The http headers to be used for the request.
    @type headers: dict
    c         C   s   | |  _  | |  _ | |  _ d S(   s÷   
        @param code: The http code returned.
        @type code: int
        @param headers: The http returned headers.
        @type headers: dict
        @param message: The (optional) reply message received.
        @type message: str
        N(   t   codeR   R   (   R   R   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   F   s    			c         C   sX   g  } | j  d |  j ƒ | j  d |  j ƒ | j  d ƒ | j  |  j ƒ d j | ƒ S(   Ns   CODE: %ss   HEADERS: %ss   MESSAGE:s   
(   R   R   R   R   R   (   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   S   s    (   R   R   R   R   R   (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   ;   s   		t	   Transportc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s%   
    The transport I{interface}.
    c         C   s#   d d l  m } | ƒ  |  _ ~ d S(   s   
        Constructor.
        iÿÿÿÿ(   t   OptionsN(   t   suds.transport.optionsR   t   options(   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   a   s    c         C   s   t  d ƒ ‚ d S(   sø   
        Open the url in the specified request.
        @param request: A transport request.
        @type request: L{Request}
        @return: An input stream.
        @rtype: stream
        @raise TransportError: On all transport errors.
        s   not-implementedN(   R   (   R   t   request(    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   openi   s    	c         C   s   t  d ƒ ‚ d S(   sª  
        Send soap message.  Implementations are expected to handle:
            - proxies
            - I{http} headers
            - cookies
            - sending message
            - brokering exceptions into L{TransportError}
        @param request: A transport request.
        @type request: L{Request}
        @return: The reply
        @rtype: L{Reply}
        @raise TransportError: On all transport errors.
        s   not-implementedN(   R   (   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   sendt   s    (   R   R   R   R   R   R   (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   \   s   		t   Cachec           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s!   
    The URL caching object.
    c         C   s   t  d ƒ ‚ d S(   sÎ   
        Put an item into the cache.
        @param url: A url.
        @type url: str
        @param fp: A file stream.
        @type fp: stream
        @return: The stream.
        @rtype: stream
        s   not-implementedN(   R   (   R   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   putŠ   s    
c         C   s   t  d ƒ ‚ d S(   s®   
        Get an item from the cache by url.
        @param url: A url.
        @type url: str
        @return: A stream when found, else None.
        @rtype: stream
        s   not-implementedN(   R   (   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   get–   s    c         C   s   t  d ƒ ‚ d S(   s)   
        Clear the cached items.
        s   not-implementedN(   R   (   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   clear    s    (   R   R   R   R   R   R   (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   …   s   		
t   NoCachec           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s(   
    The NO caching implementation.
    c         C   s   | S(   sÎ   
        Put an item into the cache.
        @param url: A url.
        @type url: str
        @param fp: A file stream.
        @type fp: stream
        @return: The stream.
        @rtype: stream
        (    (   R   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   ¬   s    
c         C   s   d S(   s®   
        Get an item from the cache by url.
        @param url: A url.
        @type url: str
        @return: A stream when found, else None.
        @rtype: stream
        N(   R	   (   R   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   ¸   s    c         C   s   d S(   s)   
        Clear the cached items.
        N(    (   R   (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR   Â   s    (   R   R   R   R   R   R   (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyR    §   s   		
N(    (    (    (    (   R   R   R    R
   R   R   R   R    (    (    (    s/   suds-0.3.7-py2.6.egg/suds/transport/__init__.pyt   <module>   s   !)"