Beispiel #1
0
bool
Opal::Sip::EndPoint::send_message (const std::string & _uri,
				   const std::string & _message)
{
  if (!_uri.empty () && (_uri.find ("sip:") == 0 || _uri.find (':') == string::npos) && !_message.empty ()) {
    OpalIM im;
    im.m_to = PURL (_uri);
    im.m_mimeType = "text/plain;charset=UTF-8";
    im.m_body = _message;
    Message (im);
    return true;
  }

  return false;
}
Beispiel #2
0
bool
Opal::Sip::EndPoint::send_message (const std::string & _uri,
				   const Ekiga::Message::payload_type payload)
{
  // FIXME: here we should check which kind of payload we have
  Ekiga::Message::payload_type::const_iterator iter = payload.find("text/plain");
  if (!_uri.empty () && (_uri.find ("sip:") == 0 || _uri.find (':') == string::npos) && iter != payload.end ()) {
    OpalIM im;
    im.m_to = PURL (_uri);
    im.m_mimeType = "text/plain;charset=UTF-8";
    im.m_body = iter->second;
    Message (im);
    return true;
  }

  return false;
}