meetingrequest/mrprocessor/mrprocessorplugin/inc/cesmrentryprocessor.h
branchRCL_3
changeset 12 4ce476e64c59
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:  ESMR mr entry processor
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_ESMRENTRYPROCESSOR_H
       
    19 #define C_ESMRENTRYPROCESSOR_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "cmrentryprocessor.h"
       
    23 
       
    24 class MESMRCalDbMgr;
       
    25 class CMRMailboxUtils;
       
    26 class CESMRFsMailboxUtils;
       
    27 class CESMRMeetingRequestEntry;
       
    28 
       
    29 /**
       
    30 * CESMREntryProcessor's main responsibility is to
       
    31 * perform entry processing and evaluation in initialization phase.
       
    32 *
       
    33 * @lib esmrentry.lib
       
    34 */
       
    35 NONSHARABLE_CLASS(CESMREntryProcessor) :
       
    36         public CMREntryProcessor
       
    37     {
       
    38 public: // Construction and destruction
       
    39     /**
       
    40      * Creates new CESMREntryProcessor object. Ownership
       
    41      * is transferred to caller.
       
    42      * @param aDbMgr Reference to calendar DB manager.
       
    43      * @return Pointer to created CESMREntryProcessor object,
       
    44      */
       
    45     static CESMREntryProcessor* NewL(
       
    46             TAny* aDbMgr );    
       
    47     
       
    48     /**
       
    49      * C++ destructor
       
    50      */
       
    51     ~CESMREntryProcessor();
       
    52 
       
    53 public: // From MESMREntryProcessor
       
    54     const TESMRScenarioData& ScenarioData() const;
       
    55     TBool ContainsProcessedEntry() const;   
       
    56     void ProcessL(
       
    57             const MAgnEntryUi::TAgnEntryUiInParams* aParams,
       
    58             RPointerArray<CCalEntry>* aEntries );
       
    59     void ProcessL(
       
    60             const MAgnEntryUi::TAgnEntryUiInParams* aParams,
       
    61             CCalEntry& aEntry,
       
    62             TBool aSetDefaultValuesToEntry,
       
    63             const TBool aTypeChanging = EFalse );
       
    64     void ProcessL(
       
    65             RPointerArray<CCalEntry>* aEntries );
       
    66     void ProcessL(
       
    67             CCalInstance& aInstance );
       
    68     void SwitchProcessorToModeL(
       
    69             TMRProcessorMode aMode );
       
    70     MESMRCalEntry& ESMREntryL();
       
    71     void ResetL();
       
    72     void ProcessOutputParametersL(
       
    73             MAgnEntryUi::TAgnEntryUiOutParams& aOutParams,
       
    74             TESMRCommand aCommand );
       
    75 
       
    76 private: // Implementaton
       
    77 
       
    78     static CESMREntryProcessor* CreateL(
       
    79             MESMRCalDbMgr& aDbMgr ); 
       
    80     
       
    81     CESMREntryProcessor(
       
    82             MESMRCalDbMgr& aDbMgr);
       
    83     void ConstructL();
       
    84     void SetPhoneOwnerL( CCalEntry& aEntry,
       
    85                          CCalEntry& aBaseEntry );
       
    86     void CheckViewModeL();
       
    87     TBool IsDataOk() const;
       
    88     void CreateESMREntryL( CCalEntry& aEntry, TBool aSetDefaultValuesToEntry );
       
    89     void CheckOrganizerL( CCalEntry& aEntry );
       
    90     void SetPhoneOwnerToOwnEntryL();
       
    91     void SwitchToForwardL();
       
    92     void SwitchToEditL();
       
    93     void SwitchToViewL();
       
    94     void SwitchToTrackL();
       
    95      
       
    96 private: // Data
       
    97     /**
       
    98     * Scenario data
       
    99     * Own.
       
   100     */
       
   101     TESMRScenarioData iScenData;
       
   102 
       
   103     /**
       
   104     * ES MR Entry
       
   105     * Own.
       
   106     */    
       
   107     CESMRMeetingRequestEntry* iESMREntry;
       
   108     
       
   109     /**
       
   110     * Reference to MR Mailbox Utilities API
       
   111     * Own.
       
   112     */
       
   113     CMRMailboxUtils* iMRMailboxUtils;
       
   114 
       
   115     /**
       
   116     * Reference to calendar DB manager
       
   117     * Not own.
       
   118     */
       
   119     MESMRCalDbMgr& iDbMgr;
       
   120 
       
   121     /**
       
   122     * Entries to be processed
       
   123     * Not own.
       
   124     */
       
   125     RPointerArray<CCalEntry>* iMREntries;
       
   126 
       
   127     /**
       
   128      * Entry to be processed
       
   129      * Not own.
       
   130      */
       
   131     CCalEntry* iCalEntry;
       
   132     
       
   133     /**
       
   134     * Input parameters from calling application
       
   135     * Not own.
       
   136     */
       
   137     const MAgnEntryUi::TAgnEntryUiInParams* iParams;
       
   138     
       
   139     /**
       
   140      * Own: Mailbox utils class.
       
   141      */
       
   142     CESMRFsMailboxUtils* iMbUtils;
       
   143     };
       
   144 
       
   145 #endif // CESMRENTRYPROCESSOR_H