ADTF  v2.14.3
IRuntime Class Referenceabstract

The IRuntime interface controls global system startup and shutdown. More...

Inheritance diagram for IRuntime:

Public Types

enum  tRunLevel {
  RL_Shutdown = 0, RL_Kernel = 1, RL_System = 2, RL_XSystem = 3,
  RL_Application = 4, RL_Running = 5, RL_Internal = 99
}
 Run levels. More...
 
enum  tRuntimeHookId {
  RHI_Create, RHI_Start, RHI_Stop, RHI_Destroy,
  RHI_RegisterObject, RHI_UnregisterObject, RHI_RegisterClass, RHI_UnregisterClass,
  RHI_RegisterPlugin, RHI_UnregisterPlugin, RHI_LoadPlugin, RHI_CreateInstance,
  RHI_ServiceStarting, RHI_ServiceStarted, RHI_ServiceStopping, RHI_ServiceStopped,
  RHI_RunLevelPreIncrement, RHI_RunLevelPostIncrement, RHI_RunLevelPreDecrement, RHI_RunLevelPostDecrement
}
 Runtime hook identifiers. More...
 
enum  tChangeRunLevelFlags {
  CRLF_None = 0x0, CRLF_PreIncrementLevel = 0x1, CRLF_PostIncrementLevel = 0x2, CRLF_PreDecrementLevel = 0x4,
  CRLF_PostDecrementLevel = 0x8
}
 Run level change flags. More...
 
enum  tUnregisterObjectFlags { UOF_None = 0x0, UOF_Manually = 0x1, UOF_Automatically = 0x2 }
 Run level change flags. More...
 
enum  tObjectRegistryFlags { ORF_None = 0, ORF_MarkedForDeletion = 0x1, ORF_ServiceIsShutdown = 0x2, ORF_RegisterOnChangingRL = 0x4 }
 
enum  tPluginFlags { PF_NONE = 0x0, PF_UNMANAGED = 0x1 }
 
enum  tClassRegistryFlags { CRF_None = 0x0, CRF_NoHookOnCreation = 0x1, CRF_FastCreation = 0x2, CRF_NoAutoDeregistration = 0x4 }
 Flags to affect the creation speed of classes. More...
 

Public Member Functions

virtual tResult SetRunLevel (tInt nRunLevel, IException **__exception_ptr=NULL)=0
 Set run level. More...
 
virtual tInt GetRunLevel () const =0
 Get current run level. More...
 
virtual tResult RegisterClass (const tChar *strClassId, IClassFactory *pClassFactory, tUInt32 ui32Flags=0, IException **__exception_ptr=NULL)=0
 Register class at class registry. More...
 
virtual tResult UnregisterClass (const tChar *strClassId, IException **__exception_ptr=NULL)=0
 Unregister class from class registry. More...
 
virtual tResult CreateInstance (const tChar *strClassId, const tChar *idInterface, tVoid **ppvObject, const tChar *pstrInstanceInfo=NULL, IException **__exception_ptr=NULL)=0
 Creates a new instance of a Object. More...
 
virtual tResult EnumClasses (IEnumObject **ppEnum, IException **__exception_ptr=NULL)=0
 Enumerates all registered classes. More...
 
virtual tResult GetObject (const tChar *strIdentifier, const tChar *strInterface, tVoid **ppvObject, IException **__exception_ptr=NULL)=0
 Get object from object registry. More...
 
virtual tResult RegisterObject (IObject *pObject, const tChar *strIdentifier, tInt nRunLevel, tUInt32 ui32Flags=0, IException **__exception_ptr=NULL)=0
 Register object at object registry. More...
 
virtual tResult UnregisterObject (IObject *pObject, const tChar *strIdentifier, IException **__exception_ptr=NULL)=0
 Unregister object from object registry. More...
 
virtual tResult EnumObjects (IEnumObject **ppEnum, IException **__exception_ptr=NULL)=0
 Enumerate registered instances. More...
 
virtual tResult RegisterPlugin (const tChar *strUrl, tInt nRunLevel, IPlugin *pPlugin=NULL, tUInt32 ui32Flags=0, IException **__exception_ptr=NULL)=0
 Register plugin at the plugin registry. More...
 
virtual tResult UnregisterPlugin (IPlugin *pPlugin, tUInt32 ui32Flags=0, IException **__exception_ptr=NULL)=0
 Unregister plugin from plugin registry. More...
 
virtual tResult UnregisterAllPlugins (tInt nRunLevel, tUInt32 ui32Flags=0, IException **__exception_ptr=NULL)=0
 Unregister all plugin from plugin registry. More...
 
virtual tResult EnumPlugins (IEnumObject **ppEnum, IException **__exception_ptr=NULL)=0
 Enumerate registered plugins. More...
 
virtual tResult RegisterHook (IRuntimeHook *pHook)=0
 Register hook. More...
 
virtual tResult UnregisterHook (IRuntimeHook *pHook)=0
 Unregister hook. More...
 
- Public Member Functions inherited from IObject
virtual tResult GetInterface (const tChar *idInterface, tVoid **ppvObject)=0
 Query interfaces on an object. More...
 
virtual tUInt Ref ()=0
 Increase reference counter. More...
 
virtual tUInt Unref ()=0
 Decrease reference counter. More...
 
virtual tVoid Destroy ()=0
 Destroy class instance. More...
 

Detailed Description

The IRuntime interface controls global system startup and shutdown.

Definition at line 113 of file runtime_intf.h.

Member Enumeration Documentation

Run level change flags.

Enumerator
CRLF_None 

Unused.

CRLF_PreIncrementLevel 

Called before the run level is incremented.

CRLF_PostIncrementLevel 

Called after the run level was incremented.

CRLF_PreDecrementLevel 

Called before the run level is decremented.

CRLF_PostDecrementLevel 

Called after the run level was decremented.

Definition at line 243 of file runtime_intf.h.

Flags to affect the creation speed of classes.

Enumerator
CRF_None 

No special treatment.

CRF_NoHookOnCreation 

The runtime hooks don't get called.

CRF_FastCreation 

The class is placed at the front of the classlist.

CRF_NoAutoDeregistration 

The class will be registered for the current Run level and will be automatically unregistered on post decreasing this Run level.

Definition at line 293 of file runtime_intf.h.

Enumerator
ORF_None 
ORF_MarkedForDeletion 
ORF_ServiceIsShutdown 
ORF_RegisterOnChangingRL 

Definition at line 275 of file runtime_intf.h.

Enumerator
PF_NONE 

no flags, default setting

PF_UNMANAGED 

if plugin is unloaded, also remove entry from registration.

this makes sense, if a plugin is registered manually through an api call.

Definition at line 284 of file runtime_intf.h.

enum tRunLevel

Run levels.

Enumerator
RL_Shutdown 

The system is shut down.

RL_Kernel 

The kernel is working.

RL_System 

System services are working.

RL_XSystem 

Same as System and xService for GUI is initialized.

RL_Application 

Applications are initialized.

RL_Running 

Applications are running, streaming is active.

RL_Internal 

Invalid run level that signals unmanaged modules.

Definition at line 117 of file runtime_intf.h.

Runtime hook identifiers.

Enumerator
RHI_Create 

Called after the runtime instance was created.

RHI_Start 

Called after the runtime instance was started.

RHI_Stop 

Called before the runtime instance is stopped.

RHI_Destroy 

Called before the runtime instance is destroyed.

RHI_RegisterObject 

Called after an object has been registered.

RHI_UnregisterObject 

Called before an object is unregistered.

RHI_RegisterClass 

Called after a class has been registered.

RHI_UnregisterClass 

Called before a class is unregistered.

RHI_RegisterPlugin 

Called after a plugin has been registered, after it has been loaded, see RHI_LoadPlugin.

RHI_UnregisterPlugin 

Called before a plugin is unregistered.

RHI_LoadPlugin 

Called after a plugin has been loaded.

RHI_CreateInstance 

Called after an instance has been created.

RHI_ServiceStarting 

Called before a service is started.

RHI_ServiceStarted 

Called after a service was started.

RHI_ServiceStopping 

Called before a service is stopped.

RHI_ServiceStopped 

Called after a service has been stopped.

RHI_RunLevelPreIncrement 

Called before the run level is incremented.

RHI_RunLevelPostIncrement 

Called after the run level was incremented.

RHI_RunLevelPreDecrement 

Called before the run level is decremented.

RHI_RunLevelPostDecrement 

Called after the run level was decremented.

Definition at line 142 of file runtime_intf.h.

Run level change flags.

Enumerator
UOF_None 

Unused.

UOF_Manually 

Manually Unregistered Object.

UOF_Automatically 

Automatically Unregistered Object by Runlevelchange.

Definition at line 262 of file runtime_intf.h.

Member Function Documentation

virtual tResult CreateInstance ( const tChar strClassId,
const tChar idInterface,
tVoid **  ppvObject,
const tChar pstrInstanceInfo = NULL,
IException **  __exception_ptr = NULL 
)
pure virtual

Creates a new instance of a Object.

The CreateInstance method creates a single uninitialized object of the class associated with a specified class identifier.

Parameters
strClassId[in] Class identifier (OID).
idInterface[in] Reference to the identifier of the interface to be used to communicate with the object.
ppvObject[out] Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObject contains the requested interface pointer. Upon failure, *ppvObject contains NULL.
pstrInstanceInfo[in] Reference to internal info structure.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

Referenced by cRecorderStreamCreator::ConnectWithRecorder(), CreateServices(), initialize(), main(), regService(), and cRecorderStreamCreator::Run().

virtual tResult EnumClasses ( IEnumObject **  ppEnum,
IException **  __exception_ptr = NULL 
)
pure virtual

Enumerates all registered classes.

The EnumClasses method enumerates all registered classes.

Parameters
ppEnum[out] Address of pointer variable that receives a interface pointer to the enumeration object. Upon successful return, *ppEnum contains the requested interface pointer to the object. If any error occurs, *ppEnum is set to NULL.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult EnumObjects ( IEnumObject **  ppEnum,
IException **  __exception_ptr = NULL 
)
pure virtual

Enumerate registered instances.

The EnumObjects method enumerates all registered instances of the object registry.

Parameters
ppEnum[in] Address of pointer variable that receives the enumeration interface.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult EnumPlugins ( IEnumObject **  ppEnum,
IException **  __exception_ptr = NULL 
)
pure virtual

Enumerate registered plugins.

The EnumPlugins method enumerates all registered plugins of the plugin registry.

Parameters
ppEnum[in] Address of pointer variable that receives the enumeration interface.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult GetObject ( const tChar strIdentifier,
const tChar strInterface,
tVoid **  ppvObject,
IException **  __exception_ptr = NULL 
)
pure virtual

Get object from object registry.

The GetObject method gets an object from the object registry.

Parameters
strIdentifier[in] Object instance identifier. If NULL, the first object matching the requested interface type is returned.
strInterface[in] Object interface identifier. If NULL, the base interface IObject is returned.
ppvObject[out] Address of pointer variable that receives the interface pointer requested in idInterface. Upon successful return, *ppvObject contains the requested interface pointer. Upon failure, *ppvObject contains NULL.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

Referenced by CreateAddonsMenu(), cPlayerStreamEventSink::Init(), LoadGlobalsAndConfig(), main(), and run().

virtual tInt GetRunLevel ( ) const
pure virtual

Get current run level.

The GetRunLevel method returns the current run level.

Returns
Returns the current run level.

Implemented in cRuntime.

Referenced by main(), and run().

virtual tResult RegisterClass ( const tChar strClassId,
IClassFactory pClassFactory,
tUInt32  ui32Flags = 0,
IException **  __exception_ptr = NULL 
)
pure virtual

Register class at class registry.

The RegisterClass method registers a class at the class registry.

Parameters
strClassId[in] Unique identifier for the registered instance (OID).
pClassFactory[in] Pointer to the class factory instance.
ui32Flags[in] Registration flags (see IRuntime::tClassRegistryFlags for an explanation of the flags).
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

Referenced by initialize(), and main().

virtual tResult RegisterHook ( IRuntimeHook pHook)
pure virtual

Register hook.

The RegisterHook method registers a hook interface.

Parameters
pHook[in] Pointer to the hook interface to be registered.
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult RegisterObject ( IObject pObject,
const tChar strIdentifier,
tInt  nRunLevel,
tUInt32  ui32Flags = 0,
IException **  __exception_ptr = NULL 
)
pure virtual

Register object at object registry.

The RegisterObject method registers an object at the object registry.

Parameters
pObject[in] Pointer to the object instance.
strIdentifier[in] Unique identifier for the registered instance.
nRunLevel[in] Required runlevel.
ui32Flags[in] Registration flags.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

Referenced by CreateServices(), initialize(), main(), and regService().

virtual tResult RegisterPlugin ( const tChar strUrl,
tInt  nRunLevel,
IPlugin pPlugin = NULL,
tUInt32  ui32Flags = 0,
IException **  __exception_ptr = NULL 
)
pure virtual

Register plugin at the plugin registry.

The RegisterPlugin method registers a plugin at the plugin registry.

Parameters
strUrl[in] Url of plugin to be registered.
nRunLevel[in] Plugin runlevel.
pPlugin[in] Pointer to plugin interface.
ui32Flags[in] Registration flags.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

Referenced by LoadPlugins(), and main().

virtual tResult SetRunLevel ( tInt  nRunLevel,
IException **  __exception_ptr = NULL 
)
pure virtual

Set run level.

The SetRunLevel method changes the global run level and manages all services dependencies.

Parameters
nRunLevel[in] Run level to set.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

Referenced by Init(), main(), and run().

virtual tResult UnregisterAllPlugins ( tInt  nRunLevel,
tUInt32  ui32Flags = 0,
IException **  __exception_ptr = NULL 
)
pure virtual

Unregister all plugin from plugin registry.

The UnregisterAllPlugins method unregisters all plugin from the plugin registry.

Parameters
nRunLevel[in] Runlevel information.
ui32Flags[in] Unregistration flags.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult UnregisterClass ( const tChar strClassId,
IException **  __exception_ptr = NULL 
)
pure virtual

Unregister class from class registry.

The UnregisterClass method unregisters a class from the class registry.

Parameters
strClassId[in] Unique identifier for the registered class (OID).
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult UnregisterHook ( IRuntimeHook pHook)
pure virtual

Unregister hook.

The UnregisterHook method unregisters a hook interface.

Parameters
pHook[in] Pointer to the hook interface to be unregistered.
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult UnregisterObject ( IObject pObject,
const tChar strIdentifier,
IException **  __exception_ptr = NULL 
)
pure virtual

Unregister object from object registry.

The UnregisterObject method unregisters an object from the object registry.

Parameters
pObject[in] Pointer to the object instance.
strIdentifier[in] Unique identifier for the registered instance.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.

virtual tResult UnregisterPlugin ( IPlugin pPlugin,
tUInt32  ui32Flags = 0,
IException **  __exception_ptr = NULL 
)
pure virtual

Unregister plugin from plugin registry.

The UnregisterPlugin method unregisters a plugin from the plugin registry.

Parameters
pPlugin[in] Pointer to the plugin instance.
ui32Flags[in] Unregistration flags.
__exception_ptr[inout] Address of variable that points to an IException interface. If not using the cException smart pointer, the interface has to be released by calling Unref().
Returns
Returns a standard result code.

Implemented in cRuntime.


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Fri Mar 22 2019 by doxygen 1.8.10)