|
1 /* |
|
2 * Copyright (c) 2007-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: This file defines class MESMRFieldStorage. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MESMRFIELDSTORAGE_H |
|
20 #define MESMRFIELDSTORAGE_H |
|
21 |
|
22 #include <e32std.h> |
|
23 |
|
24 class MESMRCalEntry; |
|
25 class CESMRField; |
|
26 |
|
27 /** |
|
28 * Pure virtual class to be inherited by field storage classes. |
|
29 */ |
|
30 class MESMRFieldStorage |
|
31 { |
|
32 public: |
|
33 virtual ~MESMRFieldStorage(){} |
|
34 public: |
|
35 /** |
|
36 * Returns the count for all the fields in the storage |
|
37 * |
|
38 * @return TInt - field count |
|
39 */ |
|
40 virtual TInt Count() const = 0; |
|
41 |
|
42 /** |
|
43 * Returns field for given index. |
|
44 * |
|
45 * @param aInd - index of the wanted field. |
|
46 * @return CESMRField pointer |
|
47 */ |
|
48 virtual CESMRField* Field( TInt aInd ) const = 0; |
|
49 |
|
50 /** |
|
51 * Returns field for given field id. |
|
52 * |
|
53 * @param aId field id |
|
54 * @return CESMRField poiter or NULL. |
|
55 */ |
|
56 virtual CESMRField* FieldById( TESMREntryFieldId aId ) const = 0; |
|
57 |
|
58 /** |
|
59 * Called in the construction phase to set needed |
|
60 * entry informations to fields. |
|
61 * |
|
62 * @param aEntry - contains needed information. |
|
63 */ |
|
64 virtual void InternalizeL( MESMRCalEntry& aEntry ) = 0; |
|
65 |
|
66 /** |
|
67 * Called when editing the entry is done. Information from edited fields |
|
68 * is collected to aEntry. |
|
69 * |
|
70 * @param aEntry - entry where all the edited information is stored |
|
71 */ |
|
72 virtual void ExternalizeL( MESMRCalEntry& aEntry ) = 0; |
|
73 |
|
74 /** |
|
75 * Validates the content of fields |
|
76 * |
|
77 * @param aId Field id where focus is set if validation fails |
|
78 * @param aForceValidate ETrue if force validation is used |
|
79 * @return TInt |
|
80 */ |
|
81 virtual TInt Validate( |
|
82 TESMREntryFieldId& aId, |
|
83 TBool aForceValidate = EFalse ) = 0; |
|
84 }; |
|
85 |
|
86 #endif |