Bug 134759 - [EFL][WK2] Add new Public API in ewk_download_job.h to get length of the data already downloaded
Summary: [EFL][WK2] Add new Public API in ewk_download_job.h to get length of the data...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-09 04:31 PDT by Shivakumar J M
Modified: 2014-07-09 21:14 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2014-07-09 04:38 PDT, Shivakumar J M
gyuyoung.kim: review-
Details | Formatted Diff | Diff
Patch-Updated-Review (4.17 KB, patch)
2014-07-09 05:00 PDT, Shivakumar J M
no flags Details | Formatted Diff | Diff
Patch for landing (4.37 KB, patch)
2014-07-09 20:22 PDT, Shivakumar J M
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shivakumar J M 2014-07-09 04:31:32 PDT
Currently there is no direct API in ewk_download_job.h to get length of the data already downloaded. so add new API in ewk_download_job.h.
Comment 1 Shivakumar J M 2014-07-09 04:38:06 PDT
Created attachment 234627 [details]
Patch

Add new API in ewk_download_job.h to get length of the data already downloaded.
Comment 2 Gyuyoung Kim 2014-07-09 04:41:34 PDT
Comment on attachment 234627 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234627&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_download_job.h:193
> +EAPI uint64_t ewk_download_get_received_data_length(const Ewk_Download_Job *download);

Missing API test for this new API.

And also, looks wrong API naming. Generally verb is placed at the end of function name in EFL function.

For example,
ewk_download_received_data_length_get()
Comment 3 Shivakumar J M 2014-07-09 05:00:57 PDT
Created attachment 234628 [details]
Patch-Updated-Review

Updated the Patch with review comments
Comment 4 Gyuyoung Kim 2014-07-09 05:04:23 PDT
(In reply to comment #0)
> Currently there is no direct API in ewk_download_job.h to get length of the data already downloaded. so add new API in ewk_download_job.h.

Could you explain why we have to add this API ? I wonder when application needs to know downloaded data length.
Comment 5 Shivakumar J M 2014-07-09 05:08:03 PDT
(In reply to comment #4)
> (In reply to comment #0)
> > Currently there is no direct API in ewk_download_job.h to get length of the data already downloaded. so add new API in ewk_download_job.h.
> 
> Could you explain why we have to add this API ? I wonder when application needs to know downloaded data length.

I feel these will be useful in multiple download and also for download manger kind of applications.
Comment 6 Gyuyoung Kim 2014-07-09 05:33:26 PDT
Comment on attachment 234628 [details]
Patch-Updated-Review

View in context: https://bugs.webkit.org/attachment.cgi?id=234628&action=review

LGTM except for minor nits.

> Source/WebKit2/UIProcess/API/efl/ewk_download_job.h:189
> + * @param download a #Ewk_Download_Job to query.

We haven't add period at @param and @return.

> Source/WebKit2/UIProcess/API/efl/ewk_download_job.h:191
> + * @return the length of the data already downloaded.

ditto.

> Source/WebKit2/UIProcess/API/efl/ewk_download_job.h:193
> +EAPI uint64_t ewk_download_job_received_data_length_get(const Ewk_Download_Job *download);

Isn't "data_size" more proper for this API ?

> Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h:71
> +    uint64_t receivedData() const;

receivedDataSize() ?
Comment 7 Shivakumar J M 2014-07-09 20:22:42 PDT
Created attachment 234684 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2014-07-09 21:13:59 PDT
Comment on attachment 234684 [details]
Patch for landing

Clearing flags on attachment: 234684

Committed r170951: <http://trac.webkit.org/changeset/170951>
Comment 9 WebKit Commit Bot 2014-07-09 21:14:06 PDT
All reviewed patches have been landed.  Closing bug.