reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
DialogEventInfo.hxx
Go to the documentation of this file.
1#if !defined(RESIP_DialogEventInfo_hxx)
2#define RESIP_DialogEventInfo_hxx
3
4#include <memory>
9
10namespace resip
11{
12
13//As uac, one is created for DialogSet; given to first dialog, new instances are
14//generated for each fork. As uas, created at the same time as a Dialog.
16{
17 public:
18 DialogEventInfo(void);
20 DialogEventInfo& operator=(const DialogEventInfo& dialogEventInfo);
21
22 //based on DialogEventId
23 bool operator==(const DialogEventInfo& rhs) const;
24 bool operator!=(const DialogEventInfo& rhs) const;
25 bool operator<(const DialogEventInfo& rhs) const;
26
32
41
42 const State& getState() const;
43
44 const Data& getDialogEventId() const;
45
46 const Data& getCallId() const;
47 const Data& getLocalTag() const;
48 bool hasRemoteTag() const;
49 const Data& getRemoteTag() const;
50
51 bool hasRefferedBy() const;
52 const NameAddr& getRefferredBy() const;
53
54 const NameAddr& getLocalIdentity() const;
55 const NameAddr& getRemoteIdentity() const;
56 const Uri& getLocalTarget() const;
57 //has... below only applicable when direction is outgoing
58 bool hasRouteSet() const;
59 const NameAddrs& getRouteSet() const;
60 bool hasRemoteTarget() const;
61 const Uri& getRemoteTarget() const;
62
63 // cache the first one, then forevermore lookup from InviteSession
64 const Contents& getLocalOfferAnswer() const;
65 const Contents& getRemoteOfferAnswer() const;
66 bool hasLocalOfferAnswer() const;
67 bool hasRemoteOfferAnswer() const;
68
69 uint64_t getDurationSeconds() const; // in seconds
70
71 bool hasReplacesId() const;
72 const DialogId& getReplacesId() const;
73
74 Direction getDirection() const;
75
76 protected:
78
80 Data mDialogEventId; //unique for all Dialogs at this ua...may hash local +
81 //callid, all 3 tags for forks. Or could cycles an
82 //integer...hash memory location+salt at cons time(might be easiest).
85 //ID of the dialog this dialog replaced.
86 std::unique_ptr<DialogId> mReplacesId;
88
89 std::unique_ptr<NameAddr> mReferredBy;
90
91//could back-point to dialog for this information to save space
96 std::unique_ptr<Uri> mRemoteTarget;
97
99
100 std::unique_ptr<Contents> mLocalOfferAnswer;
101 std::unique_ptr<Contents> mRemoteOfferAnswer;
102
103 private:
104 bool mReplaced;
105};
106
107}
108
109#endif
110
111
112/* ====================================================================
113 * The Vovida Software License, Version 1.0
114 *
115 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
116 *
117 * Redistribution and use in source and binary forms, with or without
118 * modification, are permitted provided that the following conditions
119 * are met:
120 *
121 * 1. Redistributions of source code must retain the above copyright
122 * notice, this list of conditions and the following disclaimer.
123 *
124 * 2. Redistributions in binary form must reproduce the above copyright
125 * notice, this list of conditions and the following disclaimer in
126 * the documentation and/or other materials provided with the
127 * distribution.
128 *
129 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
130 * and "Vovida Open Communication Application Library (VOCAL)" must
131 * not be used to endorse or promote products derived from this
132 * software without prior written permission. For written
133 * permission, please contact vocal@vovida.org.
134 *
135 * 4. Products derived from this software may not be called "VOCAL", nor
136 * may "VOCAL" appear in their name, without prior written
137 * permission of Vovida Networks, Inc.
138 *
139 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
140 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
141 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
142 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
143 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
144 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
145 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
146 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
147 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
148 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
149 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
150 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
151 * DAMAGE.
152 *
153 * ====================================================================
154 *
155 * This software consists of voluntary contributions made by Vovida
156 * Networks, Inc. and many individuals on behalf of Vovida Networks,
157 * Inc. For more information on Vovida Networks, Inc., please see
158 * <http://www.vovida.org/>.
159 *
160 */
Base class for all SIP body types.
Definition Contents.hxx:51
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
const Uri & getRemoteTarget() const
const Data & getLocalTag() const
DialogEventInfo & operator=(const DialogEventInfo &dialogEventInfo)
std::unique_ptr< Contents > mRemoteOfferAnswer
std::unique_ptr< Contents > mLocalOfferAnswer
std::unique_ptr< DialogId > mReplacesId
std::unique_ptr< Uri > mRemoteTarget
const Data & getRemoteTag() const
const Contents & getRemoteOfferAnswer() const
const DialogId & getReplacesId() const
std::unique_ptr< NameAddr > mReferredBy
bool operator!=(const DialogEventInfo &rhs) const
const State & getState() const
const Data & getDialogEventId() const
const NameAddr & getRefferredBy() const
Direction getDirection() const
bool operator==(const DialogEventInfo &rhs) const
const NameAddrs & getRouteSet() const
uint64_t getDurationSeconds() const
const Data & getCallId() const
const NameAddr & getRemoteIdentity() const
bool operator<(const DialogEventInfo &rhs) const
const NameAddr & getLocalIdentity() const
const Uri & getLocalTarget() const
const Contents & getLocalOfferAnswer() const
InviteSessionHandle mInviteSession
Implements the FSM for dialog state as spec'd in RFC 4235.
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
dcm! – add UnusedChecking(_enum) below;
unsigned long long uint64_t
Definition Stun.hxx:39