2011/1/28 Carsten Haitzler <ras...@rasterman.com>:
> On Fri, 28 Jan 2011 13:13:47 +0100 (CET) Vincent Torri <vto...@univ-evry.fr>
> said:
>
>>
>> > the doc didnt even say what the return of the progress func does - that bit
>> > of the doc refers to something unrelated. i fixed the docs to document the
>> > return value.
>>
>> you didn't answer my question. Again I paste the doc:
>>
>>
>>   * The
>>   * @p progress_cb is called during the download operation, each time a
>>   * packet is received or when CURL wants. It can be used to display the
>>   * percentage of the downloaded file. Return 0 from this callback if 
>> provided
>>   * to continue the operation or anything else to abort the download. The 
>> only
>>   * operations that can be aborted are those with protocol 'http' or 'ftp'. 
>> In
>>   * that case @p job_ret can be filled. It can be used with
>>   * ecore_file_download_abort() or ecore_file_download_abort_all() to
>>   * respectively abort one or all download operations

what about at least add 2 define:
ECORE_DOWNLOAD_CONTINUE = 0
ECORE_DOWNLOAD_ABORT = 1

DaveMDS

>>
>> So it says:
>>
>> 1) if one returns 0 to the progress cb, one aborts the download
>> 2) if we want to abort the download, we can use the job.
>>
>> Questions:
>>
>> a) which on is the correct way to abort a download ?
>>
>> b) don't you think it's a design error to allow abortion for a callback
>> that is used to get informations (the progress callback) ?
>>
>> So, please, answer these questions precisely.
>
> i didn't write the function. i have no answer for you. i simply documented its
> current behavior. it's staying as-is because that's how it is, how it now
> works, how code that depends on it now is expecting it to work. i see no 
> reason
> why the progress callback couldnt abort by return value - eg if download 
> amount
> is too big (maximum download limit). i'm not going to get into a debate on
> minutiae of a callback right now before release. it stays as-is. too bad. too
> late. if it mattered then this should have been brought up years ago when this
> function was written.
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    ras...@rasterman.com
>
>

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to