reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
Target.cxx
Go to the documentation of this file.
1#include "repro/Target.hxx"
2
3#include "resip/stack/Uri.hxx"
5#include "rutil/Data.hxx"
6#include "resip/stack/Via.hxx"
7#include "repro/Proxy.hxx"
9
10namespace repro
11{
12
14 :mPriorityMetric(0),
15 mShouldAutoProcess(true),
16 mStatus(Candidate),
17 mKeyValueStore(*Proxy::getTargetKeyValueStoreKeyAllocator())
18{}
19
21 :mPriorityMetric(0),
22 mShouldAutoProcess(true),
23 mStatus(Candidate),
24 mKeyValueStore(*Proxy::getTargetKeyValueStoreKeyAllocator())
25{
27}
28
30 :mPriorityMetric(0),
31 mShouldAutoProcess(true),
32 mStatus(Candidate),
33 mKeyValueStore(*Proxy::getTargetKeyValueStoreKeyAllocator())
34{
35 mRec.mContact=target;
36}
37
39 :mPriorityMetric(0),
40 mShouldAutoProcess(true),
41 mStatus(Candidate),
42 mRec(rec)
43{
44}
45
49
50const resip::Data&
52{
53 return mVia.param(resip::p_branch).getTransactionId();
54}
55
58{
59 return mStatus;
60}
61
62const Target::Status&
64{
65 return mStatus;
66}
67
68const resip::Via&
70{
71 return mVia=via;
72}
73
74const resip::Via&
76{
77 return mVia;
78}
79
82{
83 return mRec;
84}
85
88{
89 return mRec;
90}
91
92void
97
98Target*
100{
101 return new Target(*this);
102}
103
104int
106{
107 return mPriorityMetric;
108}
109
110bool
112{
113 return mShouldAutoProcess;
114}
115
118{
119 strm << "Target: " << t.uri() << " status=" << t.status();
120 return strm;
121}
122
123} // namespace repro
124
125/* ====================================================================
126 * The Vovida Software License, Version 1.0
127 *
128 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
129 *
130 * Redistribution and use in source and binary forms, with or without
131 * modification, are permitted provided that the following conditions
132 * are met:
133 *
134 * 1. Redistributions of source code must retain the above copyright
135 * notice, this list of conditions and the following disclaimer.
136 *
137 * 2. Redistributions in binary form must reproduce the above copyright
138 * notice, this list of conditions and the following disclaimer in
139 * the documentation and/or other materials provided with the
140 * distribution.
141 *
142 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
143 * and "Vovida Open Communication Application Library (VOCAL)" must
144 * not be used to endorse or promote products derived from this
145 * software without prior written permission. For written
146 * permission, please contact vocal@vovida.org.
147 *
148 * 4. Products derived from this software may not be called "VOCAL", nor
149 * may "VOCAL" appear in their name, without prior written
150 * permission of Vovida Networks, Inc.
151 *
152 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
153 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
154 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
155 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
156 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
157 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
158 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
159 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
160 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
161 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
162 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
163 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
164 * DAMAGE.
165 *
166 * ====================================================================
167 *
168 * This software consists of voluntary contributions made by Vovida
169 * Networks, Inc. and many individuals on behalf of Vovida Networks,
170 * Inc. For more information on Vovida Networks, Inc., please see
171 * <http://www.vovida.org/>.
172 *
173 */
resip::ContactInstanceRecord mRec
Definition Target.hxx:74
virtual const resip::Uri & uri() const
Definition Target.hxx:45
virtual void setRec(const resip::ContactInstanceRecord &rec)
Definition Target.cxx:93
virtual bool shouldAutoProcess() const
Definition Target.cxx:111
virtual const resip::Via & setVia(const resip::Via &via)
Definition Target.cxx:69
int mPriorityMetric
Higher value denotes higher priority.
Definition Target.hxx:68
virtual Status & status()
Definition Target.cxx:57
resip::Via mVia
Definition Target.hxx:73
virtual Target * clone() const
Definition Target.cxx:99
virtual const resip::Data & tid() const
Definition Target.cxx:51
Status mStatus
Definition Target.hxx:72
virtual const resip::Via & via() const
Definition Target.cxx:75
virtual int getPriority() const
Definition Target.cxx:105
virtual const resip::ContactInstanceRecord & rec() const
Definition Target.cxx:81
virtual ~Target()
Definition Target.cxx:46
bool mShouldAutoProcess
Definition Target.hxx:69
A single contact record, bound to an Aor during registration.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Definition NameAddr.hxx:19
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
Represents the "via-parm" element in the RFC 3261 grammar.
Definition Via.hxx:18
const Data & param(const ExtensionParameter &param) const
Const accessor for non-natively-supported parameter types.
This Class is used to implement a primitive form of RPC using loose XML formatting.
EncodeStream & operator<<(EncodeStream &os, const repro::Processor &rp)
Definition Processor.cxx:69
#define EncodeStream
void list()
Definition userAdmin.cxx:66