Foxit PDF SDK
<FSAsyncReaderCallback> Protocol Reference
Inheritance diagram for <FSAsyncReaderCallback>:
<FSFileReaderCallback>

Instance Methods

(BOOL) - addDownloadHint:size:
 A callback function used to add offset and size to specify a data section, which should be downloaded by application then. More...
 
(BOOL) - isDataAvail:size:
 A callback function used to check whether the specified data section is available or not. More...
 
- Instance Methods inherited from <FSFileReaderCallback>
(unsigned long long) - getSize
 Get total size of the file. More...
 
(NSData *) - readBlock:size:
 Read a data block from the file. More...
 

Detailed Description

This class represents a callback object to do file reading asynchronously. This class is derived from class FSFileReaderCallback. All the pure virtual functions in this class and its base class are used as callback functions and should be implemented by user, in order to asynchronously read file data (especially used for loading document), in a customized way.

See also
FSFileReaderCallback

Method Documentation

◆ addDownloadHint:size:()

- (BOOL) addDownloadHint: (int)  offset
size: (int)  size 
required

A callback function used to add offset and size to specify a data section, which should be downloaded by application then.

Foxit PDF SDK would call this callback function to report downloading hints for the download manager of application.
The position (as offset) 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.

Parameters
[in]offsetThe offset of a data section, which is to be hinted.
[in]sizeThe size of the data section.
Returns
YES means success, while NO means failure.

◆ isDataAvail:size:()

- (BOOL) isDataAvail: (int)  offset
size: (int)  size 
required

A callback function used to check whether the specified data section is available or not.

A data section is available only if all bytes in the section are available.

Parameters
[in]offsetThe offset in file.
[in]sizeThe size of the data section, which is to be checked if available.
Returns
YES means the specified data section is available, while NO means the specified data section is not available yet.