|
1 /* |
|
2 * Copyright (c) 2005-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: Implementation of CMRViewers ECom API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // ---------------------------------------------------------------------------- |
|
20 // INCLUDE FILES |
|
21 // ---------------------------------------------------------------------------- |
|
22 // |
|
23 #include "emailtrace.h" |
|
24 #include "cesmrviewersimpl.h" |
|
25 |
|
26 // From ESMRVIEWER |
|
27 #include "cesmrviewerctrl.h" |
|
28 #include "caleneditorsplugin.h" |
|
29 |
|
30 // From MR Mailbox Utils |
|
31 #include <cmrmailboxutils.h> |
|
32 #include <CMRUtils.h> |
|
33 |
|
34 // From System |
|
35 #include <coemain.h> |
|
36 #include <bautils.h> |
|
37 #include <f32file.h> |
|
38 #include <data_caging_path_literals.hrh> |
|
39 |
|
40 // Logging utilities |
|
41 // <cmail> Removed profiling. </cmail> |
|
42 |
|
43 // ---------------------------------------------------------------------------- |
|
44 // MEMBER FUNCTIONS |
|
45 // ---------------------------------------------------------------------------- |
|
46 // |
|
47 |
|
48 // ---------------------------------------------------------------------------- |
|
49 // CESMRViewersImpl::CESMRViewersImpl |
|
50 // ---------------------------------------------------------------------------- |
|
51 // |
|
52 CESMRViewersImpl::CESMRViewersImpl() |
|
53 { |
|
54 FUNC_LOG; |
|
55 } |
|
56 |
|
57 // ---------------------------------------------------------------------------- |
|
58 // CESMRViewersImpl::~CESMRViewersImpl |
|
59 // ---------------------------------------------------------------------------- |
|
60 // |
|
61 CESMRViewersImpl::~CESMRViewersImpl() |
|
62 { |
|
63 FUNC_LOG; |
|
64 delete iMtmUid; |
|
65 delete iController; |
|
66 } |
|
67 |
|
68 // ---------------------------------------------------------------------------- |
|
69 // CESMRViewersImpl::NewL |
|
70 // ---------------------------------------------------------------------------- |
|
71 // |
|
72 CESMRViewersImpl* CESMRViewersImpl::NewL( TAny* aMtmUid ) |
|
73 { |
|
74 FUNC_LOG; |
|
75 CESMRViewersImpl* self = new (ELeave) CESMRViewersImpl; |
|
76 CleanupStack::PushL( self ); |
|
77 self->ConstructL(aMtmUid); |
|
78 CleanupStack::Pop( self ); |
|
79 return self; |
|
80 } |
|
81 |
|
82 // ---------------------------------------------------------------------------- |
|
83 // CESMRViewersImpl::ConstructL |
|
84 // ---------------------------------------------------------------------------- |
|
85 // |
|
86 void CESMRViewersImpl::ConstructL( TAny* aMtmUid ) // codescanner::LFunctionCantLeave |
|
87 { |
|
88 FUNC_LOG; |
|
89 iMtmUid = reinterpret_cast<HBufC8*>( aMtmUid ); |
|
90 } |
|
91 |
|
92 // ---------------------------------------------------------------------------- |
|
93 // CESMRViewersImpl::ExecuteViewL |
|
94 // ---------------------------------------------------------------------------- |
|
95 // |
|
96 TInt CESMRViewersImpl::ExecuteViewL( // codescanner::intleaves |
|
97 RPointerArray<CCalEntry>& aEntries, |
|
98 const TAgnEntryUiInParams& aInParams, |
|
99 TAgnEntryUiOutParams& aOutParams, |
|
100 MAgnEntryUiCallback& aCallback) |
|
101 { |
|
102 FUNC_LOG; |
|
103 return ExecuteViewInternalL( |
|
104 aEntries, |
|
105 aInParams, |
|
106 aOutParams, |
|
107 aCallback ); |
|
108 } |
|
109 |
|
110 // ---------------------------------------------------------------------------- |
|
111 // CESMRViewersImpl::SetHelpContext |
|
112 // ---------------------------------------------------------------------------- |
|
113 // |
|
114 void CESMRViewersImpl::SetHelpContext( const TCoeHelpContext& /*aContext*/ ) |
|
115 { |
|
116 FUNC_LOG; |
|
117 } |
|
118 |
|
119 // ---------------------------------------------------------------------------- |
|
120 // CESMRViewersImpl::ExecuteViewInternalL |
|
121 // ---------------------------------------------------------------------------- |
|
122 // |
|
123 TInt CESMRViewersImpl::ExecuteViewInternalL( // codescanner::intleaves |
|
124 RPointerArray<CCalEntry>& aEntries, |
|
125 const MAgnEntryUi::TAgnEntryUiInParams& aInParams, |
|
126 MAgnEntryUi::TAgnEntryUiOutParams& aOutParams, |
|
127 MAgnEntryUiCallback& aCallback) |
|
128 { |
|
129 FUNC_LOG; |
|
130 // ES MR VIEWER controller is created. Controller will handle the |
|
131 // MR UTILS creation and showing the UI to user. Controller will also |
|
132 // receive the callback information from user and handles the BLC. |
|
133 delete iController; |
|
134 iController = NULL; |
|
135 iController = |
|
136 CESMRViewerController::NewL( *iMtmUid, |
|
137 aEntries, |
|
138 aInParams, |
|
139 aOutParams, |
|
140 aCallback ); |
|
141 |
|
142 iController->ExecuteL(); |
|
143 |
|
144 return KErrNone; |
|
145 } |
|
146 // End of file |
|
147 |