meetingrequest/mricalviewer/src/esmricalviewerutils.cpp
branchRCL_3
changeset 12 4ce476e64c59
parent 8 e1b6206813b4
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include "emailtrace.h"
    19 #include "emailtrace.h"
    20 #include "esmricalviewerutils.h"
    20 #include "esmricalviewerutils.h"
    21 #include "cesmrattachmentinfo.h"
       
    22 //<cmail>
       
    23 #include "cfsmailmessagepart.h"
    21 #include "cfsmailmessagepart.h"
    24 #include "cfsmailclient.h"
    22 #include "cfsmailclient.h"
    25 #include "cfsmailmessage.h"
    23 #include "cfsmailmessage.h"
    26 #include "cfsmailbox.h"
    24 #include "cfsmailbox.h"
    27 //</cmail>
       
    28 
    25 
    29 #include <calentry.h>
    26 #include <calentry.h>
    30 #include <caluser.h>
    27 #include <caluser.h>
    31 #include <cmrmailboxutils.h>
    28 #include <cmrmailboxutils.h>
    32 
    29 
    70 // ---------------------------------------------------------------------------
    67 // ---------------------------------------------------------------------------
    71 // ESMRIcalViewerUtils::ContainsAttachments
    68 // ESMRIcalViewerUtils::ContainsAttachments
    72 // ---------------------------------------------------------------------------
    69 // ---------------------------------------------------------------------------
    73 //
    70 //
    74 TBool ESMRIcalViewerUtils::ContainsAttachments(
    71 TBool ESMRIcalViewerUtils::ContainsAttachments(
    75         TESMRInputParams& aParams )
    72         TESMRInputParams& /*aParams*/ )
    76     {
    73     {
    77     FUNC_LOG;
    74     FUNC_LOG;
    78     TBool retValue( EFalse );
    75     TBool retValue( EFalse );
    79 
    76 
    80     if ( aParams.iAttachmentInfo &&
    77     // TODO: This needs to be updated
       
    78     /*if ( aParams.iAttachmentInfo &&
    81          aParams.iAttachmentInfo->AttachmentCount() )
    79          aParams.iAttachmentInfo->AttachmentCount() )
    82         {
    80         {
    83         retValue = ETrue;
    81         retValue = ETrue;
    84         }
    82         } */
    85 
    83 
    86     return retValue;
    84     return retValue;
    87     }
    85     }
    88 
    86 
    89 // ---------------------------------------------------------------------------
    87 // ---------------------------------------------------------------------------
   192 // ---------------------------------------------------------------------------
   190 // ---------------------------------------------------------------------------
   193 //
   191 //
   194 CFSMailMessagePart* ESMRIcalViewerUtils::LocateCalendarPartL( CFSMailMessage& aMessage )
   192 CFSMailMessagePart* ESMRIcalViewerUtils::LocateCalendarPartL( CFSMailMessage& aMessage )
   195     {
   193     {
   196     FUNC_LOG;
   194     FUNC_LOG;
   197     
   195 
   198     CFSMailMessagePart* calendarPart( NULL );
   196     CFSMailMessagePart* calendarPart( NULL );
   199     CFSMailMessagePart* multipart( NULL );
   197     CFSMailMessagePart* multipart( NULL );
   200     
   198 
   201     // 1st, try to find 'TEXT/CALENDAR' part from 'MULTIPART/ALTERNATIVE' part of message
   199     // 1st, try to find 'TEXT/CALENDAR' part from 'MULTIPART/ALTERNATIVE' part of message
   202     multipart = ESMRIcalViewerUtils::LocateChildPartLC(
   200     multipart = ESMRIcalViewerUtils::LocateChildPartLC(
   203         aMessage,
   201         aMessage,
   204         KFSMailContentTypeMultipartAlternative );
   202         KFSMailContentTypeMultipartAlternative );
   205     if ( multipart )
   203     if ( multipart )
   224         }
   222         }
   225     else
   223     else
   226         {
   224         {
   227         CleanupStack::PopAndDestroy( multipart );
   225         CleanupStack::PopAndDestroy( multipart );
   228         }
   226         }
   229     
   227 
   230     if ( !calendarPart )
   228     if ( !calendarPart )
   231         {
   229         {
   232         // If there's no 'MULTIPART/ALTERNATIVE' or it doesn't have
   230         // If there's no 'MULTIPART/ALTERNATIVE' or it doesn't have
   233         // 'TEXT/CALENDAR' entry, try looking from message root
   231         // 'TEXT/CALENDAR' entry, try looking from message root
   234         calendarPart = ESMRIcalViewerUtils::LocateChildPartLC(
   232         calendarPart = ESMRIcalViewerUtils::LocateChildPartLC(