meetingrequest/mrtasks/inc/cesmrsendmrrespfsmailtask.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     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:  Class definition for sending meeting request via FS EMail
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_ESMRSENDMRRESPFSEMAILTASK_H
       
    19 #define C_ESMRSENDMRRESPFSEMAILTASK_H
       
    20 
       
    21 //<cmail>
       
    22 #include "esmrdef.h"
       
    23 //</cmail>
       
    24 #include "cesmrtaskbase.h"
       
    25 
       
    26 class MESMRCalDbMgr;
       
    27 class MESMRMeetingRequestEntry;
       
    28 class CMRMailboxUtils;
       
    29 class CCalEntry;
       
    30 class CESMRFSEMailManager;
       
    31 class CESMRMailPlainTextFormatter;
       
    32 class CESMRCalUserUtil;
       
    33 
       
    34 /**
       
    35  *  Class definition for sending meeting request via FS EMail.
       
    36  *
       
    37  *  @lib esmrtasks.lib
       
    38  */
       
    39 NONSHARABLE_CLASS( CESMRSendMRRespFSMailTask ) : public CESMRTaskBase
       
    40     {
       
    41 public: // Construction and destruction
       
    42     /**
       
    43      * Creates and initializes new CESMRSendMRRespFSMailTask object.
       
    44      * Ownership is transferred to caller.
       
    45      *
       
    46      * @param aCommand Response command.
       
    47      * @param aCalDbMgr Reference to cal db manager.
       
    48      * @param aEntry Reference to ES MR meeting request calendar entry.
       
    49      * @param aMRMailboxUtils Reference mr mailbox utilities.
       
    50      * @param aResponseType Response type
       
    51      * @param aResponseMessage Pointer to response message buffer.
       
    52      */
       
    53     static CESMRSendMRRespFSMailTask* NewL(
       
    54             TESMRCommand aCommand,
       
    55             MESMRCalDbMgr& aCalDbMgr,
       
    56             MESMRMeetingRequestEntry& aEntry,
       
    57             CMRMailboxUtils& aMRMailboxUtils,
       
    58             TESMRResponseType aResponseType,
       
    59             const TDesC& aResponseMessage );
       
    60 
       
    61     /**
       
    62      * C++ destructor.
       
    63      */
       
    64     ~CESMRSendMRRespFSMailTask();
       
    65 
       
    66 public:// From MESMRTask
       
    67     void ExecuteTaskL();
       
    68 
       
    69 private:
       
    70     CESMRSendMRRespFSMailTask(
       
    71             TESMRCommand aCommand,
       
    72             MESMRCalDbMgr& aCalDbMgr,
       
    73             MESMRMeetingRequestEntry& aEntry,
       
    74             CMRMailboxUtils& aMRMailboxUtils,
       
    75             TESMRResponseType aResponseType );
       
    76 
       
    77     void ConstructL( const TDesC& aResponseMessage );
       
    78     void ConstructMailL();
       
    79     void AddPlainTextPartL();
       
    80     void AddCalendarPartL();
       
    81     void SendMailViaSyncL();
       
    82     TInt SaveICalToFileL( const TDesC& aICal, const TDesC& aFilename );
       
    83     void SetAttendeesL();
       
    84     
       
    85 private: // Data
       
    86     /**
       
    87     * Response command
       
    88     */
       
    89     TESMRCommand iCommand;
       
    90 
       
    91     /**
       
    92     * FS Email manager
       
    93     * Own.
       
    94     */
       
    95     CESMRFSEMailManager* iEmailMgr;
       
    96 
       
    97     /**
       
    98     * Plain text formatter
       
    99     * Own.
       
   100     */
       
   101     CESMRMailPlainTextFormatter* iTextFormatter;
       
   102 
       
   103     /**
       
   104     * Response type
       
   105     */
       
   106     TESMRResponseType iResponseType;
       
   107     /**
       
   108     * Response message
       
   109     * Own.
       
   110     */
       
   111     HBufC* iResponseMessage;
       
   112 
       
   113     /**
       
   114     * Pointer to calendar entry to be sent
       
   115     * Own.
       
   116     */
       
   117     CCalEntry* iEntryToSend;
       
   118     
       
   119     /**
       
   120     * Caluser utility object
       
   121     * Own.
       
   122     */
       
   123     CESMRCalUserUtil* iCaluserUtil;
       
   124     };
       
   125 
       
   126 #endif  // C_ESMRSENDMRRESPFSEMAILTASK_H