diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-09-29 16:36:50 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-02 16:15:29 +0000 |
commit | 73784e81928a664169f0ae013707fdfb0e82e70d (patch) | |
tree | 5ab0f7b9db0de50ebf4c03da3e614e35b7fbd667 /public | |
parent | 522e100534c78b026d170d5625c1e72046a6953c (diff) | |
download | pdfium-73784e81928a664169f0ae013707fdfb0e82e70d.tar.xz |
Allow to use null FX_DOWNLOADHINTS to check data availability
This is allow us check document/pages/form availability using
FPDFAvail_IsXXAvail without download requests.
Change-Id: Ie4525147d8b8e98573d53b2e5b456b632a8a1951
Reviewed-on: https://pdfium-review.googlesource.com/13030
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdf_dataavail.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/public/fpdf_dataavail.h b/public/fpdf_dataavail.h index 12a77146d7..3ce92110ac 100644 --- a/public/fpdf_dataavail.h +++ b/public/fpdf_dataavail.h @@ -103,6 +103,7 @@ typedef struct _FX_DOWNLOADHINTS { // Applications should call this function whenever new data arrives, and process // all the generated download hints, if any, until the function returns // |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|. +// if hints is nullptr, the function just check current document availability. // // Once all data is available, call |FPDFAvail_GetDocument| to get a document // handle. @@ -150,6 +151,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc); // all the generated download |hints|, if any, until this function returns // |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|. Applications can then perform page // loading. +// if hints is nullptr, the function just check current availability of +// specified page. FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsPageAvail(FPDF_AVAIL avail, int page_index, FX_DOWNLOADHINTS* hints); @@ -171,6 +174,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsPageAvail(FPDF_AVAIL avail, // The application should call this function whenever new data arrives and // process all the generated download |hints|, if any, until the function // |PDF_FORM_ERROR|, |PDF_FORM_AVAIL| or |PDF_FORM_NOTEXIST|. +// if hints is nullptr, the function just check current form availability. +// // Applications can then perform page loading. It is recommend to call // |FPDFDOC_InitFormFillEnvironment| when |PDF_FORM_AVAIL| is returned. FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsFormAvail(FPDF_AVAIL avail, |