meetingrequest/mrcasplugin/inc/cesmrcaspluginuilauncher.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: This file defines class CESMRCasPluginUiLauncher.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRCASPLUGINUILAUNCHER_H
       
    20 #define CESMRCASPLUGINUILAUNCHER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <MAgnEntryUi.h>
       
    24 #include <badesca.h>
       
    25 
       
    26 class CCalSession;
       
    27 class CCalenInterimUtils2;
       
    28 class CMRMailboxUtils;
       
    29 class TFscContactActionPluginParams;
       
    30 class MVPbkStoreContact;
       
    31 class CCalUser;
       
    32 class MESMRCasPluginUiLauncherObserver;
       
    33 
       
    34 
       
    35 /**
       
    36  * CESMRCasPluginUiLauncher is responsible for launching MR editor.
       
    37  */
       
    38 NONSHARABLE_CLASS( CESMRCasPluginUiLauncher ) :
       
    39     public CBase,
       
    40     public MAgnEntryUiCallback
       
    41     {
       
    42 public:
       
    43     /**
       
    44      * Creates and initializes new CESMRCasPluginUiLauncher object.
       
    45      * Ownership is transferred to caller.
       
    46      * @param aCalSession Reference to calendar session.
       
    47      * @param aParams Reference to contact action parameters
       
    48      * @return Pointer to CESMRCasPluginUiLauncher
       
    49      */
       
    50     static CESMRCasPluginUiLauncher* NewL(
       
    51             CCalSession& aCalSession,
       
    52             CCalenInterimUtils2& aCalUtils,
       
    53             CMRMailboxUtils& aMBUtils,
       
    54             const TFscContactActionPluginParams& aParams,
       
    55             MESMRCasPluginUiLauncherObserver& aExecuteObserver );
       
    56 
       
    57     /**
       
    58      * C++ destructor.
       
    59      */
       
    60     ~CESMRCasPluginUiLauncher();
       
    61 
       
    62 public: // Interface
       
    63     /**
       
    64      * Launches UI. Contacts are added to required recipients.
       
    65      * @param aAttendees Reference to attendee email address array
       
    66      */
       
    67     void LaunchMeetingRequestViewL(
       
    68             const RPointerArray<CCalUser>& aAttendees );
       
    69 
       
    70 private: // From MAgnEntryUiCallback
       
    71     void ProcessCommandL(TInt aCommandId);
       
    72     TInt ProcessCommandWithResultL( TInt aCommandId );
       
    73     TBool IsCommandAvailable( TInt aCommandId );
       
    74 
       
    75 private: // Implementation
       
    76     CESMRCasPluginUiLauncher(
       
    77             CCalSession& aCalSession,
       
    78             CCalenInterimUtils2& aCalUtils,
       
    79             CMRMailboxUtils& aMBUtils,
       
    80             const TFscContactActionPluginParams& aParams,
       
    81             MESMRCasPluginUiLauncherObserver& aExecuteObserver );
       
    82     void ConstructL();
       
    83     void AddOrganizerL();
       
    84     void AddAttendeesL( const RPointerArray<CCalUser>& aAttendees );
       
    85     void SetStartAndEndTimeL();
       
    86 
       
    87 private: // data
       
    88     /// Own calendar entry
       
    89     CCalEntry* iCalEntry;
       
    90     /// Own: MR Input parameters
       
    91     MAgnEntryUi::TAgnEntryUiInParams iInParams;
       
    92     /// Own: MR Output parameters
       
    93     MAgnEntryUi::TAgnEntryUiOutParams iOutParams;
       
    94     /// Own: MTM UID
       
    95     HBufC* iMtmUid;
       
    96     /// Ref: Calendar session
       
    97     CCalSession& iCalSession;
       
    98     /// Ref: contact action params
       
    99     const TFscContactActionPluginParams& iParams;
       
   100     /// Ref: Reference to calendar utils
       
   101     CCalenInterimUtils2& iCalUtils;
       
   102     /// Reference to mailbox utils
       
   103     CMRMailboxUtils& iMBUtils;
       
   104     /// Ref: execute observer
       
   105     MESMRCasPluginUiLauncherObserver& iExecuteObserver;
       
   106     };
       
   107 
       
   108 #endif // CESMRCASPLUGINUILAUNCHER_H
       
   109 
       
   110 // EOF