ADTF
Loading...
Searching...
No Matches
runtime_intf.h
Go to the documentation of this file.
1
7#ifndef _ADTF_UCOM_ANT_RUNTIME_RUNTIME_HOOK_INTERFACE_INCLUDES_HEADER_
8#define _ADTF_UCOM_ANT_RUNTIME_RUNTIME_HOOK_INTERFACE_INCLUDES_HEADER_
9
10#ifdef GetObject
11#undef GetObject
12#endif
14
15namespace adtf
16{
17namespace ucom
18{
19namespace ant
20{
21
31class DOEXPORT IRuntimeHook
32{
33 public:
39 typedef struct
40 {
41 uint32_t idHook;
42 uint32_t ui32Param1;
43 uint32_t ui32Param2;
44 void* pvData;
45 size_t szData;
46 } tHookInfo;
47
48 public:
94 virtual tResult RuntimeHook(const tHookInfo& sHookInfo,
95 const iobject_ptr<IObject>& pObject) = 0;
96};
97
103class DOEXPORT IRuntime : public IObject
104{
105public:
110 ADTF_IID(IRuntime, "runtime.ant.ucom.adtf.iid");
111
112public:
114 enum tRunLevel : int8_t
115 {
118
121 };
122
231
250
253 {
255 UOF_None = 0x0,
256
259
262 };
263
272
274 enum tPluginFlags : uint8_t
275 {
276 PF_NONE = 0x0,
281 } ;
282
284 enum tClassRegistryFlags : uint32_t
285 {
287 CRF_None = 0x0,
288
291
294
297 };
298
299 public:
310 virtual tResult SetRunLevel(int8_t nRunLevel, bool bWait = true) = 0;
311
317 virtual int8_t GetRunLevel() const = 0;
318
329 uint32_t ui32Flags = 0) = 0;
330
342
350 virtual tResult GetClasses(iobject_enum<const IClassInfo>& lstOfClasses) const = 0;
351
361 virtual tResult GetClassFactories(iobject_enum<const IClassFactory>& lstOfClassFactories) const = 0;
362
376 const char* strNameOID,
377 int8_t nRunLevel,
378 uint32_t ui32Flags = 0) = 0;
379
389 const tChar* strNameOID = "") = 0;
390
400 virtual tResult GetObjects(iobject_enum<IObject>& lstOfObjects) const = 0;
401
414 virtual tResult RegisterPlugin(const char* strUrl,
415 int8_t nRunLevel,
416 iobject_ptr<IPluginInfo>& pPluginInfo,
417 uint32_t ui32Flags = 0) = 0;
418
428 virtual tResult UnregisterPlugin(const iobject_ptr<IPluginInfo>& pPluginInfo, uint32_t ui32Flags = 0) = 0;
429
439 virtual tResult UnregisterAllPlugins(int8_t nRunLevel,
440 uint32_t ui32Flags=0) = 0;
441
450 virtual tResult GetPlugins(iobject_enum<const IPluginInfo>& lstPluginInfos) const = 0;
451
461 virtual tResult RegisterHook(IRuntimeHook& oHook) = 0;
462
473
490 virtual tResult GetObject(iobject_ptr<IObject>& pObject, const char* strNameOID) const = 0;
504 virtual tResult GetObject(iobject_ptr<IObject>& pObject) const = 0;
505
519 virtual tResult CreateInstance(const char* strCID,
520 iobject_ptr<IObject>& pObject,
521 const tChar* strNameOfObject = "") const = 0;
522
523protected:
525 ~IRuntime() = default;
526};//class IRuntime
527
528}//namespace ant
529
530namespace spider
531{
532
533class DOEXPORT IRuntimeStartup : public ant::IObject
534{
535public:
540 ADTF_IID(IRuntimeStartup, "runtime_startup.spider.ucom.adtf.iid");
541
546 virtual bool StartupCompleted() const = 0;
547};
548
549}//namespace spider
550
551namespace vision
552{
553
554class DOEXPORT IRuntimeArguments : public ant::IObject
555{
556public:
561 ADTF_IID(IRuntimeArguments, "runtime_arguments.vision.ucom.adtf.iid");
562
568 virtual tResult GetArguments(const adtf::ucom::nitro::ifunction<tResult(const char*)>& oCallback) const = 0;
569};
570
571}// namespace vision
572
575
577using ant::IRuntime;
578
580
581}//namespace ucom
582}//namespace adtf
583
584#endif //_ADTF_UCOM_ANT_RUNTIME_RUNTIME_HOOK_INTERFACE_INCLUDES_HEADER_
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition object_intf.h:33
Definition runtime_intf.h:32
virtual tResult RuntimeHook(const tHookInfo &sHookInfo, const iobject_ptr< IObject > &pObject)=0
Definition runtime_intf.h:104
virtual tResult UnregisterAllPlugins(int8_t nRunLevel, uint32_t ui32Flags=0)=0
tPluginFlags
InternalFlags.
Definition runtime_intf.h:275
@ PF_MARKEDFORDELETION
if plugin is unloaded, this is the flag for deletion
Definition runtime_intf.h:280
@ PF_UNMANAGED
Definition runtime_intf.h:277
@ PF_NONE
no flags, default setting
Definition runtime_intf.h:276
virtual tResult RegisterPlugin(const char *strUrl, int8_t nRunLevel, iobject_ptr< IPluginInfo > &pPluginInfo, uint32_t ui32Flags=0)=0
virtual tResult CreateInstance(const char *strCID, iobject_ptr< IObject > &pObject, const tChar *strNameOfObject="") const =0
ADTF_IID(IRuntime, "runtime.ant.ucom.adtf.iid")
virtual tResult SetRunLevel(int8_t nRunLevel, bool bWait=true)=0
virtual tResult RegisterClassFactory(const iobject_ptr< const IClassFactory > &pClassFactory, uint32_t ui32Flags=0)=0
tChangeRunLevelFlags
Run level change flags.
Definition runtime_intf.h:234
@ CRLF_PreDecrementLevel
Called before the run level is decremented.
Definition runtime_intf.h:245
@ CRLF_PreIncrementLevel
Called before the run level is incremented.
Definition runtime_intf.h:239
@ CRLF_None
Unused.
Definition runtime_intf.h:236
@ CRLF_PostDecrementLevel
Called after the run level was decremented.
Definition runtime_intf.h:248
@ CRLF_PostIncrementLevel
Called after the run level was incremented.
Definition runtime_intf.h:242
tRunLevel
Run levels.
Definition runtime_intf.h:115
@ RL_Shutdown
The system is shut down.
Definition runtime_intf.h:117
@ RL_Internal
Invalid run level that signals unmanaged modules.
Definition runtime_intf.h:120
virtual tResult GetObject(iobject_ptr< IObject > &pObject, const char *strNameOID) const =0
virtual tResult RegisterObject(const iobject_ptr< IObject > &pObject, const char *strNameOID, int8_t nRunLevel, uint32_t ui32Flags=0)=0
virtual int8_t GetRunLevel() const =0
virtual tResult GetObject(iobject_ptr< IObject > &pObject) const =0
virtual tResult GetClassFactories(iobject_enum< const IClassFactory > &lstOfClassFactories) const =0
virtual tResult GetClasses(iobject_enum< const IClassInfo > &lstOfClasses) const =0
virtual tResult UnregisterHook(IRuntimeHook &oHook)=0
tObjectRegistryFlags
Definition runtime_intf.h:266
@ ORF_ServiceIsShutdown
Definition runtime_intf.h:269
@ ORF_None
Definition runtime_intf.h:267
@ ORF_MarkedForDeletion
Definition runtime_intf.h:268
@ ORF_RegisterOnChangingRL
Definition runtime_intf.h:270
tClassRegistryFlags
Flags to affect the creation speed of classes.
Definition runtime_intf.h:285
@ CRF_FastCreation
The class is placed at the front of the classlist.
Definition runtime_intf.h:293
@ CRF_None
No special treatment.
Definition runtime_intf.h:287
@ CRF_NoAutoDeregistration
The class will be registered for the current Run level and will be automatically unregistered on post...
Definition runtime_intf.h:296
@ CRF_NoHookOnCreation
The runtime hooks don't get called.
Definition runtime_intf.h:290
virtual tResult RegisterHook(IRuntimeHook &oHook)=0
tRuntimeHookId
Runtime hook identifiers.
Definition runtime_intf.h:125
@ RHI_RunLevelPreIncrement
Definition runtime_intf.h:209
@ RHI_RunLevelPostDecrement
Definition runtime_intf.h:221
@ RHI_UnregisterClass
Definition runtime_intf.h:161
@ RHI_LoadPlugin
Definition runtime_intf.h:180
@ RHI_RunLevelDecrementing
Definition runtime_intf.h:229
@ RHI_RunLevelIncrementing
Definition runtime_intf.h:225
@ RHI_ServiceStarted
Definition runtime_intf.h:195
@ RHI_UnregisterObject
Definition runtime_intf.h:149
@ RHI_ServiceStopping
Definition runtime_intf.h:200
@ RHI_Start
Called after the runtime instance was started.
Definition runtime_intf.h:130
@ RHI_ServiceStarting
Definition runtime_intf.h:190
@ RHI_CreateInstance
Definition runtime_intf.h:185
@ RHI_RegisterObject
Definition runtime_intf.h:143
@ RHI_ServiceStopped
Definition runtime_intf.h:205
@ RHI_RunLevelPreDecrement
Definition runtime_intf.h:217
@ RHI_UnregisterPlugin
Definition runtime_intf.h:173
@ RHI_Create
Called after the runtime instance was created.
Definition runtime_intf.h:127
@ RHI_Stop
Called before the runtime instance is stopped.
Definition runtime_intf.h:133
@ RHI_RegisterClass
Definition runtime_intf.h:155
@ RHI_Destroy
Called before the runtime instance is destroyed.
Definition runtime_intf.h:136
@ RHI_RunLevelPostIncrement
Definition runtime_intf.h:213
@ RHI_RegisterPlugin
Definition runtime_intf.h:168
virtual tResult GetPlugins(iobject_enum< const IPluginInfo > &lstPluginInfos) const =0
virtual tResult UnregisterPlugin(const iobject_ptr< IPluginInfo > &pPluginInfo, uint32_t ui32Flags=0)=0
virtual tResult UnregisterClassFactory(const iobject_ptr< const IClassFactory > &pClassFactory)=0
tUnregisterObjectFlags
Run level change flags.
Definition runtime_intf.h:253
@ UOF_None
Unused.
Definition runtime_intf.h:255
@ UOF_Automatically
Automatically Unregistered Object by Runlevelchange.
Definition runtime_intf.h:261
@ UOF_Manually
Manually Unregistered Object.
Definition runtime_intf.h:258
~IRuntime()=default
Protected destructor --> Only the final implementation can be destroyed!
virtual tResult UnregisterObject(const iobject_ptr< IObject > &pObject, const tChar *strNameOID="")=0
virtual tResult GetObjects(iobject_enum< IObject > &lstOfObjects) const =0
Definition object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition function_ptr.h:28
Definition runtime_intf.h:534
virtual bool StartupCompleted() const =0
ADTF_IID(IRuntimeStartup, "runtime_startup.spider.ucom.adtf.iid")
Definition runtime_intf.h:555
virtual tResult GetArguments(const adtf::ucom::nitro::ifunction< tResult(const char *)> &oCallback) const =0
ADTF_IID(IRuntimeArguments, "runtime_arguments.vision.ucom.adtf.iid")
Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
Definition test_runtime.h:14
Namespace for all functionality of the ADTF UCOM SDK provided since v3.18.
Definition runtime_intf.h:531
Namespace for all functionality of the ADTF UCOM SDK provided since v3.21.
Definition plugin_logging_intf.h:48
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
Definition runtime_intf.h:40
uint32_t ui32Param1
Depends on idHook.
Definition runtime_intf.h:42
void * pvData
optional data pointer.
Definition runtime_intf.h:44
size_t szData
size of the data provided through pvData.
Definition runtime_intf.h:45
uint32_t ui32Param2
Depends on idHook.
Definition runtime_intf.h:43
uint32_t idHook
Defines event type (IRuntime::tRuntimeHookId)
Definition runtime_intf.h:41