本文整理汇总了C++中Appearance::dumpState方法的典型用法代码示例。如果您正苦于以下问题:C++ Appearance::dumpState方法的具体用法?C++ Appearance::dumpState怎么用?C++ Appearance::dumpState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appearance
的用法示例。
在下文中一共展示了Appearance::dumpState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dumpState
// Dump the object's internal state.
void AppearanceGroup::dumpState()
{
// indented 4
Os::Logger::instance().log(FAC_SAA, PRI_INFO,
"\t AppearanceGroup %p mSharedUser = '%s', mSubscriptionEarlyDialogHandle = '%s'",
this, mSharedUser.data(), mSubscriptionEarlyDialogHandle.data());
UtlHashMapIterator itor3(mAppearances);
UtlString* handle;
while ((handle = dynamic_cast <UtlString*> (itor3())))
{
Appearance* ss = dynamic_cast <Appearance*> (itor3.value());
ss->dumpState();
}
}
示例2: AppearanceTest
//.........这里部分代码省略.........
}
}
}
}
CPPUNIT_ASSERT( !dialogHandle.isNull() );
OsSysLog::add(FAC_RLS, PRI_DEBUG, "we now have an Appearance - test it");
AppearanceGroup* pAppGroup = pAppearanceAgentUnderTest->getAppearanceGroupSet().
findAppearanceGroup(sharedUri);
CPPUNIT_ASSERT( pAppGroup );
Appearance* pApp = pAppGroup->findAppearance(dialogHandle);
CPPUNIT_ASSERT( pApp );
ASSERT_STR_EQUAL( app1uri.data(), pApp->getUri()->data() );
// test adding a new dialog
const char* dialogEventString =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"0\" state=\"partial\" entity=\"sip:[email protected]:54140\">\n"
"<dialog id=\"1\" call-id=\"[email protected]\" local-tag=\"264460498\" remote-tag=\"1c10982\" direction=\"recipient\">\n"
"<state>confirmed</state>\n"
"<local>\n"
"<identity>[email protected]:5120</identity>\n"
"<target uri=\"sip:[email protected]:5120\">\n"
"<param pname=\"x-line-id\" pval=\"0\"/>\n"
"<param pname=\"+sip.rendering\" pval=\"yes\"/>\n"
"</target>\n"
"</local>\n"
"<remote>\n"
"<identity>[email protected]</identity>\n"
"</remote>\n"
"</dialog>\n"
"</dialog-info>\n"
;
SipDialogEvent dialogEvent(dialogEventString);
bool bFullContentChanged = false;
bool bPartialContentChanged = pApp->updateState(&dialogEvent, bFullContentChanged);
CPPUNIT_ASSERT(bPartialContentChanged);
CPPUNIT_ASSERT(bFullContentChanged);
pApp->dumpState();
CPPUNIT_ASSERT(pApp->appearanceIsBusy());
CPPUNIT_ASSERT(pApp->appearanceIdIsSeized("0"));
CPPUNIT_ASSERT(!pApp->appearanceIdIsSeized("1"));
// simulate user putting the call on hold
const char* dialogEventString2 =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"0\" state=\"partial\" entity=\"sip:[email protected]:54140\">\n"
"<dialog id=\"1\" call-id=\"[email protected]\" local-tag=\"264460498\" remote-tag=\"1c10982\" direction=\"recipient\">\n"
"<state>confirmed</state>\n"
"<local>\n"
"<identity>[email protected]:5120</identity>\n"
"<target uri=\"sip:[email protected]:5120\">\n"
"<param pname=\"x-line-id\" pval=\"0\"/>\n"
"<param pname=\"+sip.rendering\" pval=\"no\"/>\n"
"</target>\n"
"</local>\n"
"<remote>\n"
"<identity>[email protected]</identity>\n"
"</remote>\n"
"</dialog>\n"
"</dialog-info>\n"
;
SipDialogEvent dialogEvent2(dialogEventString2);
bPartialContentChanged = pApp->updateState(&dialogEvent2, bFullContentChanged);
CPPUNIT_ASSERT(bPartialContentChanged);
CPPUNIT_ASSERT(bFullContentChanged);
pApp->dumpState();
CPPUNIT_ASSERT(!pApp->appearanceIsBusy());
CPPUNIT_ASSERT(pApp->appearanceIdIsSeized("0"));
CPPUNIT_ASSERT(!pApp->appearanceIdIsSeized("1"));
// test MESSAGE debug handling
const char* message =
"MESSAGE sip:[email protected]:54140 SIP/2.0\r\n"
"From: <sip:[email protected]>;tag=17211757-9E4FBD78\r\n"
"To: <sip:[email protected]:54140>\r\n"
"CSeq: 1 MESSAGE\r\n"
"Call-ID: 51405734-b9be4835-dcd9d196\r\n"
"Contact: <sip:[email protected]>\r\n"
"Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER\r\n"
"Event: dialog\r\n"
"User-Agent: UnitTest\r\n"
"Accept-Language: en\r\n"
"Accept: application/dialog-info+xml\r\n"
"Max-Forwards: 70\r\n"
"Expires: 3600\r\n"
"Content-Length: 0\r\n"
"\r\n";
// send the MESSAGE
SipMessage messageRequest( message, strlen( message ) );
CPPUNIT_ASSERT( sendToAppearanceAgentUnderTest( messageRequest ) );
// receive the 200 OK response
SipMessage response;
CPPUNIT_ASSERT( getNextMessageFromAppearanceAgentUnderTest( response, 5 ) );
CPPUNIT_ASSERT( response.isResponse() );
CPPUNIT_ASSERT( response.getResponseStatusCode() == SIP_OK_CODE );
}