#include <chatmessagehandler.h>
Handles messages that are being sent in chat for special commands such as /ignore. Custom callback functions must inherit ICallbacks and passed in through the constructor first. Messages being sent will be passed in through HandleMessage().
◆ ChatMessageHandler()
| ttv::chat::ChatMessageHandler::ChatMessageHandler |
( |
| ) |
|
◆ HandleMessage()
| bool ttv::chat::ChatMessageHandler::HandleMessage |
( |
const std::string & |
message | ) |
|
Takes in outgoing chat messages and call the corresponding callback function based on the contents of the message.
- Precondition
- Callback functions must be set previously through SetCallbacks.
- Parameters
-
| [in] | message | The message being sent to chat. |
- Returns
- The result of the callback function.
◆ SetCallbacks()
| void ttv::chat::ChatMessageHandler::SetCallbacks |
( |
const std::shared_ptr< ICallbacks > & |
callbacks | ) |
|
|
inline |
Sets the callbacks functions that are called when HandleMessage is called.
- Parameters
-
| [in] | callbacks | Pointer to the inherited ICallbacks class. |
◆ mCallbacks
| std::shared_ptr<ICallbacks> ttv::chat::ChatMessageHandler::mCallbacks |
|
private |
The documentation for this class was generated from the following file: