messagingapp/msgutils/convergedmessageutils/src/convergedmessageimpl.cpp
changeset 70 a15d9966050f
parent 31 ebfee66fde93
equal deleted inserted replaced
61:8ba0afbb4637 70:a15d9966050f
    36     mSubject(QString()), mBodyText(QString()), mTimeStamp(0), mProperty(0x0),
    36     mSubject(QString()), mBodyText(QString()), mTimeStamp(0), mProperty(0x0),
    37         mMessageSubType(ConvergedMessage::None),
    37         mMessageSubType(ConvergedMessage::None),
    38             mPriority(ConvergedMessage::Normal), mLocation(
    38             mPriority(ConvergedMessage::Normal), mLocation(
    39                     ConvergedMessage::Delete), mDirection(
    39                     ConvergedMessage::Delete), mDirection(
    40                     ConvergedMessage::Incoming), mSendingState(
    40                     ConvergedMessage::Incoming), mSendingState(
    41                     ConvergedMessage::Unknown)
    41                     ConvergedMessage::Unknown),
       
    42     mOriginatingSC(0)
    42     {
    43     {
    43     mMessageType = messageType;
    44     mMessageType = messageType;
    44     mId = new ConvergedMessageId();
    45     mId = new ConvergedMessageId();
    45     mFromAddress = new ConvergedMessageAddress();
    46     mFromAddress = new ConvergedMessageAddress();
    46     }
    47     }
    54             mMessageType(ConvergedMessage::None), 
    55             mMessageType(ConvergedMessage::None), 
    55             mMessageSubType(ConvergedMessage::None),
    56             mMessageSubType(ConvergedMessage::None),
    56             mPriority(ConvergedMessage::Normal), mLocation(
    57             mPriority(ConvergedMessage::Normal), mLocation(
    57                     ConvergedMessage::Delete), mDirection(
    58                     ConvergedMessage::Delete), mDirection(
    58                     ConvergedMessage::Incoming), mSendingState(
    59                     ConvergedMessage::Incoming), mSendingState(
    59                     ConvergedMessage::Unknown)
    60                     ConvergedMessage::Unknown),
       
    61     mOriginatingSC(0)
    60     {
    62     {
    61     mId = new ConvergedMessageId(id);
    63     mId = new ConvergedMessageId(id);
    62     mFromAddress = new ConvergedMessageAddress();
    64     mFromAddress = new ConvergedMessageAddress();
    63 
       
    64     }
    65     }
    65 
    66 
    66 //----------------------------------------------------------------
    67 //----------------------------------------------------------------
    67 // ConvergedMessageImpl::ConvergedMessageImpl
    68 // ConvergedMessageImpl::ConvergedMessageImpl
    68 // @see header
    69 // @see header
   119     mMessageSubType = msg.messageSubType();
   120     mMessageSubType = msg.messageSubType();
   120     mPriority = msg.priority();
   121     mPriority = msg.priority();
   121     mLocation = msg.location();
   122     mLocation = msg.location();
   122     mDirection = msg.direction();
   123     mDirection = msg.direction();
   123     mSendingState = msg.sendingState();
   124     mSendingState = msg.sendingState();
       
   125     mOriginatingSC = QString(msg.originatingSC());
   124     }
   126     }
   125 
   127 
   126 //----------------------------------------------------------------
   128 //----------------------------------------------------------------
   127 // ConvergedMessageImpl::~ConvergedMessageImpl
   129 // ConvergedMessageImpl::~ConvergedMessageImpl
   128 // @see header
   130 // @see header
   505 //----------------------------------------------------------------
   507 //----------------------------------------------------------------
   506 void ConvergedMessageImpl::addAttachments(
   508 void ConvergedMessageImpl::addAttachments(
   507         ConvergedMessageAttachmentList attachmentList)
   509         ConvergedMessageAttachmentList attachmentList)
   508     {
   510     {
   509     mAttachments.append(attachmentList);
   511     mAttachments.append(attachmentList);
   510 
       
   511     }
   512     }
   512 
   513 
   513 //----------------------------------------------------------------
   514 //----------------------------------------------------------------
   514 // ConvergedMessageImpl::serialize
   515 // ConvergedMessageImpl::serialize
   515 // @see header
   516 // @see header
   558     stream << mMessageSubType;
   559     stream << mMessageSubType;
   559     stream << mPriority;
   560     stream << mPriority;
   560     stream << mLocation;
   561     stream << mLocation;
   561     stream << mDirection;
   562     stream << mDirection;
   562     stream << mSendingState;
   563     stream << mSendingState;
       
   564     stream << mOriginatingSC;
   563     }
   565     }
   564 
   566 
   565 //----------------------------------------------------------------
   567 //----------------------------------------------------------------
   566 // ConvergedMessageImpl::deserialize
   568 // ConvergedMessageImpl::deserialize
   567 // @see header
   569 // @see header
   631     stream >> mMessageSubType;
   633     stream >> mMessageSubType;
   632     stream >> mPriority;
   634     stream >> mPriority;
   633     stream >> mLocation;
   635     stream >> mLocation;
   634     stream >> mDirection;
   636     stream >> mDirection;
   635     stream >> mSendingState;
   637     stream >> mSendingState;
       
   638     stream >> mOriginatingSC;
       
   639     }
       
   640 
       
   641 //----------------------------------------------------------------
       
   642 // ConvergedMessageImpl::setReplyPath
       
   643 // @see header
       
   644 //----------------------------------------------------------------
       
   645 void ConvergedMessageImpl::setReplyPath(bool replypath)
       
   646     {
       
   647     if( replypath )
       
   648         {
       
   649         // set replypath property
       
   650         mProperty |= ConvergedMessage::ReplyPath;
       
   651         }
       
   652     else
       
   653         {
       
   654         // reset replypath property
       
   655         mProperty &= ~ConvergedMessage::ReplyPath;
       
   656         }
       
   657     }
       
   658 
       
   659 //----------------------------------------------------------------
       
   660 // ConvergedMessageImpl::replyPath
       
   661 // @see header
       
   662 //----------------------------------------------------------------
       
   663 bool ConvergedMessageImpl::replyPath()
       
   664     {
       
   665     return mProperty & ConvergedMessage::ReplyPath;
       
   666     }
       
   667 
       
   668 //----------------------------------------------------------------
       
   669 // ConvergedMessageImpl::setOriginatingSC
       
   670 // @see header
       
   671 //----------------------------------------------------------------
       
   672 void ConvergedMessageImpl::setOriginatingSC(const QString& scaddress)
       
   673     {
       
   674     mOriginatingSC = scaddress;
       
   675     }
       
   676     
       
   677 //----------------------------------------------------------------
       
   678 // ConvergedMessageImpl::originatingSC
       
   679 // @see header
       
   680 //----------------------------------------------------------------
       
   681 const QString& ConvergedMessageImpl::originatingSC() const
       
   682     {
       
   683     return mOriginatingSC;
   636     }
   684     }
   637 
   685 
   638 // eof
   686 // eof
   639 
   687