TDA Kernel DLL for native calls |

tdakernel.h
Go to the documentation of this file.
1
6 #ifndef TDAKERNEL_H
7 #define TDAKERNEL_H
8
9 #if defined(_WIN32) || defined(_WIN64)
10 #ifdef TDA_EXPORT
11 #ifdef __cplusplus
12 #define TDAEXTERN extern "C" __declspec(dllexport)
13 #else
14 #define TDAEXTERN __declspec(dllexport)
15 #endif // __cplusplus
16 #else
17 #ifdef __cplusplus
18 #define TDAEXTERN extern "C" __declspec(dllimport)
19 #else
20 #define TDAEXTERN __declspec(dllimport)
21 #endif // __cplusplus
22 #endif // EXPORT
23 #define TDACALL __stdcall
24 #else
25 #ifdef TDA_EXPORT
26 #ifdef __cplusplus
27 #define TDAEXTERN extern "C"
28 #else
29 #define TDAEXTERN extern
30 #endif
31 #else
32 #ifdef __cplusplus
33 #define TDAEXTERN extern "C"
34 #else
35 #define TDAEXTERN extern
36 #endif
37 #endif // TDA_EXPORT
38 #define TDACALL //__cdecl
39 #endif
40
41 #define IN
42 #define INOUT
43 #define OUT
44
45 #define TDA_SHARED_MEMORY_SIZE 131072 // 128 KiB
46
47 #ifdef TDA_EXPORT
48 const char *TDA_CreateReturnString(const char *s); // for used only inside TDA Kernel library
49 unsigned int TDA_GetCurrentProcessID();
50 unsigned int TDA_GetParentProcessID();
51 #endif
52
53 #ifdef __GNUC__
54 #include <stdint.h>
55 #ifndef __int64
56 #define __int64 int64_t // long long int
57 #endif
58 #endif
59
60 TDAEXTERN const char* TDACALL TDA_GetTDAKernelLibraryPath(); // returns a UTF-8 string
61 #if defined(_WIN32) || defined(_WIN64)
62 TDAEXTERN const wchar_t* TDACALL TDA_GetTDAKernelLibraryPathW(); // returns a UTF-16 string (Windows-only)
63 #endif
64
65 // FUNCTIONS FOR CREATING NEW TDA KERNELS AND ACCESSING EXISTING ONES //
66
75 TDAEXTERN void* TDACALL TDA_GetTDAKernelReference(const char *protocolOrUri);
76
77 /*
78 * Frees the given TDA Kernel reference obtained earlier by calling TDA_GetTDAKernelReference.
79 * @param tdaKernel a reference to a TDA Kernel returned by TDA_GetTDAKernelReference
80 * @see TDA_GetTDAKernelReference
81 */
82 TDAEXTERN bool TDACALL TDA_FreeTDAKernelReference(void *tdaKernel);
83
84 // FUNCTIONS FROM THE ITDAKernel INTERFACE IN C STYLE //
85 #include "tdakernel_stub_c2base.h"
86
87 // BONUS FUNCTIONS //
88 #include "tda_pipes_and_java.h"
89
90 #endif // TDAKERNEL_H
91
TDA_GetTDAKernelLibraryPath
TDAEXTERN const char *TDACALL TDA_GetTDAKernelLibraryPath()
TDA_FreeTDAKernelReference
TDAEXTERN bool TDACALL TDA_FreeTDAKernelReference(void *tdaKernel)
TDA_GetParentProcessID
unsigned int TDA_GetParentProcessID()
TDA_CreateReturnString
const char * TDA_CreateReturnString(const char *s)
tda_pipes_and_java.h
TDA_GetTDAKernelReference
TDAEXTERN void *TDACALL TDA_GetTDAKernelReference(const char *protocolOrUri)
TDA_GetCurrentProcessID
unsigned int TDA_GetCurrentProcessID()
TDA_GetTDAKernelLibraryPathW
TDAEXTERN const wchar_t *TDACALL TDA_GetTDAKernelLibraryPathW()
tdakernel_stub_c2base.h