|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Implements control for the application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "emailtrace.h" |
|
21 #include "FreestyleEmailUiMsgDetailsControl.h" |
|
22 #include "FreestyleEmailUiMsgDetailsVisualiser.h" |
|
23 |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // Two-phased constructor. |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CFSEmailUiMsgDetailsControl* CFSEmailUiMsgDetailsControl::NewL(CAlfEnv& aEnv, CFSEmailUiMsgDetailsVisualiser& aVisualiser) |
|
30 { |
|
31 FUNC_LOG; |
|
32 CFSEmailUiMsgDetailsControl* self = CFSEmailUiMsgDetailsControl::NewLC(aEnv, aVisualiser); |
|
33 CleanupStack::Pop(self); |
|
34 return self; |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // Two-phased constructor. |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 CFSEmailUiMsgDetailsControl* CFSEmailUiMsgDetailsControl::NewLC(CAlfEnv& aEnv, CFSEmailUiMsgDetailsVisualiser& aVisualiser) |
|
42 { |
|
43 FUNC_LOG; |
|
44 CFSEmailUiMsgDetailsControl* self = new (ELeave) CFSEmailUiMsgDetailsControl(aVisualiser); |
|
45 CleanupStack::PushL(self); |
|
46 self->ConstructL(aEnv); |
|
47 return self; |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 //C++ constructor. |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 CFSEmailUiMsgDetailsControl::CFSEmailUiMsgDetailsControl(CFSEmailUiMsgDetailsVisualiser& aVisualiser) |
|
55 : CAlfControl(), |
|
56 iVisualiser(aVisualiser) |
|
57 { |
|
58 FUNC_LOG; |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // Two-phased constructor. |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 void CFSEmailUiMsgDetailsControl::ConstructL(CAlfEnv& aEnv) |
|
66 { |
|
67 FUNC_LOG; |
|
68 CAlfControl::ConstructL(aEnv); |
|
69 } |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // Virtual destructor. |
|
73 // --------------------------------------------------------------------------- |
|
74 // |
|
75 CFSEmailUiMsgDetailsControl::~CFSEmailUiMsgDetailsControl() |
|
76 { |
|
77 FUNC_LOG; |
|
78 } |
|
79 |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // Event handling |
|
83 // --------------------------------------------------------------------------- |
|
84 // |
|
85 TBool CFSEmailUiMsgDetailsControl::OfferEventL( const TAlfEvent& aEvent ) |
|
86 { |
|
87 FUNC_LOG; |
|
88 // Offer events to view |
|
89 return iVisualiser.OfferEventL( aEvent ); |
|
90 } |
|
91 |
|
92 // --------------------------------------------------------------------------- |
|
93 // Command handling |
|
94 // --------------------------------------------------------------------------- |
|
95 // |
|
96 void CFSEmailUiMsgDetailsControl::HandleCommandL(TInt aCommand) |
|
97 { |
|
98 FUNC_LOG; |
|
99 // Offer aCommand to view |
|
100 return iVisualiser.HandleCommandL( aCommand ); |
|
101 } |
|
102 |