Module for managing event listeners.
More...
Module for managing event listeners.
The SRMListener module provides functions for creating, setting, and managing event listeners. Event listeners are used to handle events or callbacks in response to specific actions or changes.
- See also
- srmCoreAddDeviceCreatedEventListener()
-
srmCoreAddDeviceRemovedEventListener()
-
srmCoreAddConnectorPluggedEventListener()
-
srmCoreAddConnectorUnpluggedEventListener()
◆ SRMListener
◆ srmListenerSetUserData()
void srmListenerSetUserData |
( |
SRMListener * |
listener, |
|
|
void * |
userData |
|
) |
| |
Set user data associated with an event listener.
- Parameters
-
listener | A pointer to the SRMListener instance. |
userData | A pointer to user-defined data to associate with the listener. |
◆ srmListenerGetUserData()
Get user data associated with an event listener.
- Parameters
-
listener | A pointer to the SRMListener instance. |
- Returns
- A pointer to the user-defined data associated with the listener.
◆ srmListenerSetCallbackFunction()
void srmListenerSetCallbackFunction |
( |
SRMListener * |
listener, |
|
|
void * |
callbackFunction |
|
) |
| |
Set the callback function associated with an event listener.
- Parameters
-
listener | A pointer to the SRMListener instance. |
callbackFunction | A pointer to the callback function to associate with the listener. |
◆ srmListenerGetCallbackFunction()
void* srmListenerGetCallbackFunction |
( |
SRMListener * |
listener | ) |
|
Get the callback function associated with an event listener.
- Parameters
-
listener | A pointer to the SRMListener instance. |
- Returns
- A pointer to the callback function associated with the listener.
◆ srmListenerDestroy()
Destroy an event listener and release associated resources.
- Parameters
-
listener | A pointer to the SRMListener instance to destroy. |