|
reSIProcate/DialogUsageManager
9694
|
dcm! -- update contact in dialog if required More...
#include <BaseSubscription.hxx>


Public Member Functions | |
| bool | matches (const SipMessage &subOrNotify) |
| const Data & | getDocumentKey () const |
| const Data & | getEventType () const |
| const Data & | getId () const |
Protected Types | |
| enum | SubDlgState { SubDlgInitial, SubDlgEstablished, SubDlgTerminating } |
Protected Member Functions | |
| BaseSubscription (DialogUsageManager &dum, Dialog &dialog, const SipMessage &request) | |
| SubscriptionState | getSubscriptionState () |
| virtual | ~BaseSubscription () |
| BaseSubscription (const BaseSubscription &) | |
| BaseSubscription & | operator= (const BaseSubscription &) |
Protected Attributes | |
| SubDlgState | mSubDlgState |
| SharedPtr< SipMessage > | mLastRequest |
| SharedPtr< SipMessage > | mLastResponse |
| Data | mDocumentKey |
| Data | mEventType |
| Data | mSubscriptionId |
| unsigned int | mTimerSeq |
| SubscriptionState | mSubscriptionState |
Friends | |
| class | Dialog |
dcm! -- update contact in dialog if required
Definition at line 15 of file BaseSubscription.hxx.
enum resip::BaseSubscription::SubDlgState [protected] |
Definition at line 26 of file BaseSubscription.hxx.
| BaseSubscription::BaseSubscription | ( | DialogUsageManager & | dum, |
| Dialog & | dialog, | ||
| const SipMessage & | request | ||
| ) | [protected] |
Definition at line 9 of file BaseSubscription.cxx.
References resip::SipMessage::exists(), h_RequestLine, resip::SipMessage::header(), resip::RequestLine::method(), mEventType, mLastRequest, and mSubscriptionId.
: DialogUsage(dum, dialog), mSubDlgState(SubDlgInitial), mLastRequest(new SipMessage), mLastResponse(new SipMessage), mDocumentKey(request.header(h_RequestLine).uri().getAor()), mSubscriptionId(Data::Empty), mTimerSeq(0), mSubscriptionState(Invalid) { if (request.exists(h_Event)) { mEventType = request.header(h_Event).value(); if (request.header(h_Event).exists(p_id)) { mSubscriptionId = request.header(h_Event).param(p_id); } mLastRequest->header(h_Event) = request.header(h_Event); } else if (request.header(h_RequestLine).method() == REFER || request.header(h_RequestLine).method() == NOTIFY) { mEventType = "refer"; mLastRequest->header(h_Event).value() = mEventType; } }

| BaseSubscription::~BaseSubscription | ( | ) | [protected, virtual] |
Definition at line 62 of file BaseSubscription.cxx.
{
}
| resip::BaseSubscription::BaseSubscription | ( | const BaseSubscription & | ) | [protected] |
| const Data& resip::BaseSubscription::getDocumentKey | ( | ) | const [inline] |
Definition at line 19 of file BaseSubscription.hxx.
References mDocumentKey.
Referenced by resip::ServerSubscription::ServerSubscription(), and resip::ServerSubscription::~ServerSubscription().
{ return mDocumentKey; }
| const Data& resip::BaseSubscription::getEventType | ( | ) | const [inline] |
Definition at line 20 of file BaseSubscription.hxx.
References mEventType.
Referenced by resip::ClientSubscription::reSubscribe(), resip::ServerSubscription::ServerSubscription(), and resip::ServerSubscription::~ServerSubscription().
{ return mEventType; }
| const Data& resip::BaseSubscription::getId | ( | ) | const [inline] |
Definition at line 21 of file BaseSubscription.hxx.
References mSubscriptionId.
Referenced by resip::ServerSubscription::getHandle(), and resip::ClientSubscription::getHandle().
{ return mSubscriptionId; }
| SubscriptionState BaseSubscription::getSubscriptionState | ( | ) | [protected] |
Definition at line 67 of file BaseSubscription.cxx.
References mSubscriptionState.
{
return mSubscriptionState;
}
| bool BaseSubscription::matches | ( | const SipMessage & | subOrNotify | ) |
Definition at line 38 of file BaseSubscription.cxx.
References resip::SipMessage::exists(), resip::SipMessage::header(), resip::SipMessage::isResponse(), mEventType, mLastRequest, and mSubscriptionId.
{
if (msg.isResponse() && msg.header(h_CSeq) == mLastRequest->header(h_CSeq))
{
return true;
}
else
{
if (msg.exists(h_Event))
{
return msg.header(h_Event).value() == mEventType
&& ( !msg.header(h_Event).exists(p_id) ||
msg.header(h_Event).param(p_id) == mSubscriptionId);
}
else
{
return (mEventType == "refer" &&
Data(msg.header(h_CSeq).sequence()) == mSubscriptionId);
}
}
}

| BaseSubscription& resip::BaseSubscription::operator= | ( | const BaseSubscription & | ) | [protected] |
friend class Dialog [friend] |
Reimplemented in resip::ServerSubscription, and resip::ClientSubscription.
Definition at line 24 of file BaseSubscription.hxx.
Data resip::BaseSubscription::mDocumentKey [protected] |
Definition at line 47 of file BaseSubscription.hxx.
Referenced by getDocumentKey().
Data resip::BaseSubscription::mEventType [protected] |
Definition at line 48 of file BaseSubscription.hxx.
Referenced by BaseSubscription(), resip::ClientSubscription::dialogDestroyed(), resip::ServerSubscription::dialogDestroyed(), resip::ServerSubscription::dispatch(), resip::ClientSubscription::dispatch(), resip::ClientSubscription::flowTerminated(), resip::ServerSubscription::flowTerminated(), getEventType(), resip::ServerSubscription::makeNotify(), matches(), resip::ClientSubscription::onReadyToSend(), resip::ServerSubscription::onReadyToSend(), resip::ClientSubscription::processNextNotify(), resip::ClientSubscription::processResponse(), resip::ClientSubscription::rejectUpdate(), and resip::ServerSubscription::send().
SharedPtr<SipMessage> resip::BaseSubscription::mLastRequest [protected] |
Definition at line 44 of file BaseSubscription.hxx.
Referenced by BaseSubscription(), resip::ClientSubscription::ClientSubscription(), resip::ServerSubscription::dispatch(), resip::ClientSubscription::dispatch(), resip::ClientSubscription::dump(), resip::ClientSubscription::end(), resip::ServerSubscription::end(), resip::ServerSubscription::makeNotify(), resip::ServerSubscription::makeNotifyExpires(), matches(), resip::ServerSubscription::neutralNotify(), resip::ClientSubscription::processNextNotify(), resip::ClientSubscription::processResponse(), resip::ClientSubscription::requestRefresh(), resip::ClientSubscription::reSubscribe(), and resip::ServerSubscription::update().
SharedPtr<SipMessage> resip::BaseSubscription::mLastResponse [protected] |
Definition at line 45 of file BaseSubscription.hxx.
Referenced by resip::ServerSubscription::accept(), resip::ClientSubscription::acceptUpdate(), resip::ServerSubscription::dispatch(), resip::ClientSubscription::processNextNotify(), resip::ServerSubscription::reject(), resip::ClientSubscription::rejectUpdate(), and resip::ServerSubscription::shouldDestroyAfterSendingFailure().
SubDlgState resip::BaseSubscription::mSubDlgState [protected] |
Definition at line 36 of file BaseSubscription.hxx.
Referenced by resip::ServerSubscription::send(), and resip::ServerSubscription::shouldDestroyAfterSendingFailure().
Data resip::BaseSubscription::mSubscriptionId [protected] |
Definition at line 49 of file BaseSubscription.hxx.
Referenced by BaseSubscription(), getId(), resip::ServerSubscription::makeNotify(), matches(), and resip::ServerSubscription::ServerSubscription().
SubscriptionState resip::BaseSubscription::mSubscriptionState [protected] |
Definition at line 51 of file BaseSubscription.hxx.
Referenced by resip::ServerSubscription::dispatch(), resip::ServerSubscription::end(), getSubscriptionState(), resip::ServerSubscription::makeNotify(), resip::ServerSubscription::makeNotifyExpires(), resip::ServerSubscription::send(), and resip::ServerSubscription::setSubscriptionState().
unsigned int resip::BaseSubscription::mTimerSeq [protected] |
Definition at line 50 of file BaseSubscription.hxx.
Referenced by resip::ServerSubscription::dispatch(), resip::ClientSubscription::dispatch(), resip::ClientSubscription::end(), resip::ClientSubscription::processResponse(), resip::ClientSubscription::requestRefresh(), resip::ClientSubscription::scheduleRefresh(), and resip::ServerSubscription::send().
1.7.5.1