|
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 : Fieldstorage with both viewer and editor fields |
|
15 * Version : %version: tr1sido#3 % |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CESMRMIXEDFIELDSTORAGE_H |
|
21 #define CESMRMIXEDFIELDSTORAGE_H |
|
22 |
|
23 #include "cesmrfieldstorage.h" |
|
24 #include "mesmrfieldvalidator.h" |
|
25 |
|
26 class CESMRPolicy; |
|
27 class TESMREntryField; |
|
28 class MESMRResponseObserver; |
|
29 class MESMRCalEntry; |
|
30 |
|
31 /** |
|
32 * Field storage which contains both viewer and editor fields. Storage is |
|
33 * used with following use cases: |
|
34 * - Forward |
|
35 * - Edit recurrent event single instance |
|
36 * |
|
37 * @lib esmrgui.lib |
|
38 */ |
|
39 NONSHARABLE_CLASS( CESMRMixedFieldStorage ): public CESMRFieldStorage |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Two phase constructor. |
|
44 */ |
|
45 static CESMRMixedFieldStorage* NewL( |
|
46 MESMRFieldEventObserver& aEventObserver, |
|
47 CESMRPolicy* aPolicy, |
|
48 MESMRResponseObserver* aResponseObserver, |
|
49 MESMRCalEntry& aEntry ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CESMRMixedFieldStorage(); |
|
55 |
|
56 public: // from CESMRFieldStorage |
|
57 void ExternalizeL( MESMRCalEntry& aEntry ); |
|
58 void InternalizeL( MESMRCalEntry& aEntry ); |
|
59 TInt Validate( TESMREntryFieldId& aUpdatedFocus, TBool aForceValidate ); |
|
60 |
|
61 private: // Implemantation |
|
62 /** |
|
63 * Constructor. |
|
64 * |
|
65 * @param aResponseObserver response observer |
|
66 */ |
|
67 CESMRMixedFieldStorage( |
|
68 MESMRFieldEventObserver& aEventObserver, |
|
69 MESMRResponseObserver* aResponseObserver, |
|
70 MESMRCalEntry& aEntry ); |
|
71 |
|
72 /** |
|
73 * Second phase constructor. |
|
74 * |
|
75 * @param aPolicy policy states visible fields |
|
76 */ |
|
77 void ConstructL( CESMRPolicy* aPolicy ); |
|
78 |
|
79 /** |
|
80 * Second phase constructor. |
|
81 * |
|
82 * @param aPolicy policy states visible fields |
|
83 * @param aValidator validator object |
|
84 */ |
|
85 void ConstructForwardEventL( |
|
86 CESMRPolicy* aPolicy, |
|
87 MESMRFieldValidator* aValidator ); |
|
88 |
|
89 /** |
|
90 * Second phase constructor. |
|
91 * |
|
92 * @param aPolicy policy states visible fields |
|
93 * @param aValidator validator object |
|
94 */ |
|
95 void ConstructRecurrentEventL( |
|
96 CESMRPolicy* aPolicy, |
|
97 MESMRFieldValidator* aValidator ); |
|
98 |
|
99 /** |
|
100 * Second phase constructor. |
|
101 * |
|
102 * @param aPolicy policy states visible fields |
|
103 * @param aValidator validator object |
|
104 */ |
|
105 void ConstructEditSeriesEventL( |
|
106 CESMRPolicy* aPolicy, |
|
107 MESMRFieldValidator* aValidator ); |
|
108 |
|
109 private: |
|
110 |
|
111 /** Enumeration for mixed event types */ |
|
112 enum TMixedFieldStorageEventType |
|
113 { |
|
114 /** Unknown event type*/ |
|
115 EMixedFieldStorageUnknown = 0, |
|
116 /** Forward event type*/ |
|
117 EMixedFieldStorageForward, |
|
118 /** Recurrent instance event type*/ |
|
119 EMixedFieldStorageRecurrentEvent, |
|
120 /** Recurrent series event type*/ |
|
121 EMixedFieldStorageEditSeriesEvent |
|
122 }; |
|
123 |
|
124 private: |
|
125 /// Own: Validator object. |
|
126 MESMRFieldValidator* iValidator; |
|
127 /// Ref: Response observer |
|
128 MESMRResponseObserver* iResponseObserver; |
|
129 /// Ref: Reference to used calendar entry |
|
130 MESMRCalEntry& iEntry; |
|
131 /// Own: Created event type |
|
132 TMixedFieldStorageEventType iEventType; |
|
133 }; |
|
134 |
|
135 #endif // CESMRMIXEDFIELDSTORAGE_H |
|
136 |