ODeV framework  v2
Typedefs | Functions
IEventSrc.h File Reference

Event Source interface. More...

#include "systypes.h"
#include "syserror.h"
#include "IEvent.h"
#include "IEventListener.h"
#include "IEventListenerVtbl.h"
+ Include dependency graph for IEventSrc.h:

Go to the source code of this file.

Typedefs

typedef struct _IEventSrc IEventSrc
 

Functions

sys_error_code_t IEventSrcInit (IEventSrc *this)
 
sys_error_code_t IEventSrcAddEventListener (IEventSrc *this, IEventListener *pListener)
 
sys_error_code_t IEventSrcRemoveEventListener (IEventSrc *this, IEventListener *pListener)
 
uint32_t IEventSrcGetMaxListenerCount (const IEventSrc *this)
 
sys_error_code_t IEventSrcSendEvent (const IEventSrc *this, const IEvent *pxEvent, void *pvParams)
 

Detailed Description

Event Source interface.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
1.2.0
Date
Apr 6, 2017

An Event Source object provides the API to add / remove Event Listener objects, and to notify the registered listeners.

Attention

© COPYRIGHT 2017 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

◆ IEventSrc

typedef struct _IEventSrc IEventSrc

Create type name for _IEventSrc.

Function Documentation

◆ IEventSrcAddEventListener()

sys_error_code_t IEventSrcAddEventListener ( IEventSrc this,
IEventListener pListener 
)
inline

Register a listener with this event souce.

Parameters
this[IN] specifies a pointer to an IEventSrc object.
pListener[IN] specifies a pointer to an IEventListener object.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.

◆ IEventSrcGetMaxListenerCount()

uint32_t IEventSrcGetMaxListenerCount ( const IEventSrc this)
inline

Get the maximum number of IEventListener that can be registered with this event source.

Parameters
this[IN] specifies a pointer to an IEventSrc object.
Returns
the maximum number of IEventListener that can be registered with this event source

◆ IEventSrcInit()

sys_error_code_t IEventSrcInit ( IEventSrc this)
inline

Initialize an event source. This function should be called after the

Parameters
this[IN] specifies a pointer to an IEventSrc object.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.

◆ IEventSrcRemoveEventListener()

sys_error_code_t IEventSrcRemoveEventListener ( IEventSrc this,
IEventListener pListener 
)
inline

Remove a listener from this event source,

Parameters
this[IN] specifies a pointer to an IEventSrc object.
pListener[IN] specifies a pointer to an IEventListener object.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.

◆ IEventSrcSendEvent()

sys_error_code_t IEventSrcSendEvent ( const IEventSrc this,
const IEvent pxEvent,
void *  pvParams 
)
inline

Send an IEvent to all the registered IEventListener.

Parameters
this[IN] specifies a pointer to an IEventSrc object.
pxEvent[IN] specifies a pointer to an IEvent object.
pvParams[IN] specifies a generic pointer that can be used by the application extend the semantic Event design pattern.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.