epoc32/include/miuthdr.inl
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 miuthdr.inl
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // 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
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /** Sets the field type.
       
    17 @param aField Field type */
       
    18 inline void TImHeaderEncodingInfo::SetField(const TFieldList aField)
       
    19 	{
       
    20 	iField = aField;
       
    21 	}
       
    22 	
       
    23 /** Gets the field type.
       
    24 @return Field type */
       
    25 inline TImHeaderEncodingInfo::TFieldList TImHeaderEncodingInfo::Field() const
       
    26 	{
       
    27 	return iField;
       
    28 	}
       
    29 
       
    30 /** Sets the field offset.
       
    31 @param aOffset Field offset */
       
    32 inline void TImHeaderEncodingInfo::SetOffset(const TInt aOffset)
       
    33 	{
       
    34 	iOffset = (TUint16)aOffset;
       
    35 	}
       
    36 
       
    37 /** Gets the field offset.
       
    38 @return Field offset */
       
    39 inline TInt TImHeaderEncodingInfo::Offset() const
       
    40 	{
       
    41 	return iOffset;
       
    42 	}
       
    43 
       
    44 /** Sets the field length.
       
    45 @param aLength Field length */
       
    46 inline void TImHeaderEncodingInfo::SetLength(const TInt aLength)
       
    47 	{
       
    48 	iLength = (TUint16)aLength;
       
    49 	}
       
    50 
       
    51 /** Gets the field length.
       
    52 @return Field length */
       
    53 inline TInt TImHeaderEncodingInfo::Length()  const
       
    54 	{
       
    55 	return iLength;
       
    56 	}
       
    57 
       
    58 /** Sets the character set UID.
       
    59 @param aUid Character set UID */
       
    60 void TImHeaderEncodingInfo::SetCharsetUid(const TUint aUid)
       
    61 	{
       
    62 	iCharsetUid = aUid;
       
    63 	}
       
    64 
       
    65 /** Gets the character set UID.
       
    66 @return Character set UID */
       
    67 TUint TImHeaderEncodingInfo::CharsetUid() const
       
    68 	{
       
    69 	return iCharsetUid;
       
    70 	}
       
    71 
       
    72 /** Sets the encoding type (string).
       
    73 @param aChar Encoding type */
       
    74 inline void TImHeaderEncodingInfo::SetEncodingType(const TDesC8& aChar)
       
    75 	{
       
    76 	// If invalid, defaults to QPEncoding
       
    77 	if (aChar[0] == 'b' || aChar[0] == 'B')
       
    78 		iType = TImHeaderEncodingInfo::EBase64;
       
    79 	else if (aChar[0] == 'q' || aChar[0] == 'Q')
       
    80 		iType = TImHeaderEncodingInfo::EQP;
       
    81 	else
       
    82 		iType = TImHeaderEncodingInfo::ENoEncoding;
       
    83 	}
       
    84 
       
    85 /** Sets the encoding type (enumeration).
       
    86 @param aType Encoding type */
       
    87 inline void TImHeaderEncodingInfo::SetEncodingType(const TEncodingType aType)
       
    88 	{
       
    89 	iType = aType;
       
    90 	}
       
    91 
       
    92 /** Gets the encoding type (enumeration).
       
    93 @return Encoding type */
       
    94 inline TImHeaderEncodingInfo::TEncodingType TImHeaderEncodingInfo::EncodingType()  const
       
    95 	{
       
    96 	return iType;
       
    97 	}
       
    98 
       
    99 /** Sets the array value.
       
   100 @param aValue Array value */
       
   101 inline void TImHeaderEncodingInfo::SetArrayValue(const TInt aValue)
       
   102 	{
       
   103 	iArrayValue = (TUint16)aValue;
       
   104 	}
       
   105 
       
   106 /** Gets the array value.
       
   107 @return Array value */
       
   108 inline TInt TImHeaderEncodingInfo::ArrayValue()  const
       
   109 	{
       
   110 	return iArrayValue;
       
   111 	}
       
   112 
       
   113 /** Sets if a space character needs adding between two adjoining encoded-words.
       
   114 @param atrueFalse True to add a space character */
       
   115 inline void TImHeaderEncodingInfo::SetAddSpace(const TBool atrueFalse)
       
   116 	{
       
   117 	iAddSpace = atrueFalse;
       
   118 	}
       
   119 
       
   120 /** Tests if the add space character flag is set.
       
   121 @return True for added space characters */
       
   122 inline  TBool TImHeaderEncodingInfo::AddSpace() const
       
   123 	{
       
   124 	return iAddSpace;
       
   125 	}
       
   126 
       
   127 /** Sets the encoded length.
       
   128 @param aLength Encoded length */
       
   129 inline void TImHeaderEncodingInfo::SetEncodedLength(const TInt aLength)
       
   130 	{
       
   131 	iEncodedLength = (TInt8) aLength;
       
   132 	}
       
   133 
       
   134 /** Gets the encoded length.
       
   135 @return Encoded length */
       
   136 inline TInt TImHeaderEncodingInfo::EncodedLength() const
       
   137 	{
       
   138 	return iEncodedLength + (AddSpace() ? 1 : 0);
       
   139 	}
       
   140 
       
   141 //----------------------------------------------------------------------------------------
       
   142 
       
   143 /** Gets a list of "To" recipients.
       
   144 
       
   145 
       
   146 @return Recipient list */
       
   147 inline CDesCArray& CImHeader::ToRecipients ()
       
   148 	{
       
   149 	return *iTo;
       
   150 	}
       
   151 
       
   152 /** Gets a list of "Cc" recipients.
       
   153 @return Recipient list */
       
   154 inline CDesCArray& CImHeader::CcRecipients ()
       
   155 	{
       
   156 	return *iCc;
       
   157 	}
       
   158 	
       
   159 /** Gets a list of "Bcc" recipients.
       
   160 @return Recipient list */
       
   161 inline CDesCArray& CImHeader::BccRecipients()
       
   162 	{
       
   163 	return *iBcc;
       
   164 	}
       
   165 
       
   166 /** Gets a const list of "To" recipients.
       
   167 @return Recipient list */
       
   168 inline const CDesCArray& CImHeader::ToRecipients () const 
       
   169 	{
       
   170 	return *iTo;
       
   171 	}
       
   172 
       
   173 /** Gets a const list of "Cc" recipients.
       
   174 @return Recipient list */
       
   175 inline const CDesCArray& CImHeader::CcRecipients () const
       
   176 	{
       
   177 	return *iCc;
       
   178 	}
       
   179 	
       
   180 /** Gets a const list of "Bcc" recipients.
       
   181 @return Recipient list */
       
   182 inline const CDesCArray& CImHeader::BccRecipients() const
       
   183 	{
       
   184 	return *iBcc;
       
   185 	}
       
   186 
       
   187 //-------------------------------------------------------------------------------------
       
   188 //---------------------------- Used for forwarding an email ---------------------------
       
   189 
       
   190 inline CDesCArray& CImHeader::ResentToRecipients ()
       
   191 	{
       
   192 	return *iResentTo;
       
   193 	}
       
   194 
       
   195 inline CDesCArray& CImHeader::ResentCcRecipients ()
       
   196 	{
       
   197 	return *iResentCc;
       
   198 	}
       
   199 	
       
   200 inline CDesCArray& CImHeader::ResentBccRecipients()
       
   201 	{
       
   202 	return *iResentBcc;
       
   203 	}
       
   204 
       
   205 inline const CDesCArray& CImHeader::ResentToRecipients () const 
       
   206 	{
       
   207 	return *iResentTo;
       
   208 	}
       
   209 
       
   210 inline const CDesCArray& CImHeader::ResentCcRecipients () const
       
   211 	{
       
   212 	return *iResentCc;
       
   213 	}
       
   214 	
       
   215 inline const CDesCArray& CImHeader::ResentBccRecipients() const
       
   216 	{
       
   217 	return *iResentBcc;
       
   218 	}
       
   219 
       
   220 //-------------------------------------------------------------------------------------
       
   221 //-------------------------------------------------------------------------------------
       
   222 
       
   223 inline const TUint CImHeader::RemoteSize() const
       
   224 	{
       
   225 	return iRemoteSize;
       
   226 	}
       
   227 
       
   228 inline void CImHeader::SetRemoteSize( TUint aRemoteSize )
       
   229 	{
       
   230 	iRemoteSize = aRemoteSize;
       
   231 	}
       
   232 
       
   233 
       
   234 inline const TUint16 CImHeader::Version() const
       
   235 	{
       
   236 	return iVersion;
       
   237 	}
       
   238 
       
   239 inline void CImHeader::SetVersion( TUint16 aVersion )
       
   240 	{
       
   241 	iVersion = aVersion;
       
   242 	}
       
   243 
       
   244 /** Gets information relating to the encoding of header fields in received email. 
       
   245 
       
   246 This includes the charset. This information can be used when forwarding the 
       
   247 email, to re-encode the header fields.
       
   248 
       
   249 @return Encoding information */
       
   250 inline CArrayFix<TImHeaderEncodingInfo>& CImHeader::EncodingInfo()
       
   251 	{
       
   252 	return *iEncodingInfo;
       
   253 	}
       
   254 
       
   255 /** Gets const information relating to the encoding of header fields in received 
       
   256 email. 
       
   257 
       
   258 This includes the charset. This information can be used when forwarding the 
       
   259 email, to re-encode the header fields.
       
   260 
       
   261 @return Encoding information */
       
   262 inline const CArrayFix<TImHeaderEncodingInfo>& CImHeader::EncodingInfo() const
       
   263 	{
       
   264 	return *iEncodingInfo;
       
   265 	}
       
   266 
       
   267 //////////////////////////////////////////////////////////////
       
   268 //															//
       
   269 //////////////////////////////////////////////////////////////
       
   270 
       
   271 /** Tests whether encryption is used.
       
   272 
       
   273 Not currently used.
       
   274 
       
   275 @return True if encryption is used */
       
   276 inline TBool TMsvEmailEntry::Encrypted() const
       
   277 	{
       
   278     if(iMtmData1&KMsvEmailEntryEncryptedFlag)
       
   279 		{
       
   280 		return ETrue;
       
   281 		}
       
   282 	else
       
   283 		{
       
   284 		return EFalse;
       
   285 		}
       
   286 	}
       
   287 
       
   288 /** Sets whether encryption is used.
       
   289 
       
   290 Not currently used.
       
   291 
       
   292 @param aFlag True if encryption is used */
       
   293 inline void TMsvEmailEntry::SetEncrypted(TBool aFlag)
       
   294 	{
       
   295 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryEncryptedFlag) | (aFlag?KMsvEmailEntryEncryptedFlag:KMsvEmailEntryClearFlag);
       
   296 	}
       
   297 
       
   298 /** Tests whether signing is used.
       
   299 
       
   300 Not currently used.
       
   301 
       
   302 @return True if signing is used */
       
   303 inline TBool TMsvEmailEntry::Signed() const
       
   304 	{
       
   305 	if(iMtmData1&KMsvEmailEntrySignedFlag)
       
   306 		{
       
   307 		return ETrue;
       
   308 		}
       
   309 	else
       
   310 		{
       
   311 		return EFalse;
       
   312 		}
       
   313 	}
       
   314 
       
   315 /** Sets whether signing is used.
       
   316 
       
   317 Not currently used.
       
   318 
       
   319 @param aFlag True if signing is used */
       
   320 inline void TMsvEmailEntry::SetSigned(TBool aFlag)
       
   321 	{
       
   322 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntrySignedFlag) | (aFlag?KMsvEmailEntrySignedFlag:KMsvEmailEntryClearFlag);
       
   323 	}
       
   324 
       
   325 ///
       
   326 /** Returns the flag indicating if the message has an HTML body part.
       
   327 
       
   328 Note: the flag is for HTML and not only MHTML.
       
   329 
       
   330 Use CImEmailMessage to retrieve the HTML body part.
       
   331 
       
   332 @return True if the message has an HTML body part
       
   333 @see CImEmailMessage
       
   334 */
       
   335 inline TBool TMsvEmailEntry::MHTMLEmail() const
       
   336 	{
       
   337 	if(iMtmData1&KMsvEmailEntryMHTMLFlag)
       
   338 		{
       
   339 		return ETrue;
       
   340 		}
       
   341 	else
       
   342 		{
       
   343 		return EFalse;
       
   344 		}
       
   345 	}
       
   346 
       
   347 /** Sets the flag indicating if the message has an HTML body part.
       
   348 
       
   349 Note: the flag is for HTML and not only MHTML.
       
   350 
       
   351 Use CImEmailMessage to retrieve the HTML body part.
       
   352 
       
   353 @param aFlag True if the message has an HTML body part
       
   354 @see CImEmailMessage
       
   355 */
       
   356 inline void TMsvEmailEntry::SetMHTMLEmail(TBool aFlag)
       
   357 	{
       
   358 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryMHTMLFlag) | (aFlag?KMsvEmailEntryMHTMLFlag:KMsvEmailEntryClearFlag);
       
   359 	}
       
   360 
       
   361 ///
       
   362 /** Tests if body text is complete.
       
   363 @return True if body text is complete. */
       
   364 inline TBool TMsvEmailEntry::BodyTextComplete() const
       
   365 	{
       
   366 	if(iMtmData1 & KMsvEmailEntryBodyTextCompleteFlag)
       
   367 		{
       
   368 		return ETrue;
       
   369 		}
       
   370 	else
       
   371 		{
       
   372 		return EFalse;
       
   373 		}	
       
   374 	}
       
   375 
       
   376 /** Sets if body text is complete.
       
   377 @param aFlag True if body text is complete. */
       
   378 inline void TMsvEmailEntry::SetBodyTextComplete(TBool aFlag)
       
   379 	{
       
   380 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryBodyTextCompleteFlag) | (aFlag?KMsvEmailEntryBodyTextCompleteFlag:KMsvEmailEntryClearFlag);
       
   381 	}
       
   382 
       
   383 ///
       
   384 /** Tests if the message contains a VCard attachment.
       
   385 @return True if the message contains a VCard attachment */
       
   386 inline TBool TMsvEmailEntry::VCard() const
       
   387 	{
       
   388 	if(iMtmData1&KMsvEmailEntryVCardFlag)
       
   389 		{
       
   390 		return ETrue;
       
   391 		}
       
   392 	else
       
   393 		{
       
   394 		return EFalse;
       
   395 		}	
       
   396 	}
       
   397 
       
   398 /** Sets a flag that the message contains a VCard attachment.
       
   399 @param aFlag True if the message contains a VCard attachment */
       
   400 inline void TMsvEmailEntry::SetVCard(TBool aFlag)
       
   401 	{
       
   402 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryVCardFlag) | (aFlag?KMsvEmailEntryVCardFlag:KMsvEmailEntryClearFlag);
       
   403 	}
       
   404 
       
   405 /** Tests if the message contains a VCal attachment.
       
   406 @return True if the message contains a VCal attachment */
       
   407 inline TBool TMsvEmailEntry::VCalendar() const
       
   408 	{
       
   409 	if(iMtmData1&KMsvEmailEntryVCalendarFlag)
       
   410 		{
       
   411 		return ETrue;
       
   412 		}
       
   413 	else
       
   414 		{
       
   415 		return EFalse;
       
   416 		}
       
   417 	}
       
   418 
       
   419 /** Sets a flag that the message contains a VCal attachment.
       
   420 @param aFlag True if the message contains a VCal attachment */
       
   421 inline void TMsvEmailEntry::SetVCalendar(TBool aFlag)
       
   422 	{
       
   423 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryVCalendarFlag) | (aFlag?KMsvEmailEntryVCalendarFlag:KMsvEmailEntryClearFlag);
       
   424 	}
       
   425 
       
   426 /** Tests if the message contains an iCalendar attachment.
       
   427 
       
   428 @return True if the message contains an iCalendar attachment 
       
   429 */
       
   430 inline TBool TMsvEmailEntry::ICalendar() const
       
   431 	{
       
   432 	if(iMtmData1&KMsvEmailEntryICalendarFlag)
       
   433 		{
       
   434 		return ETrue;
       
   435 		}
       
   436 	else
       
   437 		{
       
   438 		return EFalse;
       
   439 		}	
       
   440 	}
       
   441 
       
   442 /** Sets a flag that the message contains an iCalendar attachment.
       
   443 
       
   444 @param aFlag True if the message contains an iCalendar attachment 
       
   445 */
       
   446 inline void TMsvEmailEntry::SetICalendar(TBool aFlag)
       
   447 	{
       
   448 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryICalendarFlag) | (aFlag?KMsvEmailEntryICalendarFlag:KMsvEmailEntryClearFlag);
       
   449 	}	
       
   450 
       
   451 //
       
   452 /** Tests if the email message requests a receipt.
       
   453 @return True if the email message requests a receipt */
       
   454 inline TBool TMsvEmailEntry::Receipt() const
       
   455 	{
       
   456 	if(iMtmData1&KMsvEmailEntryReceiptFlag)
       
   457 		{
       
   458 		return ETrue;
       
   459 		}
       
   460 	else
       
   461 		{
       
   462 		return EFalse;
       
   463 		}	
       
   464 	}
       
   465 
       
   466 /** Sets a flag that the email message requests a receipt.
       
   467 @param aFlag True if the email message requests a receipt */
       
   468 inline void TMsvEmailEntry::SetReceipt(TBool aFlag)
       
   469 	{
       
   470 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryReceiptFlag) | (aFlag?KMsvEmailEntryReceiptFlag:KMsvEmailEntryClearFlag);
       
   471 	}
       
   472 
       
   473 
       
   474 /** Gets the state of the unread messages IMAP4 flag.
       
   475 
       
   476 This flag is set on a folder if the folder contains any
       
   477 messages with the IMAP \\Seen flag set.
       
   478 
       
   479 @return Unread messages IMAP4 flag 
       
   480 @see TMsvEmailEntry::SeenIMAP4Flag()
       
   481 */
       
   482 inline TBool TMsvEmailEntry::UnreadIMAP4Flag() const
       
   483 	{
       
   484 	if(iMtmData1&KMsvEmailEntryIMAP4UnreadFlag)
       
   485 		{
       
   486 		return ETrue;
       
   487 		}
       
   488 	else
       
   489 		{
       
   490 		return EFalse;
       
   491 		}	
       
   492 	}
       
   493 
       
   494 /** Sets the state of the unread messages IMAP4 flag.
       
   495 @param aFlag Unread messages IMAP4 flag */
       
   496 inline void TMsvEmailEntry::SetUnreadIMAP4Flag(TBool aFlag)
       
   497 	{
       
   498 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4UnreadFlag) | (aFlag?KMsvEmailEntryIMAP4UnreadFlag:KMsvEmailEntryClearFlag);
       
   499 	}
       
   500 
       
   501 /** Gets the state of the \\Seen IMAP4 flag.
       
   502 
       
   503 This indicates if the message has been read. It is described in RFC3501, 2.3.2.
       
   504 Flags Message Attribute.
       
   505 
       
   506 Note that the server MTM creates messages with the TMsvEntry::Unread() flag set. If
       
   507 on synchronisation a folder contains new messages, the Unread flag will also be
       
   508 set on the folder.
       
   509 
       
   510 @return \\Seen IMAP4 flag 
       
   511 @see CImImap4Settings::UpdatingSeenFlags()
       
   512 */
       
   513 inline TBool TMsvEmailEntry::SeenIMAP4Flag() const
       
   514 	{
       
   515 	if(iMtmData1&KMsvEmailEntryIMAP4SeenFlag)
       
   516 		{
       
   517 		return ETrue;
       
   518 		}
       
   519 	else
       
   520 		{
       
   521 		return EFalse;
       
   522 		}	
       
   523 	}
       
   524 
       
   525 /** Sets the state of the \\Seen IMAP4 flag.
       
   526 @param aFlag \\Seen IMAP4 flag */
       
   527 inline void TMsvEmailEntry::SetSeenIMAP4Flag(TBool aFlag)
       
   528 	{
       
   529 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4SeenFlag) | (aFlag?KMsvEmailEntryIMAP4SeenFlag:KMsvEmailEntryClearFlag);
       
   530 	}
       
   531 
       
   532 /** Gets the state of the \\Answered IMAP4 flag.
       
   533 
       
   534 This indicates if the message has been answered. It is described in 
       
   535 RFC3501, 2.3.2. Flags Message Attribute.
       
   536 
       
   537 @return \\Answered IMAP4 flag */
       
   538 inline TBool TMsvEmailEntry::AnsweredIMAP4Flag() const
       
   539 	{
       
   540 	if(iMtmData1&KMsvEmailEntryIMAP4AnsweredFlag)
       
   541 		{
       
   542 		return ETrue;
       
   543 		}
       
   544 	else
       
   545 		{
       
   546 		return EFalse;
       
   547 		}	
       
   548 	}
       
   549 
       
   550 /** Sets the state of the \\Answered IMAP4 flag.
       
   551 @param aFlag \\Answered IMAP4 flag */
       
   552 inline void TMsvEmailEntry::SetAnsweredIMAP4Flag(TBool aFlag)
       
   553 	{
       
   554 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4AnsweredFlag) | (aFlag?KMsvEmailEntryIMAP4AnsweredFlag:KMsvEmailEntryClearFlag);
       
   555 	}
       
   556 
       
   557 
       
   558 /** Gets the state of the \\Flagged IMAP4 flag.
       
   559 
       
   560 This indicates if the message is flagged for urgent/special attention. 
       
   561 It is described in RFC3501, 2.3.2. Flags Message Attribute.
       
   562 
       
   563 @return \\Flagged IMAP4 flag */
       
   564 inline TBool TMsvEmailEntry::FlaggedIMAP4Flag() const
       
   565 	{
       
   566 	if(iMtmData1&KMsvEmailEntryIMAP4FlaggedFlag)
       
   567 		{
       
   568 		return ETrue;
       
   569 		}
       
   570 	else
       
   571 		{
       
   572 		return EFalse;
       
   573 		}	
       
   574 	}
       
   575 
       
   576 /** Sets the state of the \\Flagged IMAP4 flag.
       
   577 @param aFlag \\Flagged IMAP4 flag */
       
   578 inline void TMsvEmailEntry::SetFlaggedIMAP4Flag(TBool aFlag)
       
   579 	{
       
   580 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4FlaggedFlag) | (aFlag?KMsvEmailEntryIMAP4FlaggedFlag:KMsvEmailEntryClearFlag);
       
   581 	}
       
   582 
       
   583 /** Gets the state of the \\Deleted IMAP4 flag.
       
   584 
       
   585 This indicates if the message is marked as deleted for removal later. It is described in 
       
   586 RFC3501, 2.3.2. Flags Message Attribute.
       
   587 
       
   588 @return \\Deleted IMAP4 flag */
       
   589 inline TBool TMsvEmailEntry::DeletedIMAP4Flag() const
       
   590 	{
       
   591 	if(iMtmData1&KMsvEmailEntryIMAP4DeletedFlag)
       
   592 		{
       
   593 		return ETrue;
       
   594 		}
       
   595 	else
       
   596 		{
       
   597 		return EFalse;
       
   598 		}	
       
   599 	}
       
   600 
       
   601 /** Sets the state of the \\Deleted IMAP4 flag.
       
   602 @param aFlag \\Deleted IMAP4 flag */
       
   603 inline void TMsvEmailEntry::SetDeletedIMAP4Flag(TBool aFlag)
       
   604 	{
       
   605 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4DeletedFlag) | (aFlag?KMsvEmailEntryIMAP4DeletedFlag:KMsvEmailEntryClearFlag);
       
   606 	}
       
   607 
       
   608 /** Gets the state of the \\Draft IMAP4 flag.
       
   609 
       
   610 This indicates if the message has not completed composition. It is described in 
       
   611 RFC3501, 2.3.2. Flags Message Attribute.
       
   612 
       
   613 @return \\Draft IMAP4 flag */
       
   614 inline TBool TMsvEmailEntry::DraftIMAP4Flag() const
       
   615 	{
       
   616 	if(iMtmData1&KMsvEmailEntryIMAP4DraftFlag)
       
   617 		{
       
   618 		return ETrue;
       
   619 		}
       
   620 	else
       
   621 		{
       
   622 		return EFalse;
       
   623 		}	
       
   624 	}
       
   625 
       
   626 /** Sets the state of the \\Draft IMAP4 flag.
       
   627 @param aFlag \\Draft IMAP4 flag */
       
   628 inline void TMsvEmailEntry::SetDraftIMAP4Flag(TBool aFlag)
       
   629 	{
       
   630 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4DraftFlag) | (aFlag?KMsvEmailEntryIMAP4DraftFlag:KMsvEmailEntryClearFlag);
       
   631 	}
       
   632 
       
   633 /** Gets the state of the \\Recent IMAP4 flag.
       
   634 
       
   635 This indicates if the message is "recently" arrived in this mailbox.  This session
       
   636 is the first session to have been notified about this message. For more details, see
       
   637 see RFC3501, 2.3.2. Flags Message Attribute.
       
   638 
       
   639 @return \\Recent IMAP4 flag */
       
   640 inline TBool TMsvEmailEntry::RecentIMAP4Flag() const
       
   641 	{
       
   642 	if(iMtmData1&KMsvEmailEntryIMAP4RecentFlag)
       
   643 		{
       
   644 		return ETrue;
       
   645 		}
       
   646 	else
       
   647 		{
       
   648 		return EFalse;
       
   649 		}	
       
   650 	}
       
   651 
       
   652 /** Sets the state of the \\Recent IMAP4 flag.
       
   653 @param aFlag \\Recent IMAP4 flag */
       
   654 inline void TMsvEmailEntry::SetRecentIMAP4Flag(TBool aFlag)
       
   655 	{
       
   656 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4RecentFlag) | (aFlag?KMsvEmailEntryIMAP4RecentFlag:KMsvEmailEntryClearFlag);
       
   657 	}
       
   658 
       
   659 
       
   660 /** Tests if the specified folder is the IMAP4 Mailbox.
       
   661 @return True if the specified folder is the Mailbox */
       
   662 inline TBool TMsvEmailEntry::Mailbox() const
       
   663 	{
       
   664 	if(iMtmData1&KMsvEmailEntryIMAP4MailboxFlag)
       
   665 		{
       
   666 		return ETrue;
       
   667 		}
       
   668 	else
       
   669 		{
       
   670 		return EFalse;
       
   671 		}	
       
   672 	}
       
   673 
       
   674 /** Sets if the specified folder is the IMAP4 Mailbox.
       
   675 @param aFlag True if the specified folder is the Mailbox */
       
   676 inline void TMsvEmailEntry::SetMailbox(TBool aFlag)
       
   677 	{
       
   678 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4MailboxFlag) | (aFlag?KMsvEmailEntryIMAP4MailboxFlag:KMsvEmailEntryClearFlag);
       
   679 	}
       
   680 
       
   681 
       
   682 /** Gets the IMAP4 orphaned state for the specified message/folder.
       
   683 
       
   684 The concept of an orphan is no longer used, so this function should not be used.
       
   685 
       
   686 @return True if the specified entry is orphaned */
       
   687 inline TBool TMsvEmailEntry::Orphan() const
       
   688 	{
       
   689 	if(iMtmData1&KMsvEmailEntryOrphanFlag)
       
   690 		{
       
   691 		return ETrue;
       
   692 		}
       
   693 	else
       
   694 		{
       
   695 		return EFalse;
       
   696 		}	
       
   697 	}
       
   698 
       
   699 /** Sets the IMAP4 orphaned state for the specified message/folder.
       
   700 
       
   701 The concept of an orphan is no longer used, so this function should not be used.
       
   702 
       
   703 @param aFlag True if the specified entry is orphaned */
       
   704 inline void TMsvEmailEntry::SetOrphan(TBool aFlag)
       
   705 	{
       
   706 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryOrphanFlag) | (aFlag?KMsvEmailEntryOrphanFlag:KMsvEmailEntryClearFlag);
       
   707 	}
       
   708 
       
   709 
       
   710 /** Gets the IMAP4 UID (unique identifier) validity for the specified folder.
       
   711 @return True if IMAP4 UID validity is set */
       
   712 inline TBool TMsvEmailEntry::ValidUID() const
       
   713 	{
       
   714 	if(iMtmData1&KMsvEmailEntryIMAP4ValidUIDFlag)
       
   715 		{
       
   716 		return ETrue;
       
   717 		}
       
   718 	else
       
   719 		{
       
   720 		return EFalse;
       
   721 		}	
       
   722 	}
       
   723 
       
   724 /** Sets the IMAP4 UID (unique identifier) validity for the specified folder.
       
   725 @param aFlag True if IMAP4 UID validity is set */
       
   726 inline void TMsvEmailEntry::SetValidUID(TBool aFlag)
       
   727 	{
       
   728 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4ValidUIDFlag) | (aFlag?KMsvEmailEntryIMAP4ValidUIDFlag:KMsvEmailEntryClearFlag);
       
   729 	}
       
   730 
       
   731 
       
   732 /** Gets the IMAP4 subscription state for the specified folder.
       
   733 @return IMAP4 subscription state */
       
   734 inline TBool TMsvEmailEntry::Subscribed() const
       
   735 	{
       
   736 	if(iMtmData1&KMsvEmailEntryIMAP4SubscribedFlag)
       
   737 		{
       
   738 		return ETrue;
       
   739 		}
       
   740 	else
       
   741 		{
       
   742 		return EFalse;
       
   743 		}	
       
   744 	}
       
   745 
       
   746 /** Sets the IMAP4 subscription state for the specified folder.
       
   747 @param aFlag IMAP4 subscription state */
       
   748 inline void TMsvEmailEntry::SetSubscribed(TBool aFlag)
       
   749 	{
       
   750 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4SubscribedFlag) | (aFlag?KMsvEmailEntryIMAP4SubscribedFlag:KMsvEmailEntryClearFlag);
       
   751 	}
       
   752 
       
   753 
       
   754 /** Gets the IMAP4 local subscription state for the specified folder.
       
   755 
       
   756 @return IMAP4 local subscription state */
       
   757 inline TBool TMsvEmailEntry::LocalSubscription() const
       
   758 	{
       
   759 	if(iMtmData1&KMsvEmailEntryIMAP4LocalSubFlag)
       
   760 		{	
       
   761 		return ETrue;
       
   762 		}
       
   763 	else
       
   764 		{
       
   765 		return EFalse;
       
   766 		}	
       
   767 	}
       
   768 
       
   769 /** Sets the IMAP4 local subscription state for the specified folder.
       
   770 
       
   771 Depending on other settings, setting a folder to be locally subscribed can mean:
       
   772 
       
   773 - that the folder is synchronised as part of synchronisation operations 
       
   774   (depending on the value of CImImap4Settings::Synchronise())
       
   775 - that the folder will be set as subscribed on the remote server 
       
   776   (depending on the value of CImImap4Settings::SetSuscribe())
       
   777 
       
   778 Note that clients can use the #KIMAP4MTMLocalSubscribe command to set
       
   779 this flag and save the change to the entry.
       
   780 
       
   781 @param aFlag IMAP4 local subscription state */
       
   782 inline void TMsvEmailEntry::SetLocalSubscription(TBool aFlag)
       
   783 	{
       
   784 	iMtmData1 = (iMtmData1 & ~KMsvEmailEntryIMAP4LocalSubFlag) | (aFlag?KMsvEmailEntryIMAP4LocalSubFlag:KMsvEmailEntryClearFlag);
       
   785 	}
       
   786 
       
   787 
       
   788 /** Gets the IMAP4 UID (unique identifier) for the specified message/folder.
       
   789 @return IMAP4 UID */
       
   790 inline TUint32 TMsvEmailEntry::UID() const
       
   791 	{
       
   792 	return (TUint32)iMtmData2;	// hide the casting away from the caller
       
   793 	}
       
   794 
       
   795 /** Sets the IMAP4 UID (unique identifier) for the specified message/folder.
       
   796 @param aUID IMAP4 UID */
       
   797 inline void TMsvEmailEntry::SetUID(TUint32 aUID)
       
   798 	{
       
   799 	iMtmData2 = (TInt32) aUID;	// hide the casting away from the user
       
   800 	}
       
   801 
       
   802 /** Gets the number of messages stored in the remote folder.
       
   803 @return Number of messages */
       
   804 inline TInt TMsvEmailEntry::RemoteFolderEntries() const
       
   805 	{
       
   806 	return iMtmData3&KMsvRemoteFolderEntriesMask;
       
   807 	}
       
   808 
       
   809 /** Sets the number of messages stored in the remote folder.
       
   810 @param aEntries Number of messages */
       
   811 inline void TMsvEmailEntry::SetRemoteFolderEntries(TInt aEntries)
       
   812 	{
       
   813 	iMtmData3 = (TInt32) ((iMtmData3 & ~KMsvRemoteFolderEntriesMask) | (aEntries & KMsvRemoteFolderEntriesMask));
       
   814 	}
       
   815 
       
   816 //////////////////////////////////////////////////////////////
       
   817 //				CImMimeHeader inlines						//
       
   818 //////////////////////////////////////////////////////////////
       
   819 
       
   820 /** Gets the const Content-Type parameters and their associated values.
       
   821 @return Parameters and associated values */
       
   822 inline const CDesC8Array& CImMimeHeader::ContentTypeParams() const 
       
   823 	{
       
   824 	return *iContentTypeParams;
       
   825 	}
       
   826 
       
   827 
       
   828 /** Gets the const Content-Disposition parameters and their associated values.
       
   829 @return Parameters and associated values */
       
   830 inline const CDesC8Array& CImMimeHeader::ContentDispositionParams() const
       
   831 	{
       
   832 	return *iContentDispositionParams;
       
   833 	}
       
   834 
       
   835 
       
   836 /** Gets the const MIME header parameters and their associated values.
       
   837 This can be used by any MIME header fields.
       
   838 @return Parameters and associated values */
       
   839 inline const CDesC8Array& CImMimeHeader::XTypeParams() const
       
   840 	{
       
   841 	return *iXTypeParams;
       
   842 	}
       
   843 
       
   844 
       
   845 /** Gets the Content-Type parameters and their associated values.
       
   846 @return Parameters and associated values */
       
   847 inline CDesC8Array& CImMimeHeader::ContentTypeParams()
       
   848 	{
       
   849 	return *iContentTypeParams;
       
   850 	}
       
   851 
       
   852 
       
   853 /** Gets the Content-Disposition parameters and their associated values.
       
   854 @return Parameters and associated values */
       
   855 inline CDesC8Array& CImMimeHeader::ContentDispositionParams()
       
   856 	{
       
   857 	return *iContentDispositionParams;
       
   858 	}
       
   859 
       
   860 
       
   861 /** Gets the MIME header parameters and their associated values.
       
   862 This can be used by any MIME header fields.
       
   863 @return Parameters and associated values */
       
   864 inline CDesC8Array& CImMimeHeader::XTypeParams()
       
   865 	{
       
   866 	return *iXTypeParams;
       
   867 	}
       
   868 
       
   869 
       
   870 inline const TUint16 CImMimeHeader::Version() const
       
   871 	{
       
   872 	return iVersion;
       
   873 	}
       
   874 
       
   875 inline void CImMimeHeader::SetVersion( TUint16 aVersion )
       
   876 	{
       
   877 	iVersion = aVersion;
       
   878 	}