• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/libkopete

Kopete::SimpleMessageHandlerFactory

Kopete::SimpleMessageHandlerFactory Class Reference

#include <kopetesimplemessagehandler.h>

Inheritance diagram for Kopete::SimpleMessageHandlerFactory:

Inheritance graph
[legend]

List of all members.


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

 SimpleMessageHandlerFactory (Message::MessageDirection direction, int position, QObject *target, const char *slot)
 ~SimpleMessageHandlerFactory ()
MessageHandler * create (ChatSession *manager, Message::MessageDirection direction)
int filterPosition (ChatSession *manager, Message::MessageDirection direction)

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 target to call when handling a message
See also:
Kopete::MessageHandlerFactory::filterPosition

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:
  • kopetesimplemessagehandler.h
  • kopetesimplemessagehandler.cpp

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal