#include <stdarg.h>
#include <stdio.h>
Go to the source code of this file.
|
static pos_t STDCALL | PdfToolsSysFILEPtrGetLength__ (void *handle) |
| Callback implementation for TPdfToolsSys_StreamDescriptor::pfGetLength for FILE* .
|
|
static int STDCALL | PdfToolsSysFILEPtrSeek__ (void *handle, pos_t iPos) |
| Callback implementation for TPdfToolsSys_StreamDescriptor::pfSeek for FILE* .
|
|
static pos_t STDCALL | PdfToolsSysFILEPtrTell__ (void *handle) |
| Callback implementation for TPdfToolsSys_StreamDescriptor::pfTell for FILE* .
|
|
static size_t STDCALL | PdfToolsSysFILEPtrRead__ (void *handle, void *pData, size_t nSize) |
| Callback implementation for TPdfToolsSys_StreamDescriptor::pfRead for FILE* .
|
|
static size_t STDCALL | PdfToolsSysFILEPtrWrite__ (void *handle, const void *pData, size_t nSize) |
| Callback implementation for TPdfToolsSys_StreamDescriptor::pfWrite for FILE* .
|
|
static void STDCALL | PdfToolsSysFILEPtrRelease__ (void *handle) |
| Callback implementation for TPdfToolsSys_StreamDescriptor::pfRelease for FILE* .
|
|
static void | PdfToolsSysCreateFILEStreamDescriptor (TPdfToolsSys_StreamDescriptor *pDescriptor, FILE *handle, int bCloseOnRelease) |
| Initialization function for TPdfToolsSys_StreamDescriptor for FILE* .
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsSys_PathStreamDescriptor_CreateA (TPdfToolsSys_StreamDescriptor *pDescriptor, const char *szPath, BOOL bIsReadOnly) |
| Initialization function for TPdfToolsSys_StreamDescriptor for a given path.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsSys_PathStreamDescriptor_CreateW (TPdfToolsSys_StreamDescriptor *pDescriptor, const WCHAR *szPath, BOOL bIsReadOnly) |
| Initialization function for TPdfToolsSys_StreamDescriptor for a given path.
|
|
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfToolsSys_PathStreamDescriptor_Close (TPdfToolsSys_StreamDescriptor *pDescriptor) |
| Close the underlying file.
|
|
◆ PdfToolsSys_PathStreamDescriptor_Create
◆ TGetLength
◆ TPdfToolsSys_StreamDescriptor
typedef struct TPdfToolsSys_StreamDescriptor TPdfToolsSys_StreamDescriptor |
Structure that groups a set of callbacks that model streams.
◆ TRead
typedef size_t(STDCALL * TRead) (void *handle, void *pData, size_t nSize) |
◆ TRelease
typedef void(STDCALL * TRelease) (void *handle) |
◆ TSeek
◆ TTell
◆ TWrite
typedef size_t(STDCALL * TWrite) (void *handle, const void *pData, size_t nSize) |
◆ PdfToolsSys_PathStreamDescriptor_Close()
Close the underlying file.
- Parameters
-
◆ PdfToolsSys_PathStreamDescriptor_CreateA()
Initialization function for TPdfToolsSys_StreamDescriptor for a given path.
- Parameters
-
[out] | pDescriptor | Stream descriptor that is initialized. |
[in] | szPath | Path to a file for which a stream descriptor shall be initialized. |
[in] | bIsReadOnly | If set TRUE the stream only allows for reading; if set to FALSE the stream allows for reading and writing. |
- Returns
- TRUE file opened successfully; FALSE failed to open the file.
◆ PdfToolsSys_PathStreamDescriptor_CreateW()
Initialization function for TPdfToolsSys_StreamDescriptor for a given path.
- Parameters
-
[out] | pDescriptor | Stream descriptor that is initialized. |
[in] | szPath | Path to a file for which a stream descriptor shall be initialized. |
[in] | bIsReadOnly | If set TRUE the stream only allows for reading; if set to FALSE the stream allows for reading and writing. |
- Returns
- TRUE file opened successfully; FALSE failed to open the file.
◆ PdfToolsSysCreateFILEStreamDescriptor()
Initialization function for TPdfToolsSys_StreamDescriptor for FILE*
.
- Parameters
-
[out] | pDescriptor | FILE* stream descriptor that is initialized. |
[in] | handle | Handle of stream. |
[in] | bCloseOnRelease | Determines if the stream needs to be explicitly closed by fclose((FILE*)handle) . If set TRUE the stream does not need to be explicitly closed; if set FALSE the stream needs to be explicitly closed. |
◆ PdfToolsSysFILEPtrGetLength__()
static pos_t STDCALL PdfToolsSysFILEPtrGetLength__ |
( |
void * | handle | ) |
|
|
static |
◆ PdfToolsSysFILEPtrRead__()
static size_t STDCALL PdfToolsSysFILEPtrRead__ |
( |
void * | handle, |
|
|
void * | pData, |
|
|
size_t | nSize ) |
|
static |
Callback implementation for TPdfToolsSys_StreamDescriptor::pfRead for FILE*
.
Read from stream into buffer
- Parameters
-
[in,out] | handle | Handle of stream. |
[out] | pData | Pointer to the buffer to which the data from the stream is written. |
[in] | nSize | Size in bytes of the stream to be read. |
- Returns
- Number of bytes read;
0
for end of stream, -1
in case of an error.
◆ PdfToolsSysFILEPtrRelease__()
static void STDCALL PdfToolsSysFILEPtrRelease__ |
( |
void * | handle | ) |
|
|
static |
◆ PdfToolsSysFILEPtrSeek__()
static int STDCALL PdfToolsSysFILEPtrSeek__ |
( |
void * | handle, |
|
|
pos_t | iPos ) |
|
static |
Callback implementation for TPdfToolsSys_StreamDescriptor::pfSeek for FILE*
.
Set new stream position.
- Parameters
-
[in,out] | handle | Handle of stream. |
[in] | iPos | Byte position of stream. -1 set position to end of stream. |
- Returns
1
for success; 0
for failure.
◆ PdfToolsSysFILEPtrTell__()
static pos_t STDCALL PdfToolsSysFILEPtrTell__ |
( |
void * | handle | ) |
|
|
static |
Callback implementation for TPdfToolsSys_StreamDescriptor::pfTell for FILE*
.
Get current position of stream.
- Parameters
-
[in,out] | handle | Handle of stream. |
- Returns
- Current byte position of stream;
-1
if position is unknown.
◆ PdfToolsSysFILEPtrWrite__()
static size_t STDCALL PdfToolsSysFILEPtrWrite__ |
( |
void * | handle, |
|
|
const void * | pData, |
|
|
size_t | nSize ) |
|
static |
Callback implementation for TPdfToolsSys_StreamDescriptor::pfWrite for FILE*
.
Write to stream from buffer
- Parameters
-
[in,out] | handle | Handle of stream. |
[in] | pData | Pointer to the buffer from which data is written to the stream. |
[in] | nSize | Size in bytes to be written. |
- Returns
- Number of bytes written to stream;
0
or -1
indicate an error.