meetingrequest/mrprocessor/mrcaleventplugin/inc/cmrcaleventprocessor.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_MRCALENTRYPROCESSOR_H
       
    19 #define C_MRCALENTRYPROCESSOR_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "cmrentryprocessor.h"
       
    23 
       
    24 class MESMRCalDbMgr;
       
    25 class CMRCalEntry;
       
    26 
       
    27 /**
       
    28 * CESMREntryProcessor's main responsibility is to
       
    29 * perform entry processing and evaluation in initialization phase.
       
    30 *
       
    31 * @lib esmrentry.lib
       
    32 */
       
    33 NONSHARABLE_CLASS(CMRCalEntryProcessor) :
       
    34         public CMREntryProcessor
       
    35     {
       
    36 public: // Construction and destruction
       
    37     /**
       
    38      * Creates new CESMREntryProcessor object. Ownership
       
    39      * is transferred to caller.
       
    40      * @param aDbMgr Reference to calendar DB manager.
       
    41      * @return Pointer to created CESMREntryProcessor object,
       
    42      */
       
    43     static CMRCalEntryProcessor* NewL(
       
    44             TAny* aDbMgr );    
       
    45     
       
    46     /**
       
    47      * C++ destructor
       
    48      */
       
    49     ~CMRCalEntryProcessor();
       
    50 
       
    51 public: // From MESMREntryProcessor
       
    52     const TESMRScenarioData& ScenarioData() const;
       
    53     TBool ContainsProcessedEntry() const;   
       
    54     void ProcessL(
       
    55             const MAgnEntryUi::TAgnEntryUiInParams* aParams,
       
    56             RPointerArray<CCalEntry>* aEntries );
       
    57     void ProcessL(
       
    58             const MAgnEntryUi::TAgnEntryUiInParams* aParams,
       
    59             CCalEntry& aEntry,
       
    60             TBool aSetDefaultValuesToEntry,
       
    61             const TBool aTypeChanging = EFalse );
       
    62     void ProcessL(
       
    63             RPointerArray<CCalEntry>* aEntries );
       
    64     void ProcessL(
       
    65             CCalInstance& aInstance );
       
    66     void SwitchProcessorToModeL(
       
    67             TMRProcessorMode aMode );
       
    68     MESMRCalEntry& ESMREntryL();
       
    69     void ResetL();
       
    70     void ProcessOutputParametersL(
       
    71             MAgnEntryUi::TAgnEntryUiOutParams& aOutParams,
       
    72             TESMRCommand aCommand );
       
    73 
       
    74 private: // Implementaton
       
    75 
       
    76     static CMRCalEntryProcessor* CreateL(
       
    77             MESMRCalDbMgr& aDbMgr ); 
       
    78     
       
    79     CMRCalEntryProcessor(
       
    80             MESMRCalDbMgr& aDbMgr);
       
    81     void ConstructL();
       
    82     TBool IsDataOk() const;
       
    83     void CreateEntryL( CCalEntry& aEntry, TBool aSetDefaultValuesToEntry );
       
    84     void ConvertTextFieldLineFeedsL();
       
    85     void ConvertTextFieldLineFeedsL( CCalEntry& aEntry );
       
    86     
       
    87 private: // Data
       
    88     /**
       
    89     * Scenario data
       
    90     * Own.
       
    91     */
       
    92     TESMRScenarioData iScenData;
       
    93     
       
    94     /**
       
    95     * Reference to calendar DB manager
       
    96     * Not own.
       
    97     */
       
    98     MESMRCalDbMgr& iDbMgr;
       
    99     
       
   100     /**
       
   101     * Calendar entry
       
   102     * Own.
       
   103     */
       
   104     CMRCalEntry* iCalEntry;
       
   105     
       
   106     /**
       
   107     * Input parameters from calling application
       
   108     * Not own.
       
   109     */
       
   110     const MAgnEntryUi::TAgnEntryUiInParams* iParams;
       
   111     
       
   112     /**
       
   113     * Entries to be processed
       
   114     * Not own.
       
   115     */
       
   116     RPointerArray<CCalEntry>* iCalEntries;    
       
   117     };
       
   118 
       
   119 #endif // C_MRCALENTRYPROCESSOR_H