Yate
MessageFilter Class Reference

A message filter. More...

#include <yatengine.h>

Inheritance diagram for MessageFilter:
MessageHandler MessagePostHook MessageRelay

Public Member Functions

 MessageFilter ()
 ~MessageFilter ()
bool matchesMsg (const Message &msg) const
const MatchingItemBasegetFilter () const
const MatchingItemBasegetMsgFilter () const
void setFilter (MatchingItemBase *filter)
void setMsgFilter (MatchingItemBase *filter)
void clearFilter ()
void clearMsgFilter ()
void setFilter (NamedString *filter)
void setFilter (const char *name, const char *value)

Detailed Description

A message filter.

This class holds a message filter

Constructor & Destructor Documentation

◆ MessageFilter()

MessageFilter ( )
inline

Constructor

◆ ~MessageFilter()

~MessageFilter ( )
inline

Destructor

Member Function Documentation

◆ clearFilter()

void clearFilter ( )
inline

Remove and destroy the message parameters filter

◆ clearMsgFilter()

void clearMsgFilter ( )
inline

Remove and destroy the message filter

◆ getFilter()

const MatchingItemBase * getFilter ( ) const
inline

Retrieve the message parameters filter

Returns
MatchingItemBase pointer, NULL if not set

Referenced by MessageHandler::filter().

◆ getMsgFilter()

const MatchingItemBase * getMsgFilter ( ) const
inline

Retrieve the message filter

Returns
MatchingItemBase pointer, NULL if not set

◆ matchesMsg()

bool matchesMsg ( const Message & msg) const
inline

Check if a message matches this filter's rules

Parameters
msgThe message to match

◆ setFilter() [1/3]

void setFilter ( const char * name,
const char * value )
inline

Set the message parameters filter

Parameters
nameName of the parameter to filter
valueValue of the parameter to filter

References setFilter().

◆ setFilter() [2/3]

void setFilter ( MatchingItemBase * filter)
inline

Set the message parameters filter

Parameters
filterPointer to matching list to set, will be owned and destroyed by the filter

Referenced by setFilter().

◆ setFilter() [3/3]

void setFilter ( NamedString * filter)

Set the message parameters filter

Parameters
filterPointer to the filter to set, will be owned and destroyed by this object. The filter may be a NamedPointer carrying a Regexp

◆ setMsgFilter()

void setMsgFilter ( MatchingItemBase * filter)
inline

Set the message filter

Parameters
filterPointer to matching list to set, will be owned and destroyed by the filter

The documentation for this class was generated from the following file: