void MsgBubbleItem::InitInfo(const nim::IMMessage &msg) { msg_ = msg; this->SetUTF8Name(msg.client_msg_id_); SetShowHeader(); //只显示最后一个回执 if (msg.status_ != nim::kNIMMsgLogStatusReceipt) SetMsgStatus(msg.status_); }
void CATSmsMessagingWrite::StartPduWrite() /** * Kicks off the writing of the actual pdu. Begins by converting the pdu * into ascii form, and writing the pdu length and message status to the phone. */ { iMsgDataAscii.Zero(); // Convert PDU from binary to ASCII CATSmsUtils::AppendDataToAscii(iMsgDataAscii,iSmsEntry->iMsgData); if(iMsgDataAscii.Length()==0) { LOGTEXT(_L8("CATSmsMessagingWrite:\tStartPduWrite - Failed to convert binary PDU to ASCII")); Complete(KErrCorrupt); return; } // Send PDU length to the phone const TInt pduLengthSemiOctets(iMsgDataAscii.Length()); const TInt pduLengthOctets(pduLengthSemiOctets/2+pduLengthSemiOctets%2); if (iNextAttempt==CPhoneGlobals::EPhoneTestNewStandard) { // Prepend a zero length SCA to PDU - this forces phone to use default SCA // See GSM 07.05 for details _LIT8(zeroLengthSca, "00"); iMsgDataAscii.Insert(0,zeroLengthSca); } iTxBuffer.Zero(); TInt stat=SetMsgStatus(); if (stat==KErrNotSupported) iTxBuffer.Format(KSmsWriteLengthCommand,pduLengthOctets); else iTxBuffer.Format(KSmsWriteCommand,pduLengthOctets,stat); iIo->Write(this,iTxBuffer); iIo->SetTimeOut(this,5000); iState=EATWaitForSendingPduLengthComplete; }