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:
96 virtual tResult RuntimeHook(const tHookInfo& sHookInfo,
97 const iobject_ptr<IObject>& pObject) = 0;
98};
99
105class DOEXPORT IRuntime : public IObject
106{
107public:
112 ADTF_IID(IRuntime, "runtime.ant.ucom.adtf.iid");
113
114public:
116 enum tRunLevel : int8_t
117 {
120
123 };
124
233
252
255 {
257 UOF_None = 0x0,
258
261
264 };
265
274
276 enum tPluginFlags : uint8_t
277 {
278 PF_NONE = 0x0,
283 } ;
284
286 enum tClassRegistryFlags : uint32_t
287 {
289 CRF_None = 0x0,
290
293
296
299 };
300
301 public:
312 virtual tResult SetRunLevel(int8_t nRunLevel, bool bWait = true) = 0;
313
319 virtual int8_t GetRunLevel() const = 0;
320
331 uint32_t ui32Flags = 0) = 0;
332
344
352 virtual tResult GetClasses(iobject_enum<const IClassInfo>& lstOfClasses) const = 0;
353
363 virtual tResult GetClassFactories(iobject_enum<const IClassFactory>& lstOfClassFactories) const = 0;
364
378 const char* strNameOID,
379 int8_t nRunLevel,
380 uint32_t ui32Flags = 0) = 0;
381
391 const tChar* strNameOID = "") = 0;
392
402 virtual tResult GetObjects(iobject_enum<IObject>& lstOfObjects) const = 0;
403
416 virtual tResult RegisterPlugin(const char* strUrl,
417 int8_t nRunLevel,
418 iobject_ptr<IPluginInfo>& pPluginInfo,
419 uint32_t ui32Flags = 0) = 0;
420
430 virtual tResult UnregisterPlugin(const iobject_ptr<IPluginInfo>& pPluginInfo, uint32_t ui32Flags = 0) = 0;
431
441 virtual tResult UnregisterAllPlugins(int8_t nRunLevel,
442 uint32_t ui32Flags=0) = 0;
443
452 virtual tResult GetPlugins(iobject_enum<const IPluginInfo>& lstPluginInfos) const = 0;
453
463 virtual tResult RegisterHook(IRuntimeHook& oHook) = 0;
464
475
492 virtual tResult GetObject(iobject_ptr<IObject>& pObject, const char* strNameOID) const = 0;
506 virtual tResult GetObject(iobject_ptr<IObject>& pObject) const = 0;
507
521 virtual tResult CreateInstance(const char* strCID,
522 iobject_ptr<IObject>& pObject,
523 const tChar* strNameOfObject = "") const = 0;
524
525protected:
527 ~IRuntime() = default;
528};//class IRuntime
529
530}//namespace ant
531
532namespace spider
533{
534
535class DOEXPORT IRuntimeStartup : public ant::IObject
536{
537public:
542 ADTF_IID(IRuntimeStartup, "runtime_startup.spider.ucom.adtf.iid");
543
548 virtual bool StartupCompleted() const = 0;
549};
550
551}//namespace spider
552
553namespace vision
554{
555
556class DOEXPORT IRuntimeArguments : public ant::IObject
557{
558public:
563 ADTF_IID(IRuntimeArguments, "runtime_arguments.vision.ucom.adtf.iid");
564
570 virtual tResult GetArguments(const adtf::ucom::nitro::ifunction<tResult(const char*)>& oCallback) const = 0;
571};
572
573}// namespace vision
574
577
579using ant::IRuntime;
580
582
583}//namespace ucom
584}//namespace adtf
585
586#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:775
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:106
virtual tResult UnregisterAllPlugins(int8_t nRunLevel, uint32_t ui32Flags=0)=0
tPluginFlags
InternalFlags.
Definition runtime_intf.h:277
@ PF_MARKEDFORDELETION
if plugin is unloaded, this is the flag for deletion
Definition runtime_intf.h:282
@ PF_UNMANAGED
Definition runtime_intf.h:279
@ PF_NONE
no flags, default setting
Definition runtime_intf.h:278
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:236
@ CRLF_PreDecrementLevel
Called before the run level is decremented.
Definition runtime_intf.h:247
@ CRLF_PreIncrementLevel
Called before the run level is incremented.
Definition runtime_intf.h:241
@ CRLF_None
Unused.
Definition runtime_intf.h:238
@ CRLF_PostDecrementLevel
Called after the run level was decremented.
Definition runtime_intf.h:250
@ CRLF_PostIncrementLevel
Called after the run level was incremented.
Definition runtime_intf.h:244
tRunLevel
Run levels.
Definition runtime_intf.h:117
@ RL_Shutdown
The system is shut down.
Definition runtime_intf.h:119
@ RL_Internal
Invalid run level that signals unmanaged modules.
Definition runtime_intf.h:122
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:268
@ ORF_ServiceIsShutdown
Definition runtime_intf.h:271
@ ORF_None
Definition runtime_intf.h:269
@ ORF_MarkedForDeletion
Definition runtime_intf.h:270
@ ORF_RegisterOnChangingRL
Definition runtime_intf.h:272
tClassRegistryFlags
Flags to affect the creation speed of classes.
Definition runtime_intf.h:287
@ CRF_FastCreation
The class is placed at the front of the classlist.
Definition runtime_intf.h:295
@ CRF_None
No special treatment.
Definition runtime_intf.h:289
@ CRF_NoAutoDeregistration
The class will be registered for the current Run level and will be automatically unregistered on post...
Definition runtime_intf.h:298
@ CRF_NoHookOnCreation
The runtime hooks don't get called.
Definition runtime_intf.h:292
virtual tResult RegisterHook(IRuntimeHook &oHook)=0
tRuntimeHookId
Runtime hook identifiers.
Definition runtime_intf.h:127
@ RHI_RunLevelPreIncrement
Definition runtime_intf.h:211
@ RHI_RunLevelPostDecrement
Definition runtime_intf.h:223
@ RHI_UnregisterClass
Definition runtime_intf.h:163
@ RHI_LoadPlugin
Definition runtime_intf.h:182
@ RHI_RunLevelDecrementing
Definition runtime_intf.h:231
@ RHI_RunLevelIncrementing
Definition runtime_intf.h:227
@ RHI_ServiceStarted
Definition runtime_intf.h:197
@ RHI_UnregisterObject
Definition runtime_intf.h:151
@ RHI_ServiceStopping
Definition runtime_intf.h:202
@ RHI_Start
Called after the runtime instance was started.
Definition runtime_intf.h:132
@ RHI_ServiceStarting
Definition runtime_intf.h:192
@ RHI_CreateInstance
Definition runtime_intf.h:187
@ RHI_RegisterObject
Definition runtime_intf.h:145
@ RHI_ServiceStopped
Definition runtime_intf.h:207
@ RHI_RunLevelPreDecrement
Definition runtime_intf.h:219
@ RHI_UnregisterPlugin
Definition runtime_intf.h:175
@ RHI_Create
Called after the runtime instance was created.
Definition runtime_intf.h:129
@ RHI_Stop
Called before the runtime instance is stopped.
Definition runtime_intf.h:135
@ RHI_RegisterClass
Definition runtime_intf.h:157
@ RHI_Destroy
Called before the runtime instance is destroyed.
Definition runtime_intf.h:138
@ RHI_RunLevelPostIncrement
Definition runtime_intf.h:215
@ RHI_RegisterPlugin
Definition runtime_intf.h:170
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:255
@ UOF_None
Unused.
Definition runtime_intf.h:257
@ UOF_Automatically
Automatically Unregistered Object by Runlevelchange.
Definition runtime_intf.h:263
@ UOF_Manually
Manually Unregistered Object.
Definition runtime_intf.h:260
~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:536
virtual bool StartupCompleted() const =0
ADTF_IID(IRuntimeStartup, "runtime_startup.spider.ucom.adtf.iid")
Definition runtime_intf.h:557
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:533
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