reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ExtendedDomainMatcher.hxx
Go to the documentation of this file.
1#if !defined(RESIP_EXTENDEDDOMAINMATCHER_HXX)
2#define RESIP_EXTENDEDDOMAINMATCHER_HXX
3
4#include<unordered_set>
5
7#include "rutil/Data.hxx"
8#include "rutil/HashMap.hxx"
10
11namespace resip
12{
13
15{
16
17 public:
18
20 virtual ~ExtendedDomainMatcher();
21 virtual bool isMyDomain(const Data& domain) const;
22 virtual void addDomainSuffix(const Data& domainSuffix);
23 virtual void removeDomainSuffix(const Data& domainSuffix);
24
25 private:
26
27 typedef std::unordered_set<Data> DomainSuffixList;
28 DomainSuffixList mDomainSuffixList;
29};
30
31}
32
33
34#endif
35
36/* ====================================================================
37 *
38 * Copyright 2017 Daniel Pocock http://danielpocock.com All rights reserved.
39 *
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
42 * are met:
43 *
44 * 1. Redistributions of source code must retain the above copyright
45 * notice, this list of conditions and the following disclaimer.
46 *
47 * 2. Redistributions in binary form must reproduce the above copyright
48 * notice, this list of conditions and the following disclaimer in
49 * the documentation and/or other materials provided with the
50 * distribution.
51 *
52 * 3. Neither the name of the author(s) nor the names of any contributors
53 * may be used to endorse or promote products derived from this software
54 * without specific prior written permission.
55 *
56 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
57 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
58 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
59 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
60 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
61 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
62 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
64 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
65 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
66 * SUCH DAMAGE.
67 *
68 * ====================================================================
69 *
70 *
71 */
72
Wraps your platform's implementation of hash_map, hash_multimap, and hash_set.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
virtual bool isMyDomain(const Data &domain) const
Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
virtual void addDomainSuffix(const Data &domainSuffix)
virtual void removeDomainSuffix(const Data &domainSuffix)
dcm! – add UnusedChecking(_enum) below;