reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::DomainMatcher Class Referenceabstract

#include <DomainMatcher.hxx>

Inheritance diagram for resip::DomainMatcher:
[legend]

Public Member Functions

virtual bool isMyDomain (const Data &domain) const =0
 Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
 
virtual void addDomain (const Data &domain)=0
 Adds a domain to the set of domains that this TransactionUser is responsible for.
 
virtual void removeDomain (const Data &domain)=0
 Removes a domain from the set of domains that this TransactionUser is responsible for.
 

Detailed Description

Definition at line 12 of file DomainMatcher.hxx.

Member Function Documentation

◆ addDomain()

virtual void resip::DomainMatcher::addDomain ( const Data &  domain)
pure virtual

Adds a domain to the set of domains that this TransactionUser is responsible for.

Note
The comparison performed is case-sensitive; make sure you lower-case everything you put in here.
Todo:
Make this case-insensitive.
Warning
This method is NOT thread-safe. mDomainList is accessed from both the thread that queues to the TU (iff a DomainIsMe MessageFilterRule is used) and from within the TU itself. The only way calling this is safe, is if you can ensure both of these threads are not calling isMyDomain when you call this method. For example an application that does NOT use a DomainIsMe MessageFilterRule and that posts the addDomain call to the TU processing thread for execution there, will be thread safe. This API is also safe to call before any of the processing threads have been started.

Implemented in resip::BasicDomainMatcher.

◆ isMyDomain()

virtual bool resip::DomainMatcher::isMyDomain ( const Data &  domain) const
pure virtual

Returns true iff domain matches one of the domains that this TransactionUser is responsible for.

(added with addDomain).

Parameters
domainThe domain name to check.
Returns
True iff this TransactionUser is responsible for domain.
Note
The comparison performed is case-sensitive; make sure you lower-case everything you put in here.

Implemented in resip::BasicDomainMatcher, and resip::ExtendedDomainMatcher.

◆ removeDomain()

virtual void resip::DomainMatcher::removeDomain ( const Data &  domain)
pure virtual

Removes a domain from the set of domains that this TransactionUser is responsible for.

Note
This API will lowercase the domain when searching for the domain to remove
Warning
This method is NOT thread-safe. mDomainList is accessed from both the thread that queues to the TU (iff a DomainIsMe MessageFilterRule is used) and from within the TU itself. The only way calling this is safe, is if you can ensure both of these threads are not calling isMyDomain when you call this method. For example an application that does NOT use a DomainIsMe MessageFilterRule and that posts the removeDomain call to the TU processing thread (ie: DUMThread) for execution there, will be thread safe.

Implemented in resip::BasicDomainMatcher.


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