TEST(message_test, request_swap) { network::uri tmp_uri; network::uri request_uri("http://www.google.com/"); network::uri other_uri("http://www.google.it/"); http::request request(request_uri); http::request other(other_uri); request.swap(other); request.get_uri(tmp_uri); ASSERT_EQ(tmp_uri, other_uri); other.get_uri(tmp_uri); ASSERT_EQ(tmp_uri, request_uri); }
// Dump the state of the Appearance Agent into the log. void AppearanceAgentTask::debugDumpState(const SipMessage& msg) { // Get the 'id' URI parameter off the request-URI. UtlString request_string; msg.getRequestUri(&request_string); Url request_uri(request_string, TRUE); UtlString id; request_uri.getUrlParameter("id", id); // 'id' is empty string if no 'id' URI parameter. OsSysLog::add(FAC_SAA, PRI_INFO, "AppearanceAgentTask::debugDumpState called, id = '%s':", id.data()); getAppearanceAgent()->dumpState(); OsSysLog::add(FAC_SAA, PRI_INFO, "AppearanceAgentTask::debugDumpState finished"); }
std::string GetParameter::ToString() const { std::string ret = MethodName::GET_PARAMETER + std::string(SPACE) + request_uri() + std::string(SPACE) + std::string(RTSP_END) + std::string(CRLF); return ret + Message::ToString(); }
std::string Play::ToString() const { std::string ret = MethodName::PLAY + std::string(SPACE) + request_uri() + std::string(SPACE) + std::string(RTSP_END) + std::string(CRLF); return ret + Message::ToString(); }
std::string Options::ToString() const { std::string ret = MethodName::OPTIONS + std::string(SPACE) + request_uri() + std::string(SPACE) + std::string(RTSP_END) + std::string(CRLF); return ret + Message::ToString(); }