meetingrequest/mricalviewer/src/cesmricalviewercanviewmr.cpp
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  ESMR command base class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "emailtrace.h"
       
    21 #include "cesmricalviewercanviewmr.h"
       
    22 //<cmail>
       
    23 #include "esmricalvieweropcodes.hrh"
       
    24 #include "cfsmailcommon.h"
       
    25 #include "cfsmailmessage.h"
       
    26 //</cmail>
       
    27 
       
    28 // ======== MEMBER FUNCTIONS ========
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd(
       
    35         CCalSession& aCalSession,
       
    36         TBool& aFlag )
       
    37 :   CESMRIcalViewerCommandBase( EESMRCanViewMR, aCalSession ),
       
    38     iFlag( aFlag )
       
    39     {
       
    40     FUNC_LOG;
       
    41     //do nothing
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CESMRIcalViewerCanViewMsgCmd::~CESMRIcalViewerCanViewMsgCmd()
       
    49     {
       
    50     FUNC_LOG;
       
    51     CancelCommand();
       
    52     }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 CESMRIcalViewerCanViewMsgCmd* CESMRIcalViewerCanViewMsgCmd::NewL(
       
    59             CCalSession& aCalSession,
       
    60             TBool& aFlag )
       
    61     {
       
    62     FUNC_LOG;
       
    63     CESMRIcalViewerCanViewMsgCmd* self =
       
    64             new (ELeave) CESMRIcalViewerCanViewMsgCmd(
       
    65                     aCalSession,
       
    66                     aFlag );
       
    67 
       
    68     CleanupStack::PushL( self );
       
    69     self->ConstructL();
       
    70     CleanupStack::Pop( self );
       
    71     return self;
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 void CESMRIcalViewerCanViewMsgCmd::ConstructL()
       
    79     {
       
    80     FUNC_LOG;
       
    81     //do nothing
       
    82     }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 void CESMRIcalViewerCanViewMsgCmd::ExecuteCommandL(
       
    89         CFSMailMessage& aMessage,
       
    90         MESMRIcalViewerObserver& aObserver )
       
    91     {
       
    92     FUNC_LOG;
       
    93     iFlag = aMessage.IsFlagSet( EFSMsgFlag_CalendarMsg );
       
    94 
       
    95     iResult.iOpType = OperationType();
       
    96     iResult.iResultCode = KErrNone;
       
    97     iResult.iMessage = &aMessage;
       
    98 
       
    99     aObserver.OperationCompleted( iResult );
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // CESMRIcalViewerCanViewMsgCmd::CESMRIcalViewerCanViewMsgCmd
       
   104 // -----------------------------------------------------------------------------
       
   105 //
       
   106 void CESMRIcalViewerCanViewMsgCmd::CancelCommand()
       
   107     {
       
   108     FUNC_LOG;
       
   109     //do nothing
       
   110     }
       
   111 
       
   112