|
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: ESMR ui base class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "emailtrace.h" |
|
20 #include "cesmrvalidatorfactory.h" |
|
21 #include "cesmrmeetingtimevalidator.h" |
|
22 #include "cesmrtodotimevalidator.h" |
|
23 #include "cesmrmemotimevalidator.h" |
|
24 #include "cesmrannivtimevalidator.h" |
|
25 |
|
26 // ======== MEMBER FUNCTIONS ======== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // CESMRValidatorFactory::CreateValidatorL |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 MESMRFieldValidator* CESMRValidatorFactory::CreateValidatorL( |
|
33 TESMRCalendarEventType aType ) |
|
34 { |
|
35 FUNC_LOG; |
|
36 MESMRFieldValidator* validator= NULL; |
|
37 switch ( aType ) |
|
38 { |
|
39 case EESMREventTypeMeetingRequest: |
|
40 case EESMREventTypeAppt: // activated by meeting and meeting request |
|
41 { |
|
42 validator = CESMRMeetingTimeValidator::NewL ( ); |
|
43 break; |
|
44 } |
|
45 case EESMREventTypeETodo: // activated bt To-do |
|
46 { |
|
47 validator = CESMRTodoTimeValidator::NewL ( ); |
|
48 break; |
|
49 } |
|
50 case EESMREventTypeEEvent: // activated by Memo- Day note |
|
51 { |
|
52 validator = CESMRMemoTimeValidator::NewL ( ); |
|
53 break; |
|
54 } |
|
55 case EESMREventTypeEAnniv: // Activated by Aniverssary |
|
56 { |
|
57 validator = CESMRAnnivTimeValidator::NewL ( ); |
|
58 break; |
|
59 } |
|
60 case EESMREventTypeEReminder: // Is meeting |
|
61 default: |
|
62 { |
|
63 } |
|
64 } |
|
65 return validator; |
|
66 } |
|
67 // EOF |
|
68 |