ADTF
Loading...
Searching...
No Matches
event_source_intf.h
Go to the documentation of this file.
1
7
8#ifndef _ADTF_UCOM_ANT_EVENT_SINK_EVENT_SOURCE_INTERFACE_INCLUDES_HEADER_
9#define _ADTF_UCOM_ANT_EVENT_SINK_EVENT_SOURCE_INTERFACE_INCLUDES_HEADER_
10
11namespace adtf
12{
13namespace ucom
14{
15namespace ant
16{
17
18class IEventSource;
19
26class DOEXPORT IEventSink
27{
28public:
33 ADTF_IID(IEventSink, "event_sink.ant.ucom.adtf.iid");
34
35public:
55 virtual tResult HandleEvent(const IEventSource& oSource, const void* pvEventData) = 0;
56
57protected:
59 ~IEventSink() = default;
60};
61
71class DOEXPORT IEventSource : public IObject
72{
73public:
78 ADTF_IID(IEventSource, "event_source.ant.ucom.adtf.iid");
79
80public:
90 virtual tResult RegisterEventSink(IEventSink& oEventSink) = 0;
91
101 virtual tResult UnregisterEventSink(IEventSink& oEventSink) = 0;
102
103protected:
105 ~IEventSource() = default;
106};
107
108}//namespace ant
109
111using ant::IEventSink;
112
115
116}//namespace ucom
117}//namespace adtf
118
119#endif //_ADTF_UCOM_ANT_EVENT_SINK_EVENT_SOURCE_INTERFACE_INCLUDES_HEADER_
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
The class IEventSink provides a generic event listener interface for Internal Events.
~IEventSink()=default
Protected destructor --> Only the final implementation can be destroyed!
ADTF_IID(IEventSink, "event_sink.ant.ucom.adtf.iid")
Marks the IEventSink to be castable with the ucom_cast<>
virtual tResult HandleEvent(const IEventSource &oSource, const void *pvEventData)=0
Handle event.
The class IEventSource provides a generic event provider interface.
virtual tResult RegisterEventSink(IEventSink &oEventSink)=0
Register event sink.
~IEventSource()=default
Protected destructor --> Only the final implementation can be destroyed!
ADTF_IID(IEventSource, "event_source.ant.ucom.adtf.iid")
Marks the IEventSource to be castable with the ucom_cast<>
virtual tResult UnregisterEventSink(IEventSink &oEventSink)=0
Unregister event sink.
Base class for every interface type within the uCOM.
Definition object_intf.h:33
Namespace for all functionality provided since v3.0.
Namespace for the ADTF uCOM3 SDK.
Namespace for entire ADTF SDK.