1#if defined(HAVE_CONFIG_H)
11#define RESIPROCATE_SUBSYSTEM resip::Subsystem::TRANSACTION
21 : mSchemeList(schemeList),
22 mHostpartMatches(hostpartType),
23 mMethodList(methodList),
24 mEventList(eventList),
33 : mSchemeList(schemeList),
34 mHostpartMatches(List),
35 mHostpartList(hostpartList),
36 mMethodList(methodList),
37 mEventList(eventList),
47 if (!schemeIsInList(scheme))
49 DebugLog(<<
" MessageFilterRule::matches: Scheme is not in list. Rule does not match.");
59 DebugLog(<<
" MessageFilterRule::matches: Host is not in list. Rule does not match.");
65 if (!methodIsInList(method))
67 DebugLog(<<
" MessageFilterRule::matches: Method is not in list. Rule does not match.");
77 if (!eventIsInList(msg))
79 DebugLog(<<
" MessageFilterRule::matches: Event is not in list. Rule does not match.");
92MessageFilterRule::schemeIsInList(
const Data& scheme)
const
95 if (mSchemeList.empty())
102 for (SchemeList::const_iterator i = mSchemeList.begin();
103 i != mSchemeList.end(); i++)
115MessageFilterRule::methodIsInList(
MethodTypes method)
const
118 if (mMethodList.empty())
123 for (MethodList::const_iterator i = mMethodList.begin();
124 i != mMethodList.end(); i++)
136MessageFilterRule::eventIsInList(
const SipMessage& msg)
const
139 if (mEventList.empty())
151 for (EventList::const_iterator i = mEventList.begin();
152 i != mEventList.end(); i++)
164MessageFilterRule::hostIsInList(
const Data& hostpart)
const
166 switch(mHostpartMatches)
178 return mTransactionUser->
isMyDomain(hostpart);
184 for (HostpartList::const_iterator i = mHostpartList.begin() ;
185 i != mHostpartList.end() ; ++i)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
std::vector< Data > EventList
std::vector< MethodTypes > MethodList
std::vector< Data > HostpartList
MessageFilterRule(SchemeList schemeList=SchemeList(), HostpartTypes hostpartType=Any, MethodList methodList=MethodList(), EventList eventTypeList=EventList())
bool matches(const SipMessage &) const
std::vector< Data > SchemeList
Represents a SIP message.
const RequestLine & header(const RequestLineType &l) const
Returns the RequestLine. This is only valid for request messages.
bool exists(const HeaderBase &headerType) const
Returns true if the given header field is present, false otherwise.
bool isMyDomain(const Data &domain) const
Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
dcm! – add UnusedChecking(_enum) below;
bool isEqualNoCase(const Data &left, const Data &right)
RequestLineType h_RequestLine