reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
BasicDomainMatcher.cxx
Go to the documentation of this file.
2
3#define RESIPROCATE_SUBSYSTEM resip::Subsystem::SIP
4
5using namespace resip;
6
8 mDomainList()
9{
10}
11
15
16bool
18{
19 // Domain search should be case insensitive - search in lowercase only
20 return mDomainList.find(Data(domain).lowercase()) != mDomainList.end();
21}
22
23void
25{
26 // Domain search should be case insensitive - store in lowercase only
27 mDomainList.emplace(Data(domain).lowercase());
28}
29
30void
32{
33 DomainList::iterator it = mDomainList.find(Data(domain).lowercase());
34 if (it != mDomainList.end())
35 {
36 mDomainList.erase(it);
37 }
38}
39
40/* ====================================================================
41 *
42 * Copyright 2017 Daniel Pocock http://danielpocock.com All rights reserved.
43 *
44 * Redistribution and use in source and binary forms, with or without
45 * modification, are permitted provided that the following conditions
46 * are met:
47 *
48 * 1. Redistributions of source code must retain the above copyright
49 * notice, this list of conditions and the following disclaimer.
50 *
51 * 2. Redistributions in binary form must reproduce the above copyright
52 * notice, this list of conditions and the following disclaimer in
53 * the documentation and/or other materials provided with the
54 * distribution.
55 *
56 * 3. Neither the name of the author(s) nor the names of any contributors
57 * may be used to endorse or promote products derived from this software
58 * without specific prior written permission.
59 *
60 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
61 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
64 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
65 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
66 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
69 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
70 * SUCH DAMAGE.
71 *
72 * ====================================================================
73 *
74 *
75 */
76
virtual void removeDomain(const Data &domain)
Removes a domain from the set of domains that this TransactionUser is responsible for.
virtual void addDomain(const Data &domain)
Adds a domain to the set of domains that this TransactionUser is responsible for.
virtual bool isMyDomain(const Data &domain) const
Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
dcm! – add UnusedChecking(_enum) below;