meetingrequest/mrgui/inc/cesmrmixedfieldstorage.h
branchRCL_3
changeset 33 da5135c61bad
parent 0 8466d47a6819
equal deleted inserted replaced
32:a3a1ae9acec6 33:da5135c61bad
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 *  Description : Fieldstorage with both viewer and editor fields
    14 *  Description : Fieldstorage with both viewer and editor fields
    15 *  Version     : %version: tr1sido#3 %
    15 *  Version     : %version: e002sa33#5 %
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #ifndef CESMRMIXEDFIELDSTORAGE_H
    20 #ifndef CESMRMIXEDFIELDSTORAGE_H
    42     /**
    42     /**
    43      * Two phase constructor.
    43      * Two phase constructor.
    44      */
    44      */
    45     static CESMRMixedFieldStorage* NewL(
    45     static CESMRMixedFieldStorage* NewL(
    46             MESMRFieldEventObserver& aEventObserver,
    46             MESMRFieldEventObserver& aEventObserver,
    47             CESMRPolicy* aPolicy,
    47             const CESMRPolicy& aPolicy,
    48             MESMRResponseObserver* aResponseObserver,
    48             MESMRResponseObserver* aResponseObserver,
    49             MESMRCalEntry& aEntry );
    49             MESMRCalEntry& aEntry );
    50 
    50 
    51     /**
    51     /**
    52      * Destructor.
    52      * Destructor.
    53      */
    53      */
    54     ~CESMRMixedFieldStorage();
    54     ~CESMRMixedFieldStorage();
    55 
    55 
    56 public: // from CESMRFieldStorage
    56 protected: // from CESMRFieldStorage
    57     void ExternalizeL( MESMRCalEntry& aEntry );
    57     void ExternalizeL( MESMRCalEntry& aEntry );
    58     void InternalizeL( MESMRCalEntry& aEntry );
    58     void InternalizeL( MESMRCalEntry& aEntry );
    59     TInt Validate( TESMREntryFieldId& aUpdatedFocus, TBool aForceValidate );
    59     TInt Validate( TESMREntryFieldId& aUpdatedFocus, TBool aForceValidate );
       
    60     void ChangePolicyL(
       
    61             const CESMRPolicy& aNewPolicy,
       
    62             MESMRCalEntry& aEntry );
    60 
    63 
    61 private: // Implemantation
    64 private: // Implemantation
    62     /**
    65     /**
    63      * Constructor.
    66      * Constructor.
    64      *
    67      *
    65      * @param aResponseObserver response observer
    68      * @param aResponseObserver response observer
    66      */
    69      */
    67     CESMRMixedFieldStorage(
    70     CESMRMixedFieldStorage(
    68             MESMRFieldEventObserver& aEventObserver,
    71             MESMRFieldEventObserver& aEventObserver,
    69             MESMRResponseObserver* aResponseObserver,
    72             MESMRResponseObserver* aResponseObserver );
    70             MESMRCalEntry& aEntry  );
       
    71 
    73 
    72     /**
    74     /**
    73      * Second phase constructor.
    75      * Second phase constructor.
    74      *
    76      *
    75      * @param aPolicy policy states visible fields
    77      * @param aPolicy policy states visible fields
       
    78      * @param aEntry current entry for policy
    76      */
    79      */
    77     void ConstructL( CESMRPolicy* aPolicy );
    80     void ConstructL( const CESMRPolicy& aPolicy,
       
    81                      MESMRCalEntry& aEntry );
    78 
    82 
    79     /**
    83     /**
    80      * Second phase constructor.
    84      * Second phase constructor.
    81      *
    85      *
    82      * @param aPolicy policy states visible fields
    86      * @param aPolicy policy states visible fields
    83      * @param aValidator validator object
    87      * @param aValidator validator object
    84      */
    88      */
    85     void ConstructForwardEventL(
    89     void ConstructForwardEventL(
    86             CESMRPolicy* aPolicy,
    90             const CESMRPolicy& aPolicy,
    87             MESMRFieldValidator* aValidator );
    91             MESMRFieldValidator* aValidator );
    88 
    92 
    89     /**
    93     /**
    90      * Second phase constructor.
    94      * Second phase constructor.
    91      *
    95      *
    92      * @param aPolicy policy states visible fields
    96      * @param aPolicy policy states visible fields
    93      * @param aValidator validator object
    97      * @param aValidator validator object
    94      */
    98      */
    95     void ConstructRecurrentEventL(
    99     void ConstructRecurrentEventL(
    96             CESMRPolicy* aPolicy,
   100             const CESMRPolicy& aPolicy,
    97             MESMRFieldValidator* aValidator );
   101             MESMRFieldValidator* aValidator );
    98 
   102 
    99     /**
   103     /**
   100      * Second phase constructor.
   104      * Second phase constructor.
   101      *
   105      *
   102      * @param aPolicy policy states visible fields
   106      * @param aPolicy policy states visible fields
   103      * @param aValidator validator object
   107      * @param aValidator validator object
   104      */
   108      */
   105     void ConstructEditSeriesEventL(
   109     void ConstructEditSeriesEventL(
   106             CESMRPolicy* aPolicy,
   110             const CESMRPolicy& aPolicy,
   107             MESMRFieldValidator* aValidator );
   111             MESMRFieldValidator* aValidator );
   108 
   112 
       
   113     /**
       
   114      * Resets this storage
       
   115      */
       
   116     void Reset();
       
   117     
       
   118     /**
       
   119      * Non-virtual function to change policy.
       
   120      * @param aNewPolicy policy states visible fields
       
   121      * @param aEntry the entry to handle
       
   122      */
       
   123     void DoChangePolicyL(
       
   124             const CESMRPolicy& aNewPolicy,
       
   125             MESMRCalEntry& aEntry );
       
   126     
   109 private:
   127 private:
   110 
   128 
   111     /** Enumeration for mixed event types */
   129     /** Enumeration for mixed event types */
   112     enum TMixedFieldStorageEventType
   130     enum TMixedFieldStorageEventType
   113         {
   131         {
   125     /// Own: Validator object.
   143     /// Own: Validator object.
   126     MESMRFieldValidator* iValidator;
   144     MESMRFieldValidator* iValidator;
   127     /// Ref: Response observer
   145     /// Ref: Response observer
   128     MESMRResponseObserver* iResponseObserver;
   146     MESMRResponseObserver* iResponseObserver;
   129     /// Ref: Reference to used calendar entry
   147     /// Ref: Reference to used calendar entry
   130     MESMRCalEntry& iEntry;
   148     MESMRCalEntry* iEntry;
   131     /// Own: Created event type
   149     /// Own: Created event type
   132     TMixedFieldStorageEventType iEventType;
   150     TMixedFieldStorageEventType iEventType;
   133     };
   151     };
   134 
   152 
   135 #endif  // CESMRMIXEDFIELDSTORAGE_H
   153 #endif  // CESMRMIXEDFIELDSTORAGE_H