示例#1
0
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);
}
示例#2
0
// 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");
}
示例#3
0
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();
}
示例#4
0
文件: play.cpp 项目: 275288698/wds
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();
}
示例#5
0
文件: options.cpp 项目: 275288698/wds
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();
}