|
1 /* |
|
2 * Copyright (c) 2002-2006 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: CICalViewerView |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CICalViewerView.h" |
|
22 #include "MailLog.h" |
|
23 #include "CICalEngine.h" |
|
24 #include <MAgnEntryUi.h> //entry ui |
|
25 #include <SendUiConsts.h> // for resolving the MTM UID |
|
26 |
|
27 // CONSTANTS |
|
28 //const ?type ?constant_var = ?constant; |
|
29 |
|
30 |
|
31 // ============================ MEMBER FUNCTIONS =============================== |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // CICalViewerView::CICalViewerView |
|
35 // C++ default constructor can NOT contain any code, that |
|
36 // might leave. |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 CICalViewerView::CICalViewerView() |
|
40 { |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CICalViewerView::ConstructL |
|
45 // Symbian 2nd phase constructor can leave. |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 void CICalViewerView::ConstructL( TUid aMtmUid ) |
|
49 { |
|
50 LOG("CICalViewerView::ConstructL"); |
|
51 iEngine = CICalEngine::NewL(); |
|
52 LOG("CICalViewerView::ConstructL - engine created"); |
|
53 |
|
54 TBuf8<KMaxUidName> uidName; |
|
55 uidName.Copy( aMtmUid.Name() ); |
|
56 iEntryUI = iEngine->CreateEntryUIL( uidName ); |
|
57 LOG("CICalViewerView::ConstructL - end"); |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // CICalViewerView::NewL |
|
62 // Two-phased constructor. |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 CICalViewerView* CICalViewerView::NewL( TUid aMtmUid ) |
|
66 { |
|
67 CICalViewerView* self = new( ELeave ) CICalViewerView; |
|
68 |
|
69 CleanupStack::PushL( self ); |
|
70 self->ConstructL( aMtmUid ); |
|
71 CleanupStack::Pop(); |
|
72 |
|
73 return self; |
|
74 } |
|
75 |
|
76 |
|
77 // Destructor |
|
78 CICalViewerView::~CICalViewerView() |
|
79 { |
|
80 delete iEntryUI; |
|
81 delete iEngine; |
|
82 } |
|
83 |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CICalViewerView::ExecuteViewL |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 TInt CICalViewerView::ExecuteViewL( RPointerArray<CCalEntry>& aEntries, // CSI: 40 # We must return |
|
90 // the integer value although this |
|
91 // is a leaving method. |
|
92 const MAgnEntryUi::TAgnEntryUiInParams& aInParams, |
|
93 MAgnEntryUi::TAgnEntryUiOutParams& aOutParams, |
|
94 MAgnEntryUiCallback& aCallback ) |
|
95 { |
|
96 return iEntryUI->ExecuteViewL(aEntries, aInParams, aOutParams, aCallback); |
|
97 } |
|
98 |
|
99 // End of File |