1.1 --- a/epoc32/include/miuthdr.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/miuthdr.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,878 @@
1.4 -miuthdr.inl
1.5 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +/** Sets the field type.
1.21 +@param aField Field type */
1.22 +inline void TImHeaderEncodingInfo::SetField(const TFieldList aField)
1.23 + {
1.24 + iField = aField;
1.25 + }
1.26 +
1.27 +/** Gets the field type.
1.28 +@return Field type */
1.29 +inline TImHeaderEncodingInfo::TFieldList TImHeaderEncodingInfo::Field() const
1.30 + {
1.31 + return iField;
1.32 + }
1.33 +
1.34 +/** Sets the field offset.
1.35 +@param aOffset Field offset */
1.36 +inline void TImHeaderEncodingInfo::SetOffset(const TInt aOffset)
1.37 + {
1.38 + iOffset = (TUint16)aOffset;
1.39 + }
1.40 +
1.41 +/** Gets the field offset.
1.42 +@return Field offset */
1.43 +inline TInt TImHeaderEncodingInfo::Offset() const
1.44 + {
1.45 + return iOffset;
1.46 + }
1.47 +
1.48 +/** Sets the field length.
1.49 +@param aLength Field length */
1.50 +inline void TImHeaderEncodingInfo::SetLength(const TInt aLength)
1.51 + {
1.52 + iLength = (TUint16)aLength;
1.53 + }
1.54 +
1.55 +/** Gets the field length.
1.56 +@return Field length */
1.57 +inline TInt TImHeaderEncodingInfo::Length() const
1.58 + {
1.59 + return iLength;
1.60 + }
1.61 +
1.62 +/** Sets the character set UID.
1.63 +@param aUid Character set UID */
1.64 +void TImHeaderEncodingInfo::SetCharsetUid(const TUint aUid)
1.65 + {
1.66 + iCharsetUid = aUid;
1.67 + }
1.68 +
1.69 +/** Gets the character set UID.
1.70 +@return Character set UID */
1.71 +TUint TImHeaderEncodingInfo::CharsetUid() const
1.72 + {
1.73 + return iCharsetUid;
1.74 + }
1.75 +
1.76 +/** Sets the encoding type (string).
1.77 +@param aChar Encoding type */
1.78 +inline void TImHeaderEncodingInfo::SetEncodingType(const TDesC8& aChar)
1.79 + {
1.80 + // If invalid, defaults to QPEncoding
1.81 + if (aChar[0] == 'b' || aChar[0] == 'B')
1.82 + iType = TImHeaderEncodingInfo::EBase64;
1.83 + else if (aChar[0] == 'q' || aChar[0] == 'Q')
1.84 + iType = TImHeaderEncodingInfo::EQP;
1.85 + else
1.86 + iType = TImHeaderEncodingInfo::ENoEncoding;
1.87 + }
1.88 +
1.89 +/** Sets the encoding type (enumeration).
1.90 +@param aType Encoding type */
1.91 +inline void TImHeaderEncodingInfo::SetEncodingType(const TEncodingType aType)
1.92 + {
1.93 + iType = aType;
1.94 + }
1.95 +
1.96 +/** Gets the encoding type (enumeration).
1.97 +@return Encoding type */
1.98 +inline TImHeaderEncodingInfo::TEncodingType TImHeaderEncodingInfo::EncodingType() const
1.99 + {
1.100 + return iType;
1.101 + }
1.102 +
1.103 +/** Sets the array value.
1.104 +@param aValue Array value */
1.105 +inline void TImHeaderEncodingInfo::SetArrayValue(const TInt aValue)
1.106 + {
1.107 + iArrayValue = (TUint16)aValue;
1.108 + }
1.109 +
1.110 +/** Gets the array value.
1.111 +@return Array value */
1.112 +inline TInt TImHeaderEncodingInfo::ArrayValue() const
1.113 + {
1.114 + return iArrayValue;
1.115 + }
1.116 +
1.117 +/** Sets if a space character needs adding between two adjoining encoded-words.
1.118 +@param atrueFalse True to add a space character */
1.119 +inline void TImHeaderEncodingInfo::SetAddSpace(const TBool atrueFalse)
1.120 + {
1.121 + iAddSpace = atrueFalse;
1.122 + }
1.123 +
1.124 +/** Tests if the add space character flag is set.
1.125 +@return True for added space characters */
1.126 +inline TBool TImHeaderEncodingInfo::AddSpace() const
1.127 + {
1.128 + return iAddSpace;
1.129 + }
1.130 +
1.131 +/** Sets the encoded length.
1.132 +@param aLength Encoded length */
1.133 +inline void TImHeaderEncodingInfo::SetEncodedLength(const TInt aLength)
1.134 + {
1.135 + iEncodedLength = (TInt8) aLength;
1.136 + }
1.137 +
1.138 +/** Gets the encoded length.
1.139 +@return Encoded length */
1.140 +inline TInt TImHeaderEncodingInfo::EncodedLength() const
1.141 + {
1.142 + return iEncodedLength + (AddSpace() ? 1 : 0);
1.143 + }
1.144 +
1.145 +//----------------------------------------------------------------------------------------
1.146 +
1.147 +/** Gets a list of "To" recipients.
1.148 +
1.149 +
1.150 +@return Recipient list */
1.151 +inline CDesCArray& CImHeader::ToRecipients ()
1.152 + {
1.153 + return *iTo;
1.154 + }
1.155 +
1.156 +/** Gets a list of "Cc" recipients.
1.157 +@return Recipient list */
1.158 +inline CDesCArray& CImHeader::CcRecipients ()
1.159 + {
1.160 + return *iCc;
1.161 + }
1.162 +
1.163 +/** Gets a list of "Bcc" recipients.
1.164 +@return Recipient list */
1.165 +inline CDesCArray& CImHeader::BccRecipients()
1.166 + {
1.167 + return *iBcc;
1.168 + }
1.169 +
1.170 +/** Gets a const list of "To" recipients.
1.171 +@return Recipient list */
1.172 +inline const CDesCArray& CImHeader::ToRecipients () const
1.173 + {
1.174 + return *iTo;
1.175 + }
1.176 +
1.177 +/** Gets a const list of "Cc" recipients.
1.178 +@return Recipient list */
1.179 +inline const CDesCArray& CImHeader::CcRecipients () const
1.180 + {
1.181 + return *iCc;
1.182 + }
1.183 +
1.184 +/** Gets a const list of "Bcc" recipients.
1.185 +@return Recipient list */
1.186 +inline const CDesCArray& CImHeader::BccRecipients() const
1.187 + {
1.188 + return *iBcc;
1.189 + }
1.190 +
1.191 +//-------------------------------------------------------------------------------------
1.192 +//---------------------------- Used for forwarding an email ---------------------------
1.193 +
1.194 +inline CDesCArray& CImHeader::ResentToRecipients ()
1.195 + {
1.196 + return *iResentTo;
1.197 + }
1.198 +
1.199 +inline CDesCArray& CImHeader::ResentCcRecipients ()
1.200 + {
1.201 + return *iResentCc;
1.202 + }
1.203 +
1.204 +inline CDesCArray& CImHeader::ResentBccRecipients()
1.205 + {
1.206 + return *iResentBcc;
1.207 + }
1.208 +
1.209 +inline const CDesCArray& CImHeader::ResentToRecipients () const
1.210 + {
1.211 + return *iResentTo;
1.212 + }
1.213 +
1.214 +inline const CDesCArray& CImHeader::ResentCcRecipients () const
1.215 + {
1.216 + return *iResentCc;
1.217 + }
1.218 +
1.219 +inline const CDesCArray& CImHeader::ResentBccRecipients() const
1.220 + {
1.221 + return *iResentBcc;
1.222 + }
1.223 +
1.224 +//-------------------------------------------------------------------------------------
1.225 +//-------------------------------------------------------------------------------------
1.226 +
1.227 +inline const TUint CImHeader::RemoteSize() const
1.228 + {
1.229 + return iRemoteSize;
1.230 + }
1.231 +
1.232 +inline void CImHeader::SetRemoteSize( TUint aRemoteSize )
1.233 + {
1.234 + iRemoteSize = aRemoteSize;
1.235 + }
1.236 +
1.237 +
1.238 +inline const TUint16 CImHeader::Version() const
1.239 + {
1.240 + return iVersion;
1.241 + }
1.242 +
1.243 +inline void CImHeader::SetVersion( TUint16 aVersion )
1.244 + {
1.245 + iVersion = aVersion;
1.246 + }
1.247 +
1.248 +/** Gets information relating to the encoding of header fields in received email.
1.249 +
1.250 +This includes the charset. This information can be used when forwarding the
1.251 +email, to re-encode the header fields.
1.252 +
1.253 +@return Encoding information */
1.254 +inline CArrayFix<TImHeaderEncodingInfo>& CImHeader::EncodingInfo()
1.255 + {
1.256 + return *iEncodingInfo;
1.257 + }
1.258 +
1.259 +/** Gets const information relating to the encoding of header fields in received
1.260 +email.
1.261 +
1.262 +This includes the charset. This information can be used when forwarding the
1.263 +email, to re-encode the header fields.
1.264 +
1.265 +@return Encoding information */
1.266 +inline const CArrayFix<TImHeaderEncodingInfo>& CImHeader::EncodingInfo() const
1.267 + {
1.268 + return *iEncodingInfo;
1.269 + }
1.270 +
1.271 +//////////////////////////////////////////////////////////////
1.272 +// //
1.273 +//////////////////////////////////////////////////////////////
1.274 +
1.275 +/** Tests whether encryption is used.
1.276 +
1.277 +Not currently used.
1.278 +
1.279 +@return True if encryption is used */
1.280 +inline TBool TMsvEmailEntry::Encrypted() const
1.281 + {
1.282 + if(iMtmData1&KMsvEmailEntryEncryptedFlag)
1.283 + {
1.284 + return ETrue;
1.285 + }
1.286 + else
1.287 + {
1.288 + return EFalse;
1.289 + }
1.290 + }
1.291 +
1.292 +/** Sets whether encryption is used.
1.293 +
1.294 +Not currently used.
1.295 +
1.296 +@param aFlag True if encryption is used */
1.297 +inline void TMsvEmailEntry::SetEncrypted(TBool aFlag)
1.298 + {
1.299 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryEncryptedFlag) | (aFlag?KMsvEmailEntryEncryptedFlag:KMsvEmailEntryClearFlag);
1.300 + }
1.301 +
1.302 +/** Tests whether signing is used.
1.303 +
1.304 +Not currently used.
1.305 +
1.306 +@return True if signing is used */
1.307 +inline TBool TMsvEmailEntry::Signed() const
1.308 + {
1.309 + if(iMtmData1&KMsvEmailEntrySignedFlag)
1.310 + {
1.311 + return ETrue;
1.312 + }
1.313 + else
1.314 + {
1.315 + return EFalse;
1.316 + }
1.317 + }
1.318 +
1.319 +/** Sets whether signing is used.
1.320 +
1.321 +Not currently used.
1.322 +
1.323 +@param aFlag True if signing is used */
1.324 +inline void TMsvEmailEntry::SetSigned(TBool aFlag)
1.325 + {
1.326 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntrySignedFlag) | (aFlag?KMsvEmailEntrySignedFlag:KMsvEmailEntryClearFlag);
1.327 + }
1.328 +
1.329 +///
1.330 +/** Returns the flag indicating if the message has an HTML body part.
1.331 +
1.332 +Note: the flag is for HTML and not only MHTML.
1.333 +
1.334 +Use CImEmailMessage to retrieve the HTML body part.
1.335 +
1.336 +@return True if the message has an HTML body part
1.337 +@see CImEmailMessage
1.338 +*/
1.339 +inline TBool TMsvEmailEntry::MHTMLEmail() const
1.340 + {
1.341 + if(iMtmData1&KMsvEmailEntryMHTMLFlag)
1.342 + {
1.343 + return ETrue;
1.344 + }
1.345 + else
1.346 + {
1.347 + return EFalse;
1.348 + }
1.349 + }
1.350 +
1.351 +/** Sets the flag indicating if the message has an HTML body part.
1.352 +
1.353 +Note: the flag is for HTML and not only MHTML.
1.354 +
1.355 +Use CImEmailMessage to retrieve the HTML body part.
1.356 +
1.357 +@param aFlag True if the message has an HTML body part
1.358 +@see CImEmailMessage
1.359 +*/
1.360 +inline void TMsvEmailEntry::SetMHTMLEmail(TBool aFlag)
1.361 + {
1.362 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryMHTMLFlag) | (aFlag?KMsvEmailEntryMHTMLFlag:KMsvEmailEntryClearFlag);
1.363 + }
1.364 +
1.365 +///
1.366 +/** Tests if body text is complete.
1.367 +@return True if body text is complete. */
1.368 +inline TBool TMsvEmailEntry::BodyTextComplete() const
1.369 + {
1.370 + if(iMtmData1 & KMsvEmailEntryBodyTextCompleteFlag)
1.371 + {
1.372 + return ETrue;
1.373 + }
1.374 + else
1.375 + {
1.376 + return EFalse;
1.377 + }
1.378 + }
1.379 +
1.380 +/** Sets if body text is complete.
1.381 +@param aFlag True if body text is complete. */
1.382 +inline void TMsvEmailEntry::SetBodyTextComplete(TBool aFlag)
1.383 + {
1.384 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryBodyTextCompleteFlag) | (aFlag?KMsvEmailEntryBodyTextCompleteFlag:KMsvEmailEntryClearFlag);
1.385 + }
1.386 +
1.387 +///
1.388 +/** Tests if the message contains a VCard attachment.
1.389 +@return True if the message contains a VCard attachment */
1.390 +inline TBool TMsvEmailEntry::VCard() const
1.391 + {
1.392 + if(iMtmData1&KMsvEmailEntryVCardFlag)
1.393 + {
1.394 + return ETrue;
1.395 + }
1.396 + else
1.397 + {
1.398 + return EFalse;
1.399 + }
1.400 + }
1.401 +
1.402 +/** Sets a flag that the message contains a VCard attachment.
1.403 +@param aFlag True if the message contains a VCard attachment */
1.404 +inline void TMsvEmailEntry::SetVCard(TBool aFlag)
1.405 + {
1.406 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryVCardFlag) | (aFlag?KMsvEmailEntryVCardFlag:KMsvEmailEntryClearFlag);
1.407 + }
1.408 +
1.409 +/** Tests if the message contains a VCal attachment.
1.410 +@return True if the message contains a VCal attachment */
1.411 +inline TBool TMsvEmailEntry::VCalendar() const
1.412 + {
1.413 + if(iMtmData1&KMsvEmailEntryVCalendarFlag)
1.414 + {
1.415 + return ETrue;
1.416 + }
1.417 + else
1.418 + {
1.419 + return EFalse;
1.420 + }
1.421 + }
1.422 +
1.423 +/** Sets a flag that the message contains a VCal attachment.
1.424 +@param aFlag True if the message contains a VCal attachment */
1.425 +inline void TMsvEmailEntry::SetVCalendar(TBool aFlag)
1.426 + {
1.427 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryVCalendarFlag) | (aFlag?KMsvEmailEntryVCalendarFlag:KMsvEmailEntryClearFlag);
1.428 + }
1.429 +
1.430 +/** Tests if the message contains an iCalendar attachment.
1.431 +
1.432 +@return True if the message contains an iCalendar attachment
1.433 +*/
1.434 +inline TBool TMsvEmailEntry::ICalendar() const
1.435 + {
1.436 + if(iMtmData1&KMsvEmailEntryICalendarFlag)
1.437 + {
1.438 + return ETrue;
1.439 + }
1.440 + else
1.441 + {
1.442 + return EFalse;
1.443 + }
1.444 + }
1.445 +
1.446 +/** Sets a flag that the message contains an iCalendar attachment.
1.447 +
1.448 +@param aFlag True if the message contains an iCalendar attachment
1.449 +*/
1.450 +inline void TMsvEmailEntry::SetICalendar(TBool aFlag)
1.451 + {
1.452 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryICalendarFlag) | (aFlag?KMsvEmailEntryICalendarFlag:KMsvEmailEntryClearFlag);
1.453 + }
1.454 +
1.455 +//
1.456 +/** Tests if the email message requests a receipt.
1.457 +@return True if the email message requests a receipt */
1.458 +inline TBool TMsvEmailEntry::Receipt() const
1.459 + {
1.460 + if(iMtmData1&KMsvEmailEntryReceiptFlag)
1.461 + {
1.462 + return ETrue;
1.463 + }
1.464 + else
1.465 + {
1.466 + return EFalse;
1.467 + }
1.468 + }
1.469 +
1.470 +/** Sets a flag that the email message requests a receipt.
1.471 +@param aFlag True if the email message requests a receipt */
1.472 +inline void TMsvEmailEntry::SetReceipt(TBool aFlag)
1.473 + {
1.474 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryReceiptFlag) | (aFlag?KMsvEmailEntryReceiptFlag:KMsvEmailEntryClearFlag);
1.475 + }
1.476 +
1.477 +
1.478 +/** Gets the state of the unread messages IMAP4 flag.
1.479 +
1.480 +This flag is set on a folder if the folder contains any
1.481 +messages with the IMAP \\Seen flag set.
1.482 +
1.483 +@return Unread messages IMAP4 flag
1.484 +@see TMsvEmailEntry::SeenIMAP4Flag()
1.485 +*/
1.486 +inline TBool TMsvEmailEntry::UnreadIMAP4Flag() const
1.487 + {
1.488 + if(iMtmData1&KMsvEmailEntryIMAP4UnreadFlag)
1.489 + {
1.490 + return ETrue;
1.491 + }
1.492 + else
1.493 + {
1.494 + return EFalse;
1.495 + }
1.496 + }
1.497 +
1.498 +/** Sets the state of the unread messages IMAP4 flag.
1.499 +@param aFlag Unread messages IMAP4 flag */
1.500 +inline void TMsvEmailEntry::SetUnreadIMAP4Flag(TBool aFlag)
1.501 + {
1.502 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4UnreadFlag) | (aFlag?KMsvEmailEntryIMAP4UnreadFlag:KMsvEmailEntryClearFlag);
1.503 + }
1.504 +
1.505 +/** Gets the state of the \\Seen IMAP4 flag.
1.506 +
1.507 +This indicates if the message has been read. It is described in RFC3501, 2.3.2.
1.508 +Flags Message Attribute.
1.509 +
1.510 +Note that the server MTM creates messages with the TMsvEntry::Unread() flag set. If
1.511 +on synchronisation a folder contains new messages, the Unread flag will also be
1.512 +set on the folder.
1.513 +
1.514 +@return \\Seen IMAP4 flag
1.515 +@see CImImap4Settings::UpdatingSeenFlags()
1.516 +*/
1.517 +inline TBool TMsvEmailEntry::SeenIMAP4Flag() const
1.518 + {
1.519 + if(iMtmData1&KMsvEmailEntryIMAP4SeenFlag)
1.520 + {
1.521 + return ETrue;
1.522 + }
1.523 + else
1.524 + {
1.525 + return EFalse;
1.526 + }
1.527 + }
1.528 +
1.529 +/** Sets the state of the \\Seen IMAP4 flag.
1.530 +@param aFlag \\Seen IMAP4 flag */
1.531 +inline void TMsvEmailEntry::SetSeenIMAP4Flag(TBool aFlag)
1.532 + {
1.533 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4SeenFlag) | (aFlag?KMsvEmailEntryIMAP4SeenFlag:KMsvEmailEntryClearFlag);
1.534 + }
1.535 +
1.536 +/** Gets the state of the \\Answered IMAP4 flag.
1.537 +
1.538 +This indicates if the message has been answered. It is described in
1.539 +RFC3501, 2.3.2. Flags Message Attribute.
1.540 +
1.541 +@return \\Answered IMAP4 flag */
1.542 +inline TBool TMsvEmailEntry::AnsweredIMAP4Flag() const
1.543 + {
1.544 + if(iMtmData1&KMsvEmailEntryIMAP4AnsweredFlag)
1.545 + {
1.546 + return ETrue;
1.547 + }
1.548 + else
1.549 + {
1.550 + return EFalse;
1.551 + }
1.552 + }
1.553 +
1.554 +/** Sets the state of the \\Answered IMAP4 flag.
1.555 +@param aFlag \\Answered IMAP4 flag */
1.556 +inline void TMsvEmailEntry::SetAnsweredIMAP4Flag(TBool aFlag)
1.557 + {
1.558 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4AnsweredFlag) | (aFlag?KMsvEmailEntryIMAP4AnsweredFlag:KMsvEmailEntryClearFlag);
1.559 + }
1.560 +
1.561 +
1.562 +/** Gets the state of the \\Flagged IMAP4 flag.
1.563 +
1.564 +This indicates if the message is flagged for urgent/special attention.
1.565 +It is described in RFC3501, 2.3.2. Flags Message Attribute.
1.566 +
1.567 +@return \\Flagged IMAP4 flag */
1.568 +inline TBool TMsvEmailEntry::FlaggedIMAP4Flag() const
1.569 + {
1.570 + if(iMtmData1&KMsvEmailEntryIMAP4FlaggedFlag)
1.571 + {
1.572 + return ETrue;
1.573 + }
1.574 + else
1.575 + {
1.576 + return EFalse;
1.577 + }
1.578 + }
1.579 +
1.580 +/** Sets the state of the \\Flagged IMAP4 flag.
1.581 +@param aFlag \\Flagged IMAP4 flag */
1.582 +inline void TMsvEmailEntry::SetFlaggedIMAP4Flag(TBool aFlag)
1.583 + {
1.584 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4FlaggedFlag) | (aFlag?KMsvEmailEntryIMAP4FlaggedFlag:KMsvEmailEntryClearFlag);
1.585 + }
1.586 +
1.587 +/** Gets the state of the \\Deleted IMAP4 flag.
1.588 +
1.589 +This indicates if the message is marked as deleted for removal later. It is described in
1.590 +RFC3501, 2.3.2. Flags Message Attribute.
1.591 +
1.592 +@return \\Deleted IMAP4 flag */
1.593 +inline TBool TMsvEmailEntry::DeletedIMAP4Flag() const
1.594 + {
1.595 + if(iMtmData1&KMsvEmailEntryIMAP4DeletedFlag)
1.596 + {
1.597 + return ETrue;
1.598 + }
1.599 + else
1.600 + {
1.601 + return EFalse;
1.602 + }
1.603 + }
1.604 +
1.605 +/** Sets the state of the \\Deleted IMAP4 flag.
1.606 +@param aFlag \\Deleted IMAP4 flag */
1.607 +inline void TMsvEmailEntry::SetDeletedIMAP4Flag(TBool aFlag)
1.608 + {
1.609 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4DeletedFlag) | (aFlag?KMsvEmailEntryIMAP4DeletedFlag:KMsvEmailEntryClearFlag);
1.610 + }
1.611 +
1.612 +/** Gets the state of the \\Draft IMAP4 flag.
1.613 +
1.614 +This indicates if the message has not completed composition. It is described in
1.615 +RFC3501, 2.3.2. Flags Message Attribute.
1.616 +
1.617 +@return \\Draft IMAP4 flag */
1.618 +inline TBool TMsvEmailEntry::DraftIMAP4Flag() const
1.619 + {
1.620 + if(iMtmData1&KMsvEmailEntryIMAP4DraftFlag)
1.621 + {
1.622 + return ETrue;
1.623 + }
1.624 + else
1.625 + {
1.626 + return EFalse;
1.627 + }
1.628 + }
1.629 +
1.630 +/** Sets the state of the \\Draft IMAP4 flag.
1.631 +@param aFlag \\Draft IMAP4 flag */
1.632 +inline void TMsvEmailEntry::SetDraftIMAP4Flag(TBool aFlag)
1.633 + {
1.634 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4DraftFlag) | (aFlag?KMsvEmailEntryIMAP4DraftFlag:KMsvEmailEntryClearFlag);
1.635 + }
1.636 +
1.637 +/** Gets the state of the \\Recent IMAP4 flag.
1.638 +
1.639 +This indicates if the message is "recently" arrived in this mailbox. This session
1.640 +is the first session to have been notified about this message. For more details, see
1.641 +see RFC3501, 2.3.2. Flags Message Attribute.
1.642 +
1.643 +@return \\Recent IMAP4 flag */
1.644 +inline TBool TMsvEmailEntry::RecentIMAP4Flag() const
1.645 + {
1.646 + if(iMtmData1&KMsvEmailEntryIMAP4RecentFlag)
1.647 + {
1.648 + return ETrue;
1.649 + }
1.650 + else
1.651 + {
1.652 + return EFalse;
1.653 + }
1.654 + }
1.655 +
1.656 +/** Sets the state of the \\Recent IMAP4 flag.
1.657 +@param aFlag \\Recent IMAP4 flag */
1.658 +inline void TMsvEmailEntry::SetRecentIMAP4Flag(TBool aFlag)
1.659 + {
1.660 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4RecentFlag) | (aFlag?KMsvEmailEntryIMAP4RecentFlag:KMsvEmailEntryClearFlag);
1.661 + }
1.662 +
1.663 +
1.664 +/** Tests if the specified folder is the IMAP4 Mailbox.
1.665 +@return True if the specified folder is the Mailbox */
1.666 +inline TBool TMsvEmailEntry::Mailbox() const
1.667 + {
1.668 + if(iMtmData1&KMsvEmailEntryIMAP4MailboxFlag)
1.669 + {
1.670 + return ETrue;
1.671 + }
1.672 + else
1.673 + {
1.674 + return EFalse;
1.675 + }
1.676 + }
1.677 +
1.678 +/** Sets if the specified folder is the IMAP4 Mailbox.
1.679 +@param aFlag True if the specified folder is the Mailbox */
1.680 +inline void TMsvEmailEntry::SetMailbox(TBool aFlag)
1.681 + {
1.682 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4MailboxFlag) | (aFlag?KMsvEmailEntryIMAP4MailboxFlag:KMsvEmailEntryClearFlag);
1.683 + }
1.684 +
1.685 +
1.686 +/** Gets the IMAP4 orphaned state for the specified message/folder.
1.687 +
1.688 +The concept of an orphan is no longer used, so this function should not be used.
1.689 +
1.690 +@return True if the specified entry is orphaned */
1.691 +inline TBool TMsvEmailEntry::Orphan() const
1.692 + {
1.693 + if(iMtmData1&KMsvEmailEntryOrphanFlag)
1.694 + {
1.695 + return ETrue;
1.696 + }
1.697 + else
1.698 + {
1.699 + return EFalse;
1.700 + }
1.701 + }
1.702 +
1.703 +/** Sets the IMAP4 orphaned state for the specified message/folder.
1.704 +
1.705 +The concept of an orphan is no longer used, so this function should not be used.
1.706 +
1.707 +@param aFlag True if the specified entry is orphaned */
1.708 +inline void TMsvEmailEntry::SetOrphan(TBool aFlag)
1.709 + {
1.710 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryOrphanFlag) | (aFlag?KMsvEmailEntryOrphanFlag:KMsvEmailEntryClearFlag);
1.711 + }
1.712 +
1.713 +
1.714 +/** Gets the IMAP4 UID (unique identifier) validity for the specified folder.
1.715 +@return True if IMAP4 UID validity is set */
1.716 +inline TBool TMsvEmailEntry::ValidUID() const
1.717 + {
1.718 + if(iMtmData1&KMsvEmailEntryIMAP4ValidUIDFlag)
1.719 + {
1.720 + return ETrue;
1.721 + }
1.722 + else
1.723 + {
1.724 + return EFalse;
1.725 + }
1.726 + }
1.727 +
1.728 +/** Sets the IMAP4 UID (unique identifier) validity for the specified folder.
1.729 +@param aFlag True if IMAP4 UID validity is set */
1.730 +inline void TMsvEmailEntry::SetValidUID(TBool aFlag)
1.731 + {
1.732 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4ValidUIDFlag) | (aFlag?KMsvEmailEntryIMAP4ValidUIDFlag:KMsvEmailEntryClearFlag);
1.733 + }
1.734 +
1.735 +
1.736 +/** Gets the IMAP4 subscription state for the specified folder.
1.737 +@return IMAP4 subscription state */
1.738 +inline TBool TMsvEmailEntry::Subscribed() const
1.739 + {
1.740 + if(iMtmData1&KMsvEmailEntryIMAP4SubscribedFlag)
1.741 + {
1.742 + return ETrue;
1.743 + }
1.744 + else
1.745 + {
1.746 + return EFalse;
1.747 + }
1.748 + }
1.749 +
1.750 +/** Sets the IMAP4 subscription state for the specified folder.
1.751 +@param aFlag IMAP4 subscription state */
1.752 +inline void TMsvEmailEntry::SetSubscribed(TBool aFlag)
1.753 + {
1.754 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4SubscribedFlag) | (aFlag?KMsvEmailEntryIMAP4SubscribedFlag:KMsvEmailEntryClearFlag);
1.755 + }
1.756 +
1.757 +
1.758 +/** Gets the IMAP4 local subscription state for the specified folder.
1.759 +
1.760 +@return IMAP4 local subscription state */
1.761 +inline TBool TMsvEmailEntry::LocalSubscription() const
1.762 + {
1.763 + if(iMtmData1&KMsvEmailEntryIMAP4LocalSubFlag)
1.764 + {
1.765 + return ETrue;
1.766 + }
1.767 + else
1.768 + {
1.769 + return EFalse;
1.770 + }
1.771 + }
1.772 +
1.773 +/** Sets the IMAP4 local subscription state for the specified folder.
1.774 +
1.775 +Depending on other settings, setting a folder to be locally subscribed can mean:
1.776 +
1.777 +- that the folder is synchronised as part of synchronisation operations
1.778 + (depending on the value of CImImap4Settings::Synchronise())
1.779 +- that the folder will be set as subscribed on the remote server
1.780 + (depending on the value of CImImap4Settings::SetSuscribe())
1.781 +
1.782 +Note that clients can use the #KIMAP4MTMLocalSubscribe command to set
1.783 +this flag and save the change to the entry.
1.784 +
1.785 +@param aFlag IMAP4 local subscription state */
1.786 +inline void TMsvEmailEntry::SetLocalSubscription(TBool aFlag)
1.787 + {
1.788 + iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4LocalSubFlag) | (aFlag?KMsvEmailEntryIMAP4LocalSubFlag:KMsvEmailEntryClearFlag);
1.789 + }
1.790 +
1.791 +
1.792 +/** Gets the IMAP4 UID (unique identifier) for the specified message/folder.
1.793 +@return IMAP4 UID */
1.794 +inline TUint32 TMsvEmailEntry::UID() const
1.795 + {
1.796 + return (TUint32)iMtmData2; // hide the casting away from the caller
1.797 + }
1.798 +
1.799 +/** Sets the IMAP4 UID (unique identifier) for the specified message/folder.
1.800 +@param aUID IMAP4 UID */
1.801 +inline void TMsvEmailEntry::SetUID(TUint32 aUID)
1.802 + {
1.803 + iMtmData2 = (TInt32) aUID; // hide the casting away from the user
1.804 + }
1.805 +
1.806 +/** Gets the number of messages stored in the remote folder.
1.807 +@return Number of messages */
1.808 +inline TInt TMsvEmailEntry::RemoteFolderEntries() const
1.809 + {
1.810 + return iMtmData3&KMsvRemoteFolderEntriesMask;
1.811 + }
1.812 +
1.813 +/** Sets the number of messages stored in the remote folder.
1.814 +@param aEntries Number of messages */
1.815 +inline void TMsvEmailEntry::SetRemoteFolderEntries(TInt aEntries)
1.816 + {
1.817 + iMtmData3 = (TInt32) ((iMtmData3 & ~KMsvRemoteFolderEntriesMask) | (aEntries & KMsvRemoteFolderEntriesMask));
1.818 + }
1.819 +
1.820 +//////////////////////////////////////////////////////////////
1.821 +// CImMimeHeader inlines //
1.822 +//////////////////////////////////////////////////////////////
1.823 +
1.824 +/** Gets the const Content-Type parameters and their associated values.
1.825 +@return Parameters and associated values */
1.826 +inline const CDesC8Array& CImMimeHeader::ContentTypeParams() const
1.827 + {
1.828 + return *iContentTypeParams;
1.829 + }
1.830 +
1.831 +
1.832 +/** Gets the const Content-Disposition parameters and their associated values.
1.833 +@return Parameters and associated values */
1.834 +inline const CDesC8Array& CImMimeHeader::ContentDispositionParams() const
1.835 + {
1.836 + return *iContentDispositionParams;
1.837 + }
1.838 +
1.839 +
1.840 +/** Gets the const MIME header parameters and their associated values.
1.841 +This can be used by any MIME header fields.
1.842 +@return Parameters and associated values */
1.843 +inline const CDesC8Array& CImMimeHeader::XTypeParams() const
1.844 + {
1.845 + return *iXTypeParams;
1.846 + }
1.847 +
1.848 +
1.849 +/** Gets the Content-Type parameters and their associated values.
1.850 +@return Parameters and associated values */
1.851 +inline CDesC8Array& CImMimeHeader::ContentTypeParams()
1.852 + {
1.853 + return *iContentTypeParams;
1.854 + }
1.855 +
1.856 +
1.857 +/** Gets the Content-Disposition parameters and their associated values.
1.858 +@return Parameters and associated values */
1.859 +inline CDesC8Array& CImMimeHeader::ContentDispositionParams()
1.860 + {
1.861 + return *iContentDispositionParams;
1.862 + }
1.863 +
1.864 +
1.865 +/** Gets the MIME header parameters and their associated values.
1.866 +This can be used by any MIME header fields.
1.867 +@return Parameters and associated values */
1.868 +inline CDesC8Array& CImMimeHeader::XTypeParams()
1.869 + {
1.870 + return *iXTypeParams;
1.871 + }
1.872 +
1.873 +
1.874 +inline const TUint16 CImMimeHeader::Version() const
1.875 + {
1.876 + return iVersion;
1.877 + }
1.878 +
1.879 +inline void CImMimeHeader::SetVersion( TUint16 aVersion )
1.880 + {
1.881 + iVersion = aVersion;
1.882 + }