FSPDF_ASYNCFILEHANDLER Struct Reference

Structure for receiving download hints. More...

#include <fpdf_async_r.h>

Public Attributes

FS_LPVOID clientData
 User-defined data. More...
 
FS_RESULT(* GetFile )(FS_LPVOID clientData, FSCRT_FILE *file)
 Foxit PDF SDK calls this interface to get the file which is to be opened. More...
 
FS_RESULT(* IsDataAvail )(FS_LPVOID clientData, FS_DWORD offset, FS_DWORD size)
 Foxit PDF SDK calls this interface to report whether the specified data section is available or not. More...
 
FS_RESULT(* AddDownloadHint )(FS_LPVOID clientData, FS_DWORD offset, FS_DWORD size)
 Foxit PDF SDK calls this interface to add a section which is to be downloaded. More...
 

Detailed Description

Structure for receiving download hints.

Member Data Documentation

FS_RESULT(* FSPDF_ASYNCFILEHANDLER::AddDownloadHint) (FS_LPVOID clientData, FS_DWORD offset, FS_DWORD size)

Foxit PDF SDK calls this interface to add a section which is to be downloaded.

Parameters
[in]clientDataPointer to user-defined data.
[in]offsetThe offset of the hit reported to be downloaded.
[in]sizeThe size of the hit reported to be downloaded.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if any error occurs.
For more error codes, please refer to the macro definitions FSCRT_ERRCODE_XXX.
Note
Called by the Foxit PDF SDK to report downloading hints for the download manager.
The position and size of the section may not be accurate because part of the section might already be available. The download manager must manage this to maximize download efficiency.
FS_LPVOID FSPDF_ASYNCFILEHANDLER::clientData

User-defined data.

Note
Caller can use this field to track controls.
FS_RESULT(* FSPDF_ASYNCFILEHANDLER::GetFile) (FS_LPVOID clientData, FSCRT_FILE *file)

Foxit PDF SDK calls this interface to get the file which is to be opened.

Parameters
[in]clientDataPointer to user-defined data.
[out]filePointer to a FSCRT_FILE handle that receives the file object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if the parameter file is a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to the macro definitions FSCRT_ERRCODE_XXX.
FS_RESULT(* FSPDF_ASYNCFILEHANDLER::IsDataAvail) (FS_LPVOID clientData, FS_DWORD offset, FS_DWORD size)

Foxit PDF SDK calls this interface to report whether the specified data section is available or not.

Parameters
[in]clientDataPointer to user-defined data.
[in]offsetThe offset of the hint reported to be downloaded.
[in]sizeThe size of the hint reported to be downloaded.
Returns
FSCRT_ERRCODE_SUCCESS if the data section is ready.
FSCRT_ERRCODE_DATANOTREADY if the data section is not ready.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to the macro definitions FSCRT_ERRCODE_XXX.
Note
A data section is available only if all bytes in the section are available.

The documentation for this struct was generated from the following file:

Foxit Corporation