ADTF  3.18.4
plugin_c_interface.h
Go to the documentation of this file.
1 
9 namespace adtf
10 {
11 namespace ucom
12 {
13 namespace ant
14 {
15 
16 /*************************************************************************************************/
18 #ifdef WIN32
19  #define UCOM_PLUGIN_EXPORT __declspec(dllexport)
20  #define UCOM_PLUGIN_IMPORT __declspec(dllimport)
21  #define UCOM_PLUGIN_CALLTYPE /* __stdcall */
22  #define UCOM_PLUGIN_FUNCTION_DECL_BEGIN extern "C" { UCOM_PLUGIN_EXPORT int32_t UCOM_PLUGIN_CALLTYPE
23  #define UCOM_PLUGIN_FUNCTION_DECL_END }
24 #else // WIN32
25  #define UCOM_PLUGIN_IMPORT /* */
26  #define UCOM_PLUGIN_EXPORT /* */
27  #define UCOM_PLUGIN_CALLTYPE /* */
28  #define UCOM_PLUGIN_FUNCTION_DECL_BEGIN extern "C" { __attribute__ ((visibility("default"))) int32_t
29  #define UCOM_PLUGIN_FUNCTION_DECL_END }
30 #endif // WIN32
32 
34 #define UCOM_GET_VERSION_PLUGIN_SYMBOL "UCOM_GetVersion3"
36 #define UCOM_LOAD_PLUGIN_SYMBOL "UCOM_LoadPlugin3"
38 #define UCOM_UNLOAD_PLUGIN_SYMBOL "UCOM_UnloadPlugin3"
39 
41 typedef UCOM_PLUGIN_IMPORT int32_t(UCOM_PLUGIN_CALLTYPE *fnUCOMGetVersion)(const char* strVersionID, uint32_t* pui32UCOMMajor, uint32_t* pui32UCOMMinor, uint32_t* pui32UCOMPatch);
43 typedef UCOM_PLUGIN_IMPORT int32_t(UCOM_PLUGIN_CALLTYPE *fnUCOMLoadPlugin)(void* pvRuntimeInstance, uint32_t ui32UCOMMajor, uint32_t ui32UCOMMinor, uint32_t ui32UCOMPatch, void** ppvPluginObject, tHandle hModule);
45 typedef UCOM_PLUGIN_IMPORT int32_t(UCOM_PLUGIN_CALLTYPE *fnUCOMUnloadPlugin)();
46 
53 
54 }//namespace ant
55 
56 using ant::get_plugin;
57 
58 }//namespace ucom
59 }//namespace adtf
60 
61 UCOM_PLUGIN_FUNCTION_DECL_BEGIN UCOM_GetVersion3(const char* strVersionID,
62  uint32_t* pui32Major,
63  uint32_t* pui32Minor,
64  uint32_t* pui32Patch);
65 UCOM_PLUGIN_FUNCTION_DECL_END
66 
67 UCOM_PLUGIN_FUNCTION_DECL_BEGIN UCOM_LoadPlugin3(void* pvRuntimeInstance,
68  uint32_t ui32Major,
69  uint32_t ui32Minor,
70  uint32_t ui32Patch,
71  void** ppvPlugin,
72  tHandle hModule);
73 UCOM_PLUGIN_FUNCTION_DECL_END
74 
75 UCOM_PLUGIN_FUNCTION_DECL_BEGIN UCOM_UnloadPlugin3(void);
76 UCOM_PLUGIN_FUNCTION_DECL_END
tVoid * tHandle
type definition for a handle value (platform and compiler dependent type).
Base object pointer to realize binary compatible reference counting in interface methods.
UCOM_PLUGIN_IMPORT int32_t(UCOM_PLUGIN_CALLTYPE * fnUCOMGetVersion)(const char *strVersionID, uint32_t *pui32UCOMMajor, uint32_t *pui32UCOMMinor, uint32_t *pui32UCOMPatch)
function for the c - Plugin Entry to load a plugin
tResult get_plugin(iobject_ptr< IPlugin > &pPlugin)
Returns a reference to the plugin instance of the current module.
UCOM_PLUGIN_IMPORT int32_t(UCOM_PLUGIN_CALLTYPE * fnUCOMLoadPlugin)(void *pvRuntimeInstance, uint32_t ui32UCOMMajor, uint32_t ui32UCOMMinor, uint32_t ui32UCOMPatch, void **ppvPluginObject, tHandle hModule)
function for the c - Plugin Entry to load a plugin
UCOM_PLUGIN_IMPORT int32_t(UCOM_PLUGIN_CALLTYPE * fnUCOMUnloadPlugin)()
function for the c - Plugin Entry to unload a plugin
Namespace for entire ADTF SDK.