mň
a&Gc           @   sđ   d  k  l Z d k  l Z d e f d     YZ d e f d     YZ y d k l Z d k l Z Wn- e j
 o! d k	 l Z d k
 l Z n Xd e f d	     YZ d
 e f d     YZ d e f d     YZ d e f d     YZ d S(   (   s	   Interface(   s
   implementst   IExtFilec           B   ső   t  Z d  Z d d e e e d  Z d   Z e e e e d d d  Z d   Z d   Z	 d   Z
 d   Z d	   Z d
   Z d d d  Z d   Z d   Z d   Z d d e d  Z d d e d  Z d d e d  Z e d  Z d   Z RS(   s   ExtFile public interfacei    c         C   s   d S(   s.   The default view. Returns the file's contents.N(    (   t   icont   previewt   widtht   heightt   REQUEST(    (    tA   /home2/kennisonb/webapps/zope/Zope/Products/ExtFile/interfaces.pyt
   index_html   s    c           C   s   d S(   s3   Redirects to the default view of the file or image.N(    (    (    (    R   t   view_image_or_file   s    c         K   s   d S(   s/   Returns an HTML link tag for the file or image.N(    (   t   textt	   structuret   titlet	   css_classR   R   t   args(    (    R   t   link   s    c           C   s   d S(   s:   Returns true if the file does not exist in the repository.N(    (    (    (    R   t	   is_broken   s    c           C   s   d S(   s&   Returns the size of the file or image.N(    (    (    (    R   t   get_size   s    c           C   s   d S(   s:   Returns a formatted, stringified version of the file size.N(    (    (    (    R   t   size   s    c           C   s   d S(   s(   Returns the filesystem path of the file.N(    (    (    (    R   t   get_filename   s    c           C   s   d S(   s,   Returns the file's content type (MIME type).N(    (    (    (    R   t   getContentType"   s    c           C   s   d S(   s<   Returns true if EXTFILE_STATIC_PATH is set, false otherwise.N(    (    (    (    R   t   static_mode%   s    c         C   s   d S(   sK   In static mode, returns the static URL of the file, absolute_url otherwise.N(    (   R   R   (    (    R   t
   static_url(   s    c           C   s   d S(   s/   Redirects to the icon for the file's MIME type.N(    (    (    (    R   t   icon_gif+   s    c           C   s   d S(   s'   Returns an HTML image tag for the icon.N(    (    (    (    R   t   icon_tag.   s    c           C   s   d S(   sA   Returns the filesystem path of the icon for the file's MIME type.N(    (    (    (    R   t   getIconPath1   s    t    c         C   s   d S(   s   Changes the properties.N(    (   R   t   descrR   (    (    R   t   manage_editExtFile4   s    c         C   s   d S(   s;   Uploads a file from a file handle, Pdata, or string buffer.N(    (   t   filet   content_typeR   (    (    R   t   manage_upload7   s    c         C   s   d S(   s=   Uploads a file from a file handle, Pdata, or local directory.N(    (   R   R   R   (    (    R   t   manage_file_upload:   s    c         C   s   d S(   s#   Uploads a file from an HTTP server.N(    (   t   urlR   (    (    R   t   manage_http_upload=   s    c           C   s   d S(   s=   Returns the contents of text/* files, empty string otherwise.N(    (    (    (    R   t   PrincipiaSearchSource@   s    (   t   __name__t
   __module__t   __doc__t   NoneR   R   t   FalseR   R   R   R   R   R   R   R   R   R   R   R   R   R   R!   R"   (    (    (    R   R    	   s&    										t	   IExtImagec           B   sF  t  Z d  Z d d e e e d d d d e e e d  Z d   Z d   Z d   Z d   Z d   Z	 e e e d d d e e d	  Z
 e e e e d
  Z d   Z d   Z d   Z d   Z d   Z d   Z d d d e d  Z e d  Z d d d d d d d e d  Z d d d d d d d e d  Z d e d  Z RS(   s   ExtImage public interfacei    t   0c         K   s   d S(   s)   Returns an HTML image tag for this image.N(    (   R   R   R   R   t   altt   scalet   xscalet   yscalet   borderR   R   R   R   (    (    R   t   tagG   s    c           C   s   d S(   s*   Returns the pixel width of the main image.N(    (    (    (    R   R   L   s    c           C   s   d S(   s+   Returns the pixle height of the main image.N(    (    (    (    R   R   O   s    c           C   s   d S(   s)   Returns the PIL file format of the image.N(    (    (    (    R   t   formatR   s    c           C   s   d S(   sF   Returns true if the file format is GIF, JPEG, or PNG; false otherwise.N(    (    (    (    R   t   is_webviewableU   s    c           C   s   d S(   s   Redirects to the preview image.N(    (    (    (    R   R   X   s    c   	      K   s   d S(   s0   Returns an HTML image tag for the preview image.N(    (	   R   R   R*   R+   R,   R-   R   R   R   (    (    R   t   preview_tag[   s    c         K   s   d S(   s/   Returns an HTML link tag for the preview image.N(    (   R	   R
   R   R   R   (    (    R   t   preview_link`   s    c           C   s   d S(   s=   Returns the HTML image tag for a thumbnail view of the image.N(    (    (    (    R   t   thumbnail_tagd   s    c           C   s   d S(   s&   Returns the size of the preview image.N(    (    (    (    R   t   get_prev_sizeg   s    c           C   s   d S(   sB   Returns a formatted stringified version of the preview image size.N(    (    (    (    R   t	   prev_sizej   s    c           C   s   d S(   s-   Returns the pixel width of the preview image.N(    (    (    (    R   t
   prev_widthm   s    c           C   s   d S(   s.   Returns the pixel height of the preview image.N(    (    (    (    R   t   prev_heightp   s    c           C   s   d S(   s1   Returns the filesystem path of the preview image.N(    (    (    (    R   t   get_prev_filenames   s    c         C   s   d S(   s'   Create the preview from the main image.N(    (   t   maxxt   maxyt   ratioR   (    (    R   t   manage_create_prevv   s    c         C   s   d S(   s   Deletes the preview image.N(    (   R   (    (    R   t   manage_del_prevy   s    R   c         C   s   d S(   sH   Uploads an image or preview from a file handle, Pdata, or string buffer.N(    (   R   R   t
   is_previewt   create_prevR:   R;   R<   R   (    (    R   R   |   s    c         C   s   d S(   sJ   Uploads an image or preview from a file handle, Pdata, or local directory.N(    (   R   R   R?   R@   R:   R;   R<   R   (    (    R   R      s    c         C   s   d S(   s0   Uploads an image or preview from an HTTP server.N(    (   R    R?   R   (    (    R   R!      s    (   R#   R$   R%   R&   R/   R   R   R0   R1   R   R2   R'   R3   R4   R5   R6   R7   R8   R9   R=   R>   R   R   R!   (    (    (    R   R(   D   s(    -					!						!!(   s   IObjectEvent(   s   ObjectEventt   IExtFileUpdatedEventc           B   s   t  Z d  Z RS(   s'   Event fired when file data has changed.(   R#   R$   R%   (    (    (    R   RA      s   t   ExtFileUpdatedEventc           B   s   t  Z e e  RS(   N(   R#   R$   t
   implementsRA   (    (    (    R   RB      s   t   IExtImageUpdatedEventc           B   s   t  Z d  Z RS(   s(   Event fired when image data has changed.(   R#   R$   R%   (    (    (    R   RD      s   t   ExtImageUpdatedEventc           B   s   t  Z e e  RS(   N(   R#   R$   RC   RD   (    (    (    R   RE      s   N(   t   zope.interfacet	   InterfaceRC   R    R(   t   zope.component.interfacest   IObjectEventt   ObjectEventt   ImportErrort   zope.app.event.interfacest   zope.app.event.objecteventRA   RB   RD   RE   (
   RC   RB   RJ   R(   R    RE   RI   RD   RG   RA   (    (    R   t   ?   s   ;D