Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
A class wishing to receive messages should implement this and call. More...
#include "messaging/IMessageTarget.h"
Public Member Functions | |
virtual | ~IMessageTarget ()=default |
virtual int | GetMessageMask ()=0 |
Should return the message mask that it wishes to receive messages for. | |
virtual void | OnApplicationMessage (ThreadMessage *msg)=0 |
This gets called whenever a message matching the registered message mask is processed. | |
A class wishing to receive messages should implement this and call.
|
virtualdefault |
|
pure virtual |
Should return the message mask that it wishes to receive messages for.
The message mask is defined in "messaging/ApplicationMessenger.h" pick the next one available when creating a new
Implemented in CApplication, CGUIInfoManager, CGUIWindowManager, KODI::PLAYLIST::CPlayListPlayer, and PERIPHERALS::CPeripherals.
|
pure virtual |
This gets called whenever a message matching the registered message mask is processed.
There are no ordering guarantees here so implementations should never rely on a certain ordering of messages.
Cleaning up any pointers stored in the message payload is not specified and is decided by the implementer of the message. In general prefer to delete any data in this method to keep the callsites cleaner and simpler but if data is to be passed back it's perfectly valid to handle it any way that fits the situation as long as it's documented along with the message.
To return a simple value the result parameter of
Implemented in CApplication, CGUIInfoManager, CGUIWindowManager, KODI::PLAYLIST::CPlayListPlayer, and PERIPHERALS::CPeripherals.