|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
The base-class for an RFC 3261 Transaction User. More...
#include <TransactionUser.hxx>
Public Member Functions | |
| void | post (Message *msg) |
| Posts a Message to this TransactionUser's fifo. | |
| bool | isMyDomain (const Data &domain) const |
| Returns true iff domain matches one of the domains that this TransactionUser is responsible for. | |
| void | addDomain (const Data &domain) |
| Adds a domain to the set of domains that this TransactionUser is responsible for. | |
| void | removeDomain (const Data &domain) |
| Removes a domain from the set of domains that this TransactionUser is responsible for. | |
| void | setDomainMatcher (std::shared_ptr< DomainMatcher > domainMatcher) noexcept |
| Replaces the default DomainMatcher. | |
| virtual const Data & | name () const =0 |
| Return the name of this TransactionUser. | |
| virtual EncodeStream & | encode (EncodeStream &strm) const |
| Encodes the name of this TransactionUser (as specified by name()), and the current depth of its fifo. | |
| void | setMessageFilterRuleList (MessageFilterRuleList &rules) |
| Sets this TransactionUser's MessageFilterRuleList. | |
| bool | isRegisteredForTransactionTermination () const |
| bool | isRegisteredForConnectionTermination () const |
| bool | isRegisteredForKeepAlivePongs () const |
| CongestionManager::RejectionBehavior | getRejectionBehavior () const |
| virtual void | setCongestionManager (CongestionManager *manager) |
| const TimeLimitFifo< Message > * | getFifo () |
| virtual const uint16_t | getExpectedWait () const |
| virtual bool | responsesMandatory () const |
Protected Member Functions | |
| TransactionUser (TransactionTermination t=DoNotRegisterForTransactionTermination, ConnectionTermination c=DoNotRegisterForConnectionTermination, KeepAlivePongs k=DoNotRegisterForKeepAlivePongs) | |
| Constructor that specifies whether this TransactionUser needs to hear about the completion of transactions, and the closing of connections. | |
| TransactionUser (MessageFilterRuleList &rules, TransactionTermination t=DoNotRegisterForTransactionTermination, ConnectionTermination c=DoNotRegisterForConnectionTermination, KeepAlivePongs k=DoNotRegisterForKeepAlivePongs) | |
| Constructor that specifies the MessageFilterRuleList, whether this TransactionUser needs to hear about the completion of transactions, and the closing of connections. | |
| virtual | ~TransactionUser ()=0 |
| virtual bool | isForMe (const SipMessage &msg) const |
| Returns true iff this TransactionUser should process msg. | |
Protected Attributes | |
| TimeLimitFifo< Message > | mFifo |
| This TransactionUser's fifo. | |
| CongestionManager * | mCongestionManager |
Friends | |
| class | TuSelector |
The base-class for an RFC 3261 Transaction User.
This is the "app-layer".
Subclasses of TransactionUser are expected to do the following things:
There is also a collection of things you can do to customize how the stack interacts with your TransactionUser:
Definition at line 50 of file TransactionUser.hxx.
|
protected |
| Enumerator | |
|---|---|
| RegisterForConnectionTermination | |
| DoNotRegisterForConnectionTermination | |
Definition at line 192 of file TransactionUser.hxx.
|
protected |
| Enumerator | |
|---|---|
| RegisterForKeepAlivePongs | |
| DoNotRegisterForKeepAlivePongs | |
Definition at line 198 of file TransactionUser.hxx.
|
protected |
| Enumerator | |
|---|---|
| RegisterForTransactionTermination | |
| DoNotRegisterForTransactionTermination | |
Definition at line 186 of file TransactionUser.hxx.
|
protected |
Constructor that specifies whether this TransactionUser needs to hear about the completion of transactions, and the closing of connections.
| t | Whether or not the TransactionUser should be informed when transactions end (disabled by default). |
| c | Whether or not the TransactionUser should be informed when connections close (disabled by default). |
Definition at line 13 of file TransactionUser.cxx.
|
protected |
Constructor that specifies the MessageFilterRuleList, whether this TransactionUser needs to hear about the completion of transactions, and the closing of connections.
| rules | The MessageFilterRuleList to use. (A copy is made) |
| t | Whether or not the TransactionUser should be informed when transactions end (disabled by default). |
| c | Whether or not the TransactionUser should be informed when connections close (disabled by default). |
Definition at line 33 of file TransactionUser.cxx.
|
protectedpure virtual |
Definition at line 50 of file TransactionUser.cxx.
| void TransactionUser::addDomain | ( | const Data & | domain | ) |
Adds a domain to the set of domains that this TransactionUser is responsible for.
Definition at line 104 of file TransactionUser.cxx.
|
virtual |
Encodes the name of this TransactionUser (as specified by name()), and the current depth of its fifo.
| strm | The ostream to encode to. |
Definition at line 122 of file TransactionUser.cxx.
|
inlinevirtual |
Definition at line 172 of file TransactionUser.hxx.
|
inline |
Definition at line 170 of file TransactionUser.hxx.
|
inline |
Definition at line 148 of file TransactionUser.hxx.
|
protectedvirtual |
Returns true iff this TransactionUser should process msg.
| msg | The SipMessage we received. |
Definition at line 80 of file TransactionUser.cxx.
| bool TransactionUser::isMyDomain | ( | const Data & | domain | ) | const |
Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
(added with addDomain).
| domain | The domain name to check. |
Definition at line 98 of file TransactionUser.cxx.
| bool TransactionUser::isRegisteredForConnectionTermination | ( | ) | const |
Definition at line 146 of file TransactionUser.cxx.
| bool TransactionUser::isRegisteredForKeepAlivePongs | ( | ) | const |
Definition at line 152 of file TransactionUser.cxx.
| bool TransactionUser::isRegisteredForTransactionTermination | ( | ) | const |
Definition at line 140 of file TransactionUser.cxx.
|
pure virtual |
Return the name of this TransactionUser.
Used in encode().
Implemented in repro::Proxy, and resip::DialogUsageManager.
| void TransactionUser::post | ( | Message * | msg | ) |
Posts a Message to this TransactionUser's fifo.
Ownership of msg is taken.
| msg | The Message to add to mFifo. (This takes ownership of msg) |
Definition at line 55 of file TransactionUser.cxx.
| void TransactionUser::removeDomain | ( | const Data & | domain | ) |
Removes a domain from the set of domains that this TransactionUser is responsible for.
Definition at line 110 of file TransactionUser.cxx.
|
inlinevirtual |
Definition at line 183 of file TransactionUser.hxx.
|
inlinevirtual |
Definition at line 157 of file TransactionUser.hxx.
|
noexcept |
Replaces the default DomainMatcher.
Definition at line 116 of file TransactionUser.cxx.
| void TransactionUser::setMessageFilterRuleList | ( | MessageFilterRuleList & | rules | ) |
Sets this TransactionUser's MessageFilterRuleList.
This tells the stack which SIP messages this TransactionUser is interested in, and which ones it is not. This allows multiple TransactionUsers to run on top of the same SipStack.
| rules | The MessageFilterRuleList to use. |
Definition at line 129 of file TransactionUser.cxx.
|
friend |
Definition at line 267 of file TransactionUser.hxx.
|
protected |
Definition at line 254 of file TransactionUser.hxx.
|
protected |
This TransactionUser's fifo.
All communication with the TransactionUser goes through here.
Definition at line 253 of file TransactionUser.hxx.