meetingrequest/mrtasks/inc/cesmrtaskfactory.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:  Interface definition for ESMR task factory implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRTASKFACTORY_H
       
    20 #define CESMRTASKFACTORY_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "mesmrtaskfactory.h"
       
    24 
       
    25 class MESMRCalDbMgr;
       
    26 class CMRMailboxUtils;
       
    27 
       
    28 /**
       
    29  *  CESMRTaskFactory implements interface for creating ES MR tasks.
       
    30  *  @see MESMRTaskFactory
       
    31  *
       
    32  *  @lib esmrtasks.lib
       
    33  */
       
    34 NONSHARABLE_CLASS(CESMRTaskFactory) : public CBase,
       
    35                                       public MESMRTaskFactory
       
    36     {
       
    37 public: // Construction and destruction
       
    38     /**
       
    39      * Creates and initialzes new ES MR task factory.
       
    40      * @param aCalDbMgr Reference to cal db manager.
       
    41      * @param aMRMailboxUtils Reference to mailbox utilities.
       
    42      */
       
    43     IMPORT_C static CESMRTaskFactory* NewL(
       
    44             MESMRCalDbMgr& aCalDbMgr,
       
    45             CMRMailboxUtils& aMRMailboxUtils );
       
    46 
       
    47     /**
       
    48      * C++ destructor.
       
    49      */
       
    50     ~CESMRTaskFactory();
       
    51 
       
    52 public: // From MESMRTaskFactory
       
    53     MESMRTask* CreateTaskL(
       
    54             TESMRCommand aCommand,
       
    55             MESMRMeetingRequestEntry& aEntry );
       
    56 
       
    57 private: // Implementation
       
    58     CESMRTaskFactory(
       
    59             MESMRCalDbMgr& aCalDbMgr,
       
    60             CMRMailboxUtils& aMRMailboxUtils );
       
    61     MESMRTask* CreateSendMRResponseViaMailTaskL(
       
    62             TESMRCommand aCommand,
       
    63             MESMRMeetingRequestEntry& aEntry );
       
    64     MESMRTask* CreateSendMRTaskL(
       
    65             TESMRCommand aCommand,
       
    66             MESMRMeetingRequestEntry& aEntry );
       
    67     MESMRTask* CreateDeleteMRTaskL(
       
    68             TESMRCommand aCommand,
       
    69             MESMRMeetingRequestEntry& aEntry );
       
    70     MESMRTask* CreateStoreMRToLocalDBTaskL(
       
    71             TESMRCommand aCommand,
       
    72             MESMRMeetingRequestEntry& aEntry );
       
    73     MESMRTask* CreateForwardAsMeetingTaskL(
       
    74             TESMRCommand aCommand,
       
    75             MESMRMeetingRequestEntry& aEntry );
       
    76     MESMRTask* CreateForwardAsMailTaskL(
       
    77             MESMRMeetingRequestEntry& aEntry  );
       
    78     MESMRTask* CreateOrganizerDeleteMRTaskL(
       
    79             TESMRCommand aCommand,
       
    80             MESMRMeetingRequestEntry& aEntry );
       
    81     MESMRTask* CreateAttendeeDeleteMRTaskL(
       
    82             TESMRCommand aCommand,
       
    83             MESMRMeetingRequestEntry& aEntry );
       
    84     MESMRTask* CreateReplyAsMailTaskL(
       
    85                 MESMRMeetingRequestEntry& aEntry,
       
    86                 TBool aReplyAll);
       
    87 
       
    88 private: // Data
       
    89     /*
       
    90     * Reference to cal db manager
       
    91     * Not own.
       
    92     */
       
    93     MESMRCalDbMgr& iCalDbMgr;
       
    94 
       
    95     /**
       
    96     * Reference to mr mailbox utilities
       
    97     * Not own.
       
    98     */
       
    99     CMRMailboxUtils& iMRMailboxUtils;
       
   100     };
       
   101 
       
   102 #endif // C_ESMRTASKFACTORY_H