PDF Toolbox
Loading...
Searching...
No Matches
PdfToolbox_Ptx.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * File: PdfToolbox_Ptx.h
4 *
5 * Description: Sub Header file for PDF Toolbox API
6 *
7 * Author: PDF Tools AG
8 *
9 * Copyright: Copyright (C) 2015 - 2025 PDF Tools AG, Switzerland
10 * All rights reserved.
11 *
12 * Notice: By downloading and using this artifact, you accept PDF Tools AG's
13 * [license agreement](https://www.pdf-tools.com/license-agreement/),
14 * [privacy policy](https://www.pdf-tools.com/privacy-policy/),
15 * and allow PDF Tools AG to track your usage data.
16 *
17 *****************************************************************************/
18
19#ifndef PDFTOOLBOX_PTX_H__
20#define PDFTOOLBOX_PTX_H__
21
22#ifndef PDFTOOLBOX_CALL
23#if defined(WIN32)
24#define PDFTOOLBOX_CALL __stdcall
25#else
26#define PDFTOOLBOX_CALL
27#endif
28#endif
29
30#include "PdfToolbox_Types.h"
31#include "PdfToolbox_PtxSys.h"
32
33#ifdef __cplusplus
34extern "C"
35{
36#endif
37
38#ifdef _UNICODE
39#define Ptx_GetLastErrorMessage Ptx_GetLastErrorMessageW
40#define Ptx_Sdk_Initialize Ptx_Sdk_InitializeW
41
42#define Ptx_Sdk_GetVersion Ptx_Sdk_GetVersionW
43
44#define Ptx_Sdk_GetProducerFullName Ptx_Sdk_GetProducerFullNameW
45
46#define Ptx_StringMap_Get Ptx_StringMap_GetW
47#define Ptx_StringMap_GetKey Ptx_StringMap_GetKeyW
48#define Ptx_StringMap_GetValue Ptx_StringMap_GetValueW
49#define Ptx_StringMap_Set Ptx_StringMap_SetW
50#define Ptx_StringMap_SetValue Ptx_StringMap_SetValueW
51
52#else
53#define Ptx_GetLastErrorMessage Ptx_GetLastErrorMessageA
54#define Ptx_Sdk_Initialize Ptx_Sdk_InitializeA
55
56#define Ptx_Sdk_GetVersion Ptx_Sdk_GetVersionA
57
58#define Ptx_Sdk_GetProducerFullName Ptx_Sdk_GetProducerFullNameA
59
60#define Ptx_StringMap_Get Ptx_StringMap_GetA
61#define Ptx_StringMap_GetKey Ptx_StringMap_GetKeyA
62#define Ptx_StringMap_GetValue Ptx_StringMap_GetValueA
63#define Ptx_StringMap_Set Ptx_StringMap_SetA
64#define Ptx_StringMap_SetValue Ptx_StringMap_SetValueA
65
66#endif
67
68/******************************************************************************
69 * Library
70 *****************************************************************************/
71
79
87
96
110PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageA(char* pBuffer, size_t nBufferSize);
111
126
135PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorA(TPtx_ErrorCode iErrorCode, const char* szErrorMessage);
136
146
147/******************************************************************************
148 * Object
149 *****************************************************************************/
159
168
180
191/******************************************************************************
192 * Sdk
193 *****************************************************************************/
210PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeA(const char* szLicense, const char* szProducerSuffix);
227PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeW(const WCHAR* szLicense, const WCHAR* szProducerSuffix);
228
243PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionA(char* pBuffer, size_t nBufferSize);
258PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionW(WCHAR* pBuffer, size_t nBufferSize);
273PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA(char* pBuffer, size_t nBufferSize);
289
290/******************************************************************************
291 * StringMap
292 *****************************************************************************/
443 size_t nBufferSize);
466 size_t nBufferSize);
489 size_t nBufferSize);
512 size_t nBufferSize);
533 const char* szValue);
554 const WCHAR* szValue);
589 const WCHAR* szValue);
620
621#ifdef __cplusplus
622}
623#endif
624
625#endif /* PDFTOOLBOX_PTX_H__ */
unsigned short WCHAR
Definition PdfToolbox_Platform.h:95
#define PDFTOOLBOX_EXPORT
Definition PdfToolbox_Platform.h:143
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_Remove(TPtx_StringMap *pStringMap, int it)
Remove the entry at a position in the map.
#define PDFTOOLBOX_CALL
Definition PdfToolbox_Ptx.h:26
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Uninitialize()
Uninitializes the library.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_GetHashCode(void *pObject)
Get a hash code.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetW(TPtx_StringMap *pStringMap, const WCHAR *szKey)
Get the position of a key in the map. If no error occurred, then the position can be used to get the ...
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetEnd(TPtx_StringMap *pStringMap)
Get the end position of the map.
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetValueW(TPtx_StringMap *pStringMap, int it, const WCHAR *szValue)
Set the value of the entry at a position in the map.
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionA(char *pBuffer, size_t nBufferSize)
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA(char *pBuffer, size_t nBufferSize)
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetW(TPtx_StringMap *pStringMap, const WCHAR *szKey, const WCHAR *szValue)
Set the value of an entry for a given key. This operation invalidates all positions previously return...
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionW(WCHAR *pBuffer, size_t nBufferSize)
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageA(char *pBuffer, size_t nBufferSize)
Retrieves the last error message.
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetA(TPtx_StringMap *pStringMap, const char *szKey, const char *szValue)
Set the value of an entry for a given key. This operation invalidates all positions previously return...
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorW(TPtx_ErrorCode iErrorCode, const WCHAR *szErrorMessage)
Set last error code and error message.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetCount(TPtx_StringMap *pStringMap)
The number of key-value pairs in the map.
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameW(WCHAR *pBuffer, size_t nBufferSize)
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetValueA(TPtx_StringMap *pStringMap, int it, char *pBuffer, size_t nBufferSize)
Get the value of the entry given a position.
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_Clear(TPtx_StringMap *pStringMap)
Remove all entries from the map.
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_AddRef(void *pObject)
Increase reference count of object.
PDFTOOLBOX_EXPORT TPtx_ErrorCode PDFTOOLBOX_CALL Ptx_GetLastError()
Retrieves the last error code.
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Initialize()
Initializes the library.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetSize(TPtx_StringMap *pStringMap)
The number of key-value pairs in the map.
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetKeyW(TPtx_StringMap *pStringMap, int it, WCHAR *pBuffer, size_t nBufferSize)
Get the key of the entry given a position.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetA(TPtx_StringMap *pStringMap, const char *szKey)
Get the position of a key in the map. If no error occurred, then the position can be used to get the ...
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetValueA(TPtx_StringMap *pStringMap, int it, const char *szValue)
Set the value of the entry at a position in the map.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetNext(TPtx_StringMap *pStringMap, int it)
Get the position of the next entry in the map.
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorA(TPtx_ErrorCode iErrorCode, const char *szErrorMessage)
Set last error code and error message.
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetValueW(TPtx_StringMap *pStringMap, int it, WCHAR *pBuffer, size_t nBufferSize)
Get the value of the entry given a position.
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Equals(void *pObject, void *pOther)
Compare two native objects.
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Release(void *pObject)
Release object.
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageW(WCHAR *pBuffer, size_t nBufferSize)
Retrieve last error message.
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetKeyA(TPtx_StringMap *pStringMap, int it, char *pBuffer, size_t nBufferSize)
Get the key of the entry given a position.
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetBegin(TPtx_StringMap *pStringMap)
Get the position of the first entry in the map.
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeW(const WCHAR *szLicense, const WCHAR *szProducerSuffix)
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeA(const char *szLicense, const char *szProducerSuffix)
TPtx_ErrorCode
Definition PdfToolbox_Types.h:34
#define BOOL
Definition PdfToolbox_Types.h:23