meetingrequest/mrgui/inc/cesmreditorfieldstorage.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 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 Field storage for editor dialog
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CESMREDITORFIELDSTORAGE_H
       
    19 #define CESMREDITORFIELDSTORAGE_H
       
    20 
       
    21 #include "cesmrfieldstorage.h"
       
    22 //<cmail>
       
    23 #include "esmrdef.h"
       
    24 //</cmail>
       
    25 
       
    26 class CESMRPolicy;
       
    27 class MESMRFieldValidator;
       
    28 class MESMRCalEntry;
       
    29 class TESMREntryField;
       
    30 
       
    31 NONSHARABLE_CLASS( CESMREditorFieldStorage ):
       
    32         public CESMRFieldStorage
       
    33     {
       
    34 
       
    35 public:
       
    36     /**
       
    37      * Two phase constructor.
       
    38      *
       
    39      * @param aPolicy policy determines visible fields
       
    40      * @param aCommandObserver Reference to command observer
       
    41      */
       
    42     static CESMREditorFieldStorage* NewL(
       
    43             const CESMRPolicy& aPolicy,
       
    44             MESMRFieldEventObserver& aEventObserver );
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     ~CESMREditorFieldStorage();
       
    50 
       
    51 public: // from CESMRFieldStorage
       
    52     void ExternalizeL( MESMRCalEntry& aEntry );
       
    53     void InternalizeL( MESMRCalEntry& aEntry );
       
    54 
       
    55     /**
       
    56      * If validating fails (return value is != KErrNone), the given
       
    57      * TESMREntryFieldId contains the prefrred focus item.
       
    58      *
       
    59      * @return KErrNone if validation succeeds, error code otherwise
       
    60      */
       
    61     TInt Validate( TESMREntryFieldId& aUpdatedFocus, TBool aForceValidate );
       
    62     
       
    63     /**
       
    64      * Adjusts this storage for new policy. Creates fields according to new
       
    65      * policy.
       
    66      * 
       
    67      * @param aNewPolicy the new policy
       
    68      * @param aEntry the entry to edit
       
    69      */
       
    70     void ChangePolicyL(
       
    71             const CESMRPolicy& aNewPolicy,
       
    72             MESMRCalEntry& aEntry );
       
    73     
       
    74 private: // Implementation
       
    75     CESMREditorFieldStorage(
       
    76             MESMRFieldEventObserver& aEventObserver );
       
    77     void ConstructL( const CESMRPolicy& aPolicy );
       
    78 
       
    79 private:
       
    80     /**
       
    81      * Own. Validator object.
       
    82      */
       
    83     MESMRFieldValidator* iValidator;
       
    84     };
       
    85 
       
    86 #endif  // CESMREDITORFIELDSTORAGE_H
       
    87