Logo Search packages:      
Sourcecode: nateon version File versions  Download package

bool KNateon::sendMemo ( QString  sSender,
QString  sRef2,
QString  sMemo 
)

쪽지 보내기 성공한 명령문. const QCString m_msg02 = QCString("ring0320@nate.com A 250\r\nIMSG\r\ntitle:11\r\nfrom:ring0320@lycos.co.kr\r\nref:ring0320@nate.com\r\ndate:20070315170052\r\nsession_id:722352\r\nuuid:c21e686c-63c5-4cd3-986e-057cf1735cda\r\ncontenttype:text\r\nlength:4\r\nfont-name:Arial\r\nfont-style:%00\r\nfont-size:10\r\nfont-color:#050505\r\n\r\n11"); emit sendToDP(m_msg02);

Definition at line 1228 of file knateon.cpp.

References NateonConnection::sendCommand().

Referenced by createChat(), slotReplyMemo(), and slotSendMemo().

{
      QString sRecvs( sRef2 );
      sRecvs.replace(";", " ");
      QString sTitle;
      QString sTitle2;
      if (sMemo.find('\n') < 0)
            sTitle2 = sMemo;
      else
            sTitle2 = sMemo.left( sMemo.find('\n') );
  
      sTitle = "title:" + sTitle2 + "\r\n";
  
      QString sFrom;
      sFrom = "from:" + sSender + "\r\n";
  
      QString sRef;
      sRef = "ref:" + sRef2 + "\r\n";
  
      QString sDate;
      sDate = "date:" + QDateTime::currentDateTime().toString("yyyyMMddhhmmss") + "\r\n";
  
      QString sSession;
      sSession = "session_id:658810\r\n";
  
      QString sUuid;
      sUuid = "uuid:" + QUuid::createUuid().toString().replace(QRegExp("[{}]"),"") + "\r\n";
  
      QString sEnv;
      sEnv = "contenttype:text\r\n";
      sEnv += "length:";
  
      QString sBody;
      sBody = "\r\n";
      sBody += sMemo;
      // sBody += " ";
      sEnv += QString::number( sBody.length() );
      sEnv += "\r\n";
      sEnv += "font-name:Arial\r\n";
      sEnv += "font-style:%00\r\n";
      sEnv += "font-size:9\r\n";
      sEnv += "font-color:#0a0a0a\r\n";

      QString sIMSG;
      sIMSG = sRecvs;
      sIMSG += "\r\n";
      sIMSG +=  "IMSG\r\n";
      sIMSG += sTitle;
      sIMSG += sFrom;
      sIMSG += sRef;
      sIMSG += sDate;
      sIMSG += sSession;
      sIMSG += sUuid;
      sIMSG += sEnv;
      sIMSG += sBody;
      sIMSG += "\r\n";

      QString sCommand;
      sCommand = "N ";
      sCommand += QString::number( strlen( sIMSG.local8Bit() ) );
      sCommand += "\r\n";
      sCommand += sIMSG.local8Bit();

      m_pDPcon->sendCommand( "CMSG", UTF8( sCommand ) );
      
      return true;
}


Generated by  Doxygen 1.6.0   Back to index