meetingrequest/mricalviewer/inc/cesmricalviewercommandbase.h
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     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 imap calendar entry retriever definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRICALVIEWERCOMMANDBASE_H
       
    20 #define CESMRICALVIEWERCOMMANDBASE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 //<cmail>
       
    24 #include "mesmricalviewerobserver.h"
       
    25 #include "esmricalvieweropcodes.hrh"
       
    26 //</cmail>
       
    27 #include "mesmricalviewercommand.h"
       
    28 
       
    29 class CCalSession;
       
    30 class CFSMailMessage;
       
    31 
       
    32 /**
       
    33  * CESMRIcalViewerCommandBase is concrete command base class for
       
    34  * esmricalviewer command.
       
    35  */
       
    36 NONSHARABLE_CLASS( CESMRIcalViewerCommandBase ) :
       
    37         public CBase,
       
    38         public MESMRIcalViewerCommand
       
    39     {
       
    40 public:
       
    41     /**
       
    42      * C++ destructor
       
    43      */
       
    44     virtual ~CESMRIcalViewerCommandBase();
       
    45 
       
    46 public: // From MESMRIcalViewerCommand
       
    47     TESMRIcalViewerOperationType OperationType() const;
       
    48 
       
    49 protected: // Implementation
       
    50     /**
       
    51      * Base class constructor.
       
    52      * @param aType Operation type
       
    53      * @param aCalSession reference to calendar session
       
    54      */
       
    55     CESMRIcalViewerCommandBase(
       
    56             TESMRIcalViewerOperationType aType,
       
    57             CCalSession& aCalSession );
       
    58 
       
    59     /**
       
    60      *  Base class 2nd phase constructor.
       
    61      */
       
    62     void BaseConstructL();
       
    63 
       
    64     /**
       
    65      * Fetches reference to calendar session
       
    66      */
       
    67     CCalSession& CalSession();
       
    68 
       
    69     /**
       
    70      * Sets command observer.
       
    71      * @param aObserver Pointer to command observer.
       
    72      */
       
    73     void SetObserver(
       
    74             MESMRIcalViewerObserver* aObserver );
       
    75 
       
    76     /**
       
    77      * Fetches command observer.
       
    78      * @return Command observer.
       
    79      */
       
    80     MESMRIcalViewerObserver* Observer();
       
    81 
       
    82     /**
       
    83      * Sets mail message.
       
    84      * @param aMessage Pointer to message.
       
    85      */
       
    86     void SetMessage(
       
    87             CFSMailMessage* aMessage );
       
    88 
       
    89     /**
       
    90      * Fetches message pointer.
       
    91      * @return message pointer.
       
    92      */
       
    93     CFSMailMessage* Message();
       
    94 
       
    95 private: // data
       
    96     /// Own. Operation type
       
    97     TESMRIcalViewerOperationType iOperationType;
       
    98     /// Ref. Calendar session
       
    99     CCalSession& iCalSession;
       
   100     /// Ref: Command observer.
       
   101     MESMRIcalViewerObserver* iObserver;
       
   102     /// Ref: Message to be handled
       
   103     CFSMailMessage* iMessage;
       
   104     };
       
   105 
       
   106 #endif // CESMRICALVIEWERCOMMANDBASE_H
       
   107 
       
   108 // EOF