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 - 2024 PDF Tools AG, Switzerland
10 * All rights reserved.
11 *
12 *****************************************************************************/
13
14#ifndef PDFTOOLBOX_PTX_H__
15#define PDFTOOLBOX_PTX_H__
16
17#ifndef PDFTOOLBOX_CALL
18#if defined(WIN32)
19#define PDFTOOLBOX_CALL __stdcall
20#else
21#define PDFTOOLBOX_CALL
22#endif
23#endif
24
25#include "PdfToolbox_Types.h"
26#include "PdfToolbox_PtxSys.h"
27
28#ifdef __cplusplus
29extern "C"
30{
31#endif
32
33#ifdef _UNICODE
34#define Ptx_GetLastErrorMessage Ptx_GetLastErrorMessageW
35#define Ptx_Sdk_Initialize Ptx_Sdk_InitializeW
36
37#define Ptx_Sdk_GetVersion Ptx_Sdk_GetVersionW
38
39#define Ptx_Sdk_GetProducerFullName Ptx_Sdk_GetProducerFullNameW
40
41#define Ptx_StringMap_Get Ptx_StringMap_GetW
42#define Ptx_StringMap_GetKey Ptx_StringMap_GetKeyW
43#define Ptx_StringMap_GetValue Ptx_StringMap_GetValueW
44#define Ptx_StringMap_Set Ptx_StringMap_SetW
45#define Ptx_StringMap_SetValue Ptx_StringMap_SetValueW
46
47#else
48#define Ptx_GetLastErrorMessage Ptx_GetLastErrorMessageA
49#define Ptx_Sdk_Initialize Ptx_Sdk_InitializeA
50
51#define Ptx_Sdk_GetVersion Ptx_Sdk_GetVersionA
52
53#define Ptx_Sdk_GetProducerFullName Ptx_Sdk_GetProducerFullNameA
54
55#define Ptx_StringMap_Get Ptx_StringMap_GetA
56#define Ptx_StringMap_GetKey Ptx_StringMap_GetKeyA
57#define Ptx_StringMap_GetValue Ptx_StringMap_GetValueA
58#define Ptx_StringMap_Set Ptx_StringMap_SetA
59#define Ptx_StringMap_SetValue Ptx_StringMap_SetValueA
60
61#endif
62
63/******************************************************************************
64 * Library
65 *****************************************************************************/
66
74
82
91
105PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageA(char* pBuffer, size_t nBufferSize);
106
121
130PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorA(TPtx_ErrorCode iErrorCode, const char* szErrorMessage);
131
141
142/******************************************************************************
143 * Object
144 *****************************************************************************/
154
163
175
186/******************************************************************************
187 * Sdk
188 *****************************************************************************/
205PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeA(const char* szLicense, const char* szProducerSuffix);
222PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeW(const WCHAR* szLicense, const WCHAR* szProducerSuffix);
223
238PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionA(char* pBuffer, size_t nBufferSize);
253PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionW(WCHAR* pBuffer, size_t nBufferSize);
268PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA(char* pBuffer, size_t nBufferSize);
284
285/******************************************************************************
286 * StringMap
287 *****************************************************************************/
438 size_t nBufferSize);
461 size_t nBufferSize);
484 size_t nBufferSize);
507 size_t nBufferSize);
528 const char* szValue);
549 const WCHAR* szValue);
584 const WCHAR* szValue);
615
616#ifdef __cplusplus
617}
618#endif
619
620#endif /* PDFTOOLBOX_PTX_H__ */
unsigned short WCHAR
Definition PdfToolbox_Platform.h:90
#define PDFTOOLBOX_EXPORT
Definition PdfToolbox_Platform.h:138
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:21
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:29
#define BOOL
Definition PdfToolbox_Types.h:18