|
1 /* |
|
2 * Copyright (c) 2007 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 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 private: // Implementation |
|
64 CESMREditorFieldStorage( |
|
65 MESMRFieldEventObserver& aEventObserver ); |
|
66 void ConstructL( CESMRPolicy* aPolicy ); |
|
67 |
|
68 private: |
|
69 /** |
|
70 * Own. Validator object. |
|
71 */ |
|
72 MESMRFieldValidator* iValidator; |
|
73 }; |
|
74 |
|
75 #endif // CESMREDITORFIELDSTORAGE_H |
|
76 |