Index: public/fpdf_dataavail.h |
diff --git a/public/fpdf_dataavail.h b/public/fpdf_dataavail.h |
index c17f0311ab3e599387f3efc1432433e19ea2cfc2..a2b2d7a1b96733d9c25cf9e3dbd5a69050489321 100644 |
--- a/public/fpdf_dataavail.h |
+++ b/public/fpdf_dataavail.h |
@@ -12,9 +12,11 @@ |
#include "fpdfview.h" |
/** The result of the process which check linearized PDF. */ |
-#define FSDK_IS_LINEARIZED 1 |
-#define FSDK_NOT_LINEARIZED 0 |
#define FSDK_UNKNOW_LINEARIZED -1 |
+#define FSDK_NOT_LINEARIZED 0 |
+#define FSDK_IS_LINEARIZED 1 |
+#define PDFFORM_NOTAVAIL 0 |
Tom Sepez
2015/09/22 19:17:59
can we just use a bool here?
jun_fang
2015/09/23 12:26:59
It's used to check the return value from CPDF_Data
Tom Sepez
2015/09/24 18:24:40
So are we duplicating definitions in another heade
|
+#define PDFFORM_AVAIL 1 |
#ifdef __cplusplus |
extern "C" { |
@@ -130,17 +132,16 @@ typedef struct _FX_DOWNLOADHINTS { |
* hints - Pointer to a download hints interface, receiving |
* generated hints |
* Return value: |
-* Non-zero for page is fully available, 0 for page not yet available. |
+* true is fully available, false for page not yet available. |
* Comments: |
* The application should call this function whenever new data arrived, |
* and process all the |
-* generated download hints if any, until the function returns non-zero |
-* value. Then the |
-* application can call FPDFAvail_GetDocument() to get a document |
+* generated download hints if any, until the function returns true. |
+* Then the application can call FPDFAvail_GetDocument() to get a document |
* handle. |
*/ |
-DLLEXPORT int STDCALL FPDFAvail_IsDocAvail(FPDF_AVAIL avail, |
- FX_DOWNLOADHINTS* hints); |
+DLLEXPORT FPDF_BOOL STDCALL |
+FPDFAvail_IsDocAvail(FPDF_AVAIL avail, FX_DOWNLOADHINTS* hints); |
Tom Sepez
2015/09/22 19:17:59
nit: did you run git cl format?
Lei Zhang
2015/09/22 23:33:43
I believe "git cl format" changed its mind at some
jun_fang
2015/09/23 12:26:59
you are right. I did run git cl format. This mista
|
/** |
* Function: FPDFAvail_GetDocument |
@@ -189,19 +190,18 @@ DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc); |
* hints - Pointer to a download hints interface, receiving |
* generated hints |
* Return value: |
-* Non-zero for page is fully available, 0 for page not yet available. |
+* true is fully available, false for page not yet available. |
* Comments: |
* This function call be called only after FPDFAvail_GetDocument if |
* called. |
* The application should call this function whenever new data arrived, |
* and process all the |
-* generated download hints if any, until the function returns non-zero |
-* value. Then the |
-* application can perform page loading. |
+* generated download hints if any, until the function returns true. |
+* Then the application can perform page loading. |
*/ |
-DLLEXPORT int STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail, |
- int page_index, |
- FX_DOWNLOADHINTS* hints); |
+DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail, |
+ int page_index, |
+ FX_DOWNLOADHINTS* hints); |
/** |
* Function: FPDFAvail_ISFormAvail |
@@ -243,18 +243,18 @@ DLLEXPORT int STDCALL FPDFAvail_IsFormAvail(FPDF_AVAIL avail, |
* avail - Handle to document availability provider returned by |
* FPDFAvail_Create |
* Return value: |
-* return TRUE means the document is linearized PDF else not. |
* FSDK_IS_LINEARIZED is a linearize file. |
* FSDK_NOT_LINEARIZED is not a linearize file. |
* FSDK_UNKNOW_LINEARIZED don't know whether the file is a linearize |
* file. |
* Comments: |
-* It return TRUE/FALSE as soon as we have first 1K data. If the |
-* file's size less than |
-* 1K,we don't known whether the PDF is a linearized file. |
+* It return FSDK_IS_LINEARIZED or FSDK_NOT_LINEARIZED as soon as |
+* we have first 1K data. If the file's size less than 1K, it returns |
+* FSDK_UNKNOW_LINEARIZED because there is no enough information to |
Lei Zhang
2015/09/22 23:33:43
"not enough"
jun_fang
2015/09/23 12:26:59
Acknowledged.
|
+* tell whether the PDF is a linearized file or not. |
* |
*/ |
-DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail); |
+DLLEXPORT int STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail); |
#ifdef __cplusplus |
} |