|
reSIProcate/DialogUsageManager
9694
|


Public Member Functions | |
| TestSMIMEInviteHandler (Security *sec) | |
| virtual | ~TestSMIMEInviteHandler () |
| void | resetRegistered (void) |
| bool | isConnected (void) |
| bool | isDumShutDown (void) |
| bool | isRegistered (void) |
| bool | isDone (void) |
| bool | isCallFailed (void) |
| SdpContents * | generateBody () |
| virtual void | onSuccess (ClientRegistrationHandle r, const SipMessage &response) |
| Called when registraion succeeds or each time it is sucessfully refreshed. | |
| virtual void | onConnected (ClientInviteSessionHandle, const SipMessage &msg) |
| called when a dialog initiated as a UAC enters the connected state | |
| virtual void | onFailure (ClientInviteSessionHandle, const SipMessage &msg) |
| Received a failure response from UAS. | |
| virtual void | onNewSession (ServerInviteSessionHandle is, InviteSession::OfferAnswerType oat, const SipMessage &msg) |
| called when an initial INVITE or the intial response to an outoing invite | |
| virtual void | onConnected (InviteSessionHandle, const SipMessage &msg) |
| called when a dialog initiated as a UAS enters the connected state | |
| virtual void | onTerminated (InviteSessionHandle, InviteSessionHandler::TerminatedReason reason, const SipMessage *msg) |
| virtual void | onOffer (InviteSessionHandle is, const SipMessage &msg, const SdpContents &sdp) |
| called when an offer is received - must send an answer soon after this | |
| virtual void | onAnswer (InviteSessionHandle, const SipMessage &msg, const SdpContents &sdp) |
| called when an answer is received - has nothing to do with user answering the call | |
| virtual void | onDumCanBeDeleted () |
| virtual void | onReferNoSub (InviteSessionHandle, const SipMessage &msg) |
Public Attributes | |
| std::vector < ClientRegistrationHandle > | handles |
| ServerInviteSessionHandle | sis |
Private Attributes | |
| Security * | security |
| int | registered |
| int | done |
| int | dumShutDown |
| int | connected |
| bool | callFailed |
Definition at line 48 of file testSMIMEInvite.cxx.
| TestSMIMEInviteHandler::TestSMIMEInviteHandler | ( | Security * | sec | ) | [inline] |
Definition at line 54 of file testSMIMEInvite.cxx.
: handles(0), security(sec), registered(0), done(0), dumShutDown(0), connected(0), callFailed(false) { }
| virtual TestSMIMEInviteHandler::~TestSMIMEInviteHandler | ( | ) | [inline, virtual] |
Definition at line 58 of file testSMIMEInvite.cxx.
{
}
| SdpContents* TestSMIMEInviteHandler::generateBody | ( | ) | [inline] |
Definition at line 93 of file testSMIMEInvite.cxx.
References resip::Data::data(), and resip::Data::size().
Referenced by main().
{
Data* txt = new Data("v=0\r\n"
"o=1900 369696545 369696545 IN IP4 192.168.2.15\r\n"
"s=X-Lite\r\n"
"c=IN IP4 192.168.2.15\r\n"
"t=0 0\r\n"
"m=audio 8000 RTP/AVP 8 3 101\r\n"
"a=rtpmap:8 pcma/8000\r\n"
"a=rtpmap:3 gsm/8000\r\n"
"a=rtpmap:101 telephone-event/8000\r\n"
"a=fmtp:101 0-15\r\n");
HeaderFieldValue hfv(txt->data(), txt->size());
SdpContents *sdp = new SdpContents(hfv, Mime("application", "sdp"));
return sdp;
}

| bool TestSMIMEInviteHandler::isCallFailed | ( | void | ) | [inline] |
| bool TestSMIMEInviteHandler::isConnected | ( | void | ) | [inline] |
Definition at line 67 of file testSMIMEInvite.cxx.
Referenced by main().
{
return (connected == 2);
}
| bool TestSMIMEInviteHandler::isDone | ( | void | ) | [inline] |
| bool TestSMIMEInviteHandler::isDumShutDown | ( | void | ) | [inline] |
Definition at line 72 of file testSMIMEInvite.cxx.
Referenced by main().
{
return (dumShutDown == 2);
}
| bool TestSMIMEInviteHandler::isRegistered | ( | void | ) | [inline] |
Definition at line 77 of file testSMIMEInvite.cxx.
Referenced by main().
{
return (registered == 2);
}
| virtual void TestSMIMEInviteHandler::onAnswer | ( | InviteSessionHandle | , |
| const SipMessage & | msg, | ||
| const SdpContents & | |||
| ) | [inline, virtual] |
called when an answer is received - has nothing to do with user answering the call
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 186 of file testSMIMEInvite.cxx.
References resip::SipMessage::getSecurityAttributes(), and InfoLog.
{
InfoLog( << "InviteSessionHandler::onAnswer");
InfoLog( << "Client received SDP: " << sdp );
const SecurityAttributes *attr = msg.getSecurityAttributes();
if (attr)
{
InfoLog( << *attr );
}
else
{
InfoLog( << "no Security Attributes" );
}
}

| virtual void TestSMIMEInviteHandler::onConnected | ( | ClientInviteSessionHandle | , |
| const SipMessage & | msg | ||
| ) | [inline, virtual] |
called when a dialog initiated as a UAC enters the connected state
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 120 of file testSMIMEInvite.cxx.
References InfoLog.
| virtual void TestSMIMEInviteHandler::onConnected | ( | InviteSessionHandle | , |
| const SipMessage & | msg | ||
| ) | [inline, virtual] |
called when a dialog initiated as a UAS enters the connected state
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 145 of file testSMIMEInvite.cxx.
References InfoLog.
| virtual void TestSMIMEInviteHandler::onDumCanBeDeleted | ( | ) | [inline, virtual] |
Reimplemented from resip::TestDumShutdownHandler.
Definition at line 205 of file testSMIMEInvite.cxx.
References InfoLog.
{
InfoLog( << "DumShutDownHandler::onDumCanBeDeleted" );
dumShutDown++;
}
| virtual void TestSMIMEInviteHandler::onFailure | ( | ClientInviteSessionHandle | , |
| const SipMessage & | msg | ||
| ) | [inline, virtual] |
Received a failure response from UAS.
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 128 of file testSMIMEInvite.cxx.
References InfoLog.
{
InfoLog( << "TestInviteSessionHander::onFailure" );
callFailed = true;
}
| virtual void TestSMIMEInviteHandler::onNewSession | ( | ServerInviteSessionHandle | , |
| InviteSession::OfferAnswerType | oat, | ||
| const SipMessage & | msg | ||
| ) | [inline, virtual] |
called when an initial INVITE or the intial response to an outoing invite
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 136 of file testSMIMEInvite.cxx.
References InfoLog.
| virtual void TestSMIMEInviteHandler::onOffer | ( | InviteSessionHandle | , |
| const SipMessage & | msg, | ||
| const SdpContents & | |||
| ) | [inline, virtual] |
called when an offer is received - must send an answer soon after this
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 160 of file testSMIMEInvite.cxx.
References resip::SipMessage::getSecurityAttributes(), resip::SipMessage::header(), InfoLog, and resip::RequestLine::uri().
{
InfoLog( << "InviteSessionHandler::onOffer" );
InfoLog( << "Server received SDP: " << sdp );
const SecurityAttributes *attr = msg.getSecurityAttributes();
if (attr)
{
InfoLog( << *attr );
}
else
{
InfoLog( << "no Security Attributes" );
}
if (sis.isValid())
{
NameAddr fromAor(msg.header(h_From).uri());
NameAddr toAor(msg.header(h_To).uri());
is->provideAnswer(*generateBody());
sis->accept();
}
}

| virtual void TestSMIMEInviteHandler::onReferNoSub | ( | InviteSessionHandle | , |
| const SipMessage & | msg | ||
| ) | [inline, virtual] |
Implements resip::InviteSessionHandler.
Definition at line 211 of file testSMIMEInvite.cxx.
References resip::Message::brief(), and InfoLog.

| virtual void TestSMIMEInviteHandler::onSuccess | ( | ClientRegistrationHandle | , |
| const SipMessage & | response | ||
| ) | [inline, virtual] |
Called when registraion succeeds or each time it is sucessfully refreshed.
Reimplemented from resip::TestClientRegistrationHandler.
Definition at line 112 of file testSMIMEInvite.cxx.
References InfoLog.
{
InfoLog( << "ClientRegistrationHandler::onSuccess" );
handles.push_back(r);
registered++;
}
| virtual void TestSMIMEInviteHandler::onTerminated | ( | InviteSessionHandle | , |
| InviteSessionHandler::TerminatedReason | reason, | ||
| const SipMessage * | msg | ||
| ) | [inline, virtual] |
Reimplemented from resip::TestInviteSessionHandler.
Definition at line 152 of file testSMIMEInvite.cxx.
References InfoLog.
| void TestSMIMEInviteHandler::resetRegistered | ( | void | ) | [inline] |
Definition at line 62 of file testSMIMEInvite.cxx.
{
registered = 0;
}
bool TestSMIMEInviteHandler::callFailed [private] |
Definition at line 226 of file testSMIMEInvite.cxx.
int TestSMIMEInviteHandler::connected [private] |
Definition at line 225 of file testSMIMEInvite.cxx.
int TestSMIMEInviteHandler::done [private] |
Definition at line 223 of file testSMIMEInvite.cxx.
int TestSMIMEInviteHandler::dumShutDown [private] |
Definition at line 224 of file testSMIMEInvite.cxx.
| std::vector<ClientRegistrationHandle> TestSMIMEInviteHandler::handles |
Definition at line 217 of file testSMIMEInvite.cxx.
Referenced by main().
bool TestInviteSessionHandler::registered [private] |
Definition at line 222 of file testSMIMEInvite.cxx.
Security* TestSMIMEInviteHandler::security [private] |
Definition at line 221 of file testSMIMEInvite.cxx.
Definition at line 218 of file testSMIMEInvite.cxx.
Referenced by main().
1.7.5.1