Provides functions to intercept messages received if the devices are not used.
|
typedef void(* | gxPLMessageListener) (gxPLApplication *app, gxPLMessage *, void *) |
| Function that will be called each valid message reception.
|
|
int gxPLMessageListenerAdd |
( |
gxPLApplication * |
app, |
|
|
gxPLMessageListener |
listener, |
|
|
void * |
udata |
|
) |
| |
Add a message listener.
- Parameters
-
app | pointer to a gxPLApplication object |
listener | function that will be called each message reception. |
udata | pointer to the data passed to the listener |
- Returns
- 0, -1 if an error occurs
- Examples:
- logger/gxpl-logger.c.
Remove a message listener.
- Parameters
-
app | pointer to a gxPLApplication object |
listener | the listener to remove |
- Returns
- 0, -1 if an error occurs