64
|
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 : Fieldstorage with both viewer and editor fields
|
|
15 |
* Version : %version: e002sa33#5 %
|
|
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 |
const CESMRPolicy& aPolicy,
|
|
48 |
MESMRResponseObserver* aResponseObserver,
|
|
49 |
MESMRCalEntry& aEntry );
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Destructor.
|
|
53 |
*/
|
|
54 |
~CESMRMixedFieldStorage();
|
|
55 |
|
|
56 |
protected: // from CESMRFieldStorage
|
|
57 |
void ExternalizeL( MESMRCalEntry& aEntry );
|
|
58 |
void InternalizeL( MESMRCalEntry& aEntry );
|
|
59 |
TInt Validate( TESMREntryFieldId& aUpdatedFocus, TBool aForceValidate );
|
|
60 |
void ChangePolicyL(
|
|
61 |
const CESMRPolicy& aNewPolicy,
|
|
62 |
MESMRCalEntry& aEntry );
|
|
63 |
|
|
64 |
private: // Implemantation
|
|
65 |
/**
|
|
66 |
* Constructor.
|
|
67 |
*
|
|
68 |
* @param aResponseObserver response observer
|
|
69 |
*/
|
|
70 |
CESMRMixedFieldStorage(
|
|
71 |
MESMRFieldEventObserver& aEventObserver,
|
|
72 |
MESMRResponseObserver* aResponseObserver );
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Second phase constructor.
|
|
76 |
*
|
|
77 |
* @param aPolicy policy states visible fields
|
|
78 |
* @param aEntry current entry for policy
|
|
79 |
*/
|
|
80 |
void ConstructL( const CESMRPolicy& aPolicy,
|
|
81 |
MESMRCalEntry& aEntry );
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Second phase constructor.
|
|
85 |
*
|
|
86 |
* @param aPolicy policy states visible fields
|
|
87 |
* @param aValidator validator object
|
|
88 |
*/
|
|
89 |
void ConstructForwardEventL(
|
|
90 |
const CESMRPolicy& aPolicy,
|
|
91 |
MESMRFieldValidator* aValidator );
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Second phase constructor.
|
|
95 |
*
|
|
96 |
* @param aPolicy policy states visible fields
|
|
97 |
* @param aValidator validator object
|
|
98 |
*/
|
|
99 |
void ConstructRecurrentEventL(
|
|
100 |
const CESMRPolicy& aPolicy,
|
|
101 |
MESMRFieldValidator* aValidator );
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Second phase constructor.
|
|
105 |
*
|
|
106 |
* @param aPolicy policy states visible fields
|
|
107 |
* @param aValidator validator object
|
|
108 |
*/
|
|
109 |
void ConstructEditSeriesEventL(
|
|
110 |
const CESMRPolicy& aPolicy,
|
|
111 |
MESMRFieldValidator* aValidator );
|
|
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 |
|
|
127 |
private:
|
|
128 |
|
|
129 |
/** Enumeration for mixed event types */
|
|
130 |
enum TMixedFieldStorageEventType
|
|
131 |
{
|
|
132 |
/** Unknown event type*/
|
|
133 |
EMixedFieldStorageUnknown = 0,
|
|
134 |
/** Forward event type*/
|
|
135 |
EMixedFieldStorageForward,
|
|
136 |
/** Recurrent instance event type*/
|
|
137 |
EMixedFieldStorageRecurrentEvent,
|
|
138 |
/** Recurrent series event type*/
|
|
139 |
EMixedFieldStorageEditSeriesEvent
|
|
140 |
};
|
|
141 |
|
|
142 |
private:
|
|
143 |
/// Own: Validator object.
|
|
144 |
MESMRFieldValidator* iValidator;
|
|
145 |
/// Ref: Response observer
|
|
146 |
MESMRResponseObserver* iResponseObserver;
|
|
147 |
/// Ref: Reference to used calendar entry
|
|
148 |
MESMRCalEntry* iEntry;
|
|
149 |
/// Own: Created event type
|
|
150 |
TMixedFieldStorageEventType iEventType;
|
|
151 |
};
|
|
152 |
|
|
153 |
#endif // CESMRMIXEDFIELDSTORAGE_H
|
|
154 |
|