entities/adapters.py
changeset 10732 6231587fcfc5
parent 10731 0736e31f8644
child 10973 0939ad2edf63
equal deleted inserted replaced
10731:0736e31f8644 10732:6231587fcfc5
   169     """interface for downloadable entities"""
   169     """interface for downloadable entities"""
   170     __regid__ = 'IDownloadable'
   170     __regid__ = 'IDownloadable'
   171     __abstract__ = True
   171     __abstract__ = True
   172 
   172 
   173     def download_url(self, **kwargs): # XXX not really part of this interface
   173     def download_url(self, **kwargs): # XXX not really part of this interface
   174         """return a URL to download entity's content"""
   174         """return a URL to download entity's content
       
   175 
       
   176         It should be a unicode object containing url-encoded ASCII."""
   175         raise NotImplementedError
   177         raise NotImplementedError
   176 
   178 
   177     def download_content_type(self):
   179     def download_content_type(self):
   178         """return MIME type of the downloadable content"""
   180         """return MIME type (unicode) of the downloadable content"""
   179         raise NotImplementedError
   181         raise NotImplementedError
   180 
   182 
   181     def download_encoding(self):
   183     def download_encoding(self):
   182         """return encoding of the downloadable content"""
   184         """return encoding (unicode) of the downloadable content"""
   183         raise NotImplementedError
   185         raise NotImplementedError
   184 
   186 
   185     def download_file_name(self):
   187     def download_file_name(self):
   186         """return file name of the downloadable content"""
   188         """return file name (unicode) of the downloadable content"""
   187         raise NotImplementedError
   189         raise NotImplementedError
   188 
   190 
   189     def download_data(self):
   191     def download_data(self):
   190         """return actual data (bytes) of the downloadable content"""
   192         """return actual data (bytes) of the downloadable content"""
   191         raise NotImplementedError
   193         raise NotImplementedError