PDFix SDK Callbacks.
More...
|
typedef int(* | PdfCancelProc) (void *data) |
| PdfCancelProc. More...
|
|
typedef void(* | PdfEventProc) (void *data) |
| PdfEventProc. More...
|
|
typedef unsigned long(* | PdfDigestDataProc) (int buffer_count, const unsigned char *buffer_to_sign[], unsigned long buffer_size[], unsigned char *sign_buff, unsigned long sign_buff_size, void *data) |
| PdfDigestDataProc. More...
|
|
typedef int(* | PsStreamReadProc) (uint8_t *buffer, int offset, int size, void *data) |
|
typedef int(* | PsStreamWriteProc) (const uint8_t *buffer, int offset, int size, void *data) |
|
typedef void(* | PsStreamDestroyProc) (void *data) |
| Called at end of stream so you can do clean up and free allocated memory. More...
|
|
typedef int(* | PsStreamGetSizeProc) (void *data) |
|
PDFix SDK Callbacks.
◆ PdfCancelProc
typedef int(* PdfCancelProc) (void *data) |
PdfCancelProc.
- Parameters
-
data | Pointer to user-supplied data to pass to PdfCancelProc each time it is called. |
- Returns
- true if process should be cancelled, false otherwise.
◆ PdfDigestDataProc
typedef unsigned long(* PdfDigestDataProc) (int buffer_count, const unsigned char *buffer_to_sign[], unsigned long buffer_size[], unsigned char *sign_buff, unsigned long sign_buff_size, void *data) |
PdfDigestDataProc.
- Parameters
-
buffer_count | |
buffer_to_sign | |
buffer_size | |
sign_buff | (filled by method) If the buffer is null function returns required length of the buffer. |
sign_buff_size | Length of a signed buffer. |
data | Pointer to user-supplied data to pass to PdfDigestDataProc each time it is called. |
- Returns
- Required lenght.
- See also
- PdfCustomDigSig::RegisterDigestDataLenProc
◆ PdfEventProc
typedef void(* PdfEventProc) (void *data) |
PdfEventProc.
- Parameters
-
data | Pointer to user-supplied data to pass to PdfEventProc each time it is called. |
- See also
- Pdfix::RegisterEvent
◆ PsStreamDestroyProc
typedef void(* PsStreamDestroyProc) (void *data) |
Called at end of stream so you can do clean up and free allocated memory.
- Parameters
-
data | User-supplied data that was passed. |
◆ PsStreamGetSizeProc
typedef int(* PsStreamGetSizeProc) (void *data) |
This is called to get the length of the stream, which may be NULL if the stream cannot be set to a new position. PsStreamSeekProc() and PsStreamGetLength() must be provided together.
- Parameters
-
data | User-supplied data that was passed. |
- Returns
- The size of the stream in bytes.
◆ PsStreamReadProc
typedef int(* PsStreamReadProc) (uint8_t *buffer, int offset, int size, void *data) |
Called by the PsStream object for Read operation. This procedure must return the number of bytes specified by size, obtaining them in any way it wishes. If your procedure reads data from a file, it is generally quite inefficient to open the file, read the bytes, then close the file each time bytes are requested. Instead, consider opening the file the first time bytes are requested from it, reading the entire file into a secondary buffer, and closing the file.When subsequent requests for data from the file are received, simply copy data from the secondary buffer, rather than re - opening the file.
- Parameters
-
buffer | Buffer into which your procedure must place the number of bytes specified by size. |
offset | The seek position. |
size | The size of data in bytes. |
data | User-supplied data that was passed. |
- Returns
- The number of bytes actually read or written.
◆ PsStreamWriteProc
typedef int(* PsStreamWriteProc) (const uint8_t *buffer, int offset, int size, void *data) |
Called by the PsStream object for Write operation. This procedure must return the number of bytes specified by size, obtaining them in any way it wishes. If your procedure reads data from a file, it is generally quite inefficient to open the file, read the bytes, then close the file each time bytes are requested. Instead, consider opening the file the first time bytes are requested from it, reading the entire file into a secondary buffer, and closing the file.When subsequent requests for data from the file are received, simply copy data from the secondary buffer, rather than re - opening the file.
- Parameters
-
buffer | Buffer which your procedure must place the number of bytes specified by size. |
offset | The seek position. |
size | The size of data in bytes. |
data | User-supplied data that was passed. |
- Returns
- The number of bytes actually read or written.