meetingrequest/mrtasks/inc/cesmrtaskextensionimpl.h
changeset 0 8466d47a6819
child 16 4ce476e64c59
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 task extension implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRTASKEXTENSIONIMPL_H
       
    20 #define CESMRTASKEXTENSIONIMPL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "mesmrtaskextension.h"
       
    24 
       
    25 class MESMRCalDbMgr;
       
    26 class CMRMailboxUtils;
       
    27 class CESMRPolicyManager;
       
    28 class CESMREntryProcessor;
       
    29 class MESMRTaskFactory;
       
    30 
       
    31 /**
       
    32  * CESMRTaskExtenstionImpl implements ES MR task extension for
       
    33  * MR Utils interface.
       
    34  *
       
    35  * Usage (assuming you have CMRUtils* iUtils):
       
    36  * @code
       
    37  *    MESMRTaskExtension* ext = ExtensionApiL<MESMRTaskExtension>( iUtils );
       
    38  * @endcode
       
    39  * @see
       
    40  *
       
    41  */
       
    42 NONSHARABLE_CLASS( CESMRTaskExtenstionImpl ) : public CBase,
       
    43                                                public MESMRTaskExtension
       
    44     {
       
    45 public: // Construction and destruction
       
    46     /**
       
    47      * Creates and initialzes new CESMRTaskExtenstionImpl object
       
    48      * Ownership is trasferred to caller.
       
    49      * @param aCalDbMgr Reference to cal db manager.
       
    50      * @param aMRMailboxUtils Reference to mailbox utilities.
       
    51      * @param aPolicyManager Reference to policy manager.
       
    52      * @param aEntryProcessor Reference to entry processor.
       
    53      * @param aTaskFactory Reference to task factory.
       
    54      */
       
    55     IMPORT_C static CESMRTaskExtenstionImpl* NewL(
       
    56             MESMRCalDbMgr& aCalDBMgr,
       
    57             CMRMailboxUtils& aMRMailboxUtils,
       
    58             CESMRPolicyManager& aPolicyManager,
       
    59             CESMREntryProcessor& aEntryProcessor,
       
    60             MESMRTaskFactory& aTaskFactory );
       
    61 
       
    62     /**
       
    63      * C++ destructor.
       
    64      */
       
    65     IMPORT_C ~CESMRTaskExtenstionImpl();
       
    66 
       
    67 public: // From MESMRTaskExtension
       
    68     void SendAndStoreResponseL(
       
    69             TESMRCommand aCommand,
       
    70             MESMRMeetingRequestEntry& aEntry );
       
    71     void SendAndStoreMRL(
       
    72             TESMRCommand aCommand,
       
    73             MESMRMeetingRequestEntry& aEntry );
       
    74     void DeleteMRFromLocalDBL(
       
    75             TESMRCommand aCommand,
       
    76             MESMRMeetingRequestEntry& aEntry );
       
    77     void DeleteAndSendMRL(
       
    78             TESMRCommand aCommand,
       
    79             MESMRMeetingRequestEntry& aEntry );
       
    80     void StoreMRToLocalDBL(
       
    81             TESMRCommand aCommand,
       
    82             MESMRMeetingRequestEntry& aEntry );
       
    83     void ForwardMRAsEmailL(
       
    84             TESMRCommand aCommand,
       
    85             MESMRMeetingRequestEntry& aEntry );
       
    86     void ReplyAsEmailL(
       
    87             TESMRCommand aCommand,
       
    88             MESMRMeetingRequestEntry& aEntry );
       
    89 
       
    90 private: // Implementation
       
    91     CESMRTaskExtenstionImpl(
       
    92             MESMRCalDbMgr& aCalDBMgr,
       
    93             CMRMailboxUtils& aMRMailboxUtils,
       
    94             CESMRPolicyManager& aPolicyManager,
       
    95             CESMREntryProcessor& aEntryProcessor,
       
    96             MESMRTaskFactory& aTaskFactory );
       
    97     void ConstructL();
       
    98     void CreateAndExecuteTaskL(
       
    99             TESMRCommand aCommand,
       
   100             MESMRMeetingRequestEntry& aEntry );
       
   101 
       
   102 private: // Data
       
   103     /**
       
   104     * Cal DB manager
       
   105     * Not own.
       
   106     */
       
   107     MESMRCalDbMgr& iCalDBMgr;
       
   108 
       
   109     /**
       
   110     * Meeting request mailbox utils
       
   111     * Not own.
       
   112     */
       
   113     CMRMailboxUtils& iMRMailboxUtils;
       
   114 
       
   115     /**
       
   116     * ESMR policy manager
       
   117     * Not own.
       
   118     */
       
   119     CESMRPolicyManager& iPolicyManager;
       
   120 
       
   121     /**
       
   122     * MR Entry processor
       
   123     * Not own.
       
   124     */
       
   125     CESMREntryProcessor& iEntryProcessor;
       
   126 
       
   127     /**
       
   128     * ES MR Task factory
       
   129     * Not own.
       
   130     */
       
   131     MESMRTaskFactory& iTaskFactory;
       
   132     };
       
   133 
       
   134 #endif