kopete/libkopete
Kopete::SimpleMessageHandlerFactory Class Reference
#include <kopetesimplemessagehandler.h>

Detailed Description
A MessageHandlerFactory that creates synchronous MessageHandlers that just call a slot.A concrete MessageHandlerFactory. This class is intended to make writing MessageHandlers simpler; all that is required is to implement a message processing function and place an instance of this class in your Plugin-derived class.
Whenever a message passes through a handler created by this factory, the slot passed to the constructor will be called. The slot should take a single argument of type (non-const) Message &.
Definition at line 37 of file kopetesimplemessagehandler.h.
Public Member Functions | |
| MessageHandler * | create (ChatSession *manager, Message::MessageDirection direction) |
| int | filterPosition (ChatSession *manager, Message::MessageDirection direction) |
| SimpleMessageHandlerFactory (Message::MessageDirection direction, int position, QObject *target, const char *slot) | |
| ~SimpleMessageHandlerFactory () | |
Constructor & Destructor Documentation
| Kopete::SimpleMessageHandlerFactory::SimpleMessageHandlerFactory | ( | Message::MessageDirection | direction, | |
| int | position, | |||
| QObject * | target, | |||
| const char * | slot | |||
| ) |
- Parameters:
-
direction The direction this factory should create message handlers for
- Parameters:
-
position Where in the chain the handler should be installed target The object to call back to when handling a message slot The slot on targetto call when handling a message
Definition at line 36 of file kopetesimplemessagehandler.cpp.
| Kopete::SimpleMessageHandlerFactory::~SimpleMessageHandlerFactory | ( | ) |
Definition at line 46 of file kopetesimplemessagehandler.cpp.
Member Function Documentation
| MessageHandler * Kopete::SimpleMessageHandlerFactory::create | ( | ChatSession * | manager, | |
| Message::MessageDirection | direction | |||
| ) | [virtual] |
Creates and returns a SimpleMessageHandler object.
Implements Kopete::MessageHandlerFactory.
Definition at line 51 of file kopetesimplemessagehandler.cpp.
| int Kopete::SimpleMessageHandlerFactory::filterPosition | ( | ChatSession * | manager, | |
| Message::MessageDirection | direction | |||
| ) | [virtual] |
Returns the filter position passed to the constructor if direction matches the direction passed to the constructor, otherwise returns StageDoNotCreate.
Implements Kopete::MessageHandlerFactory.
Definition at line 61 of file kopetesimplemessagehandler.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference