author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 20:54:53 +0300 | |
branch | RCL_3 |
changeset 21 | 9da50d567e3c |
parent 20 | f4a778e096c2 |
permissions | -rw-r--r-- |
20 | 1 |
/* |
2 |
* Copyright (c) 2009-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 MyCard plugin |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#include "ccappmycardplugin.h" |
|
20 |
#include "ccappmycardcontainer.h" |
|
21 |
#include "ccappmycardcommon.h" |
|
22 |
#include "ccappmycardpluginuids.hrh" |
|
23 |
#include "ccappmycard.h" |
|
24 |
#include "ccappmycard.hrh" |
|
25 |
#include <spbcontactdatamodel.h> |
|
26 |
#include <ccappmycardpluginrsc.rsg> |
|
21
9da50d567e3c
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
20
diff
changeset
|
27 |
#include <pbk2uicontrols.rsg> |
20 | 28 |
#include <data_caging_path_literals.hrh> |
29 |
#include <mccappengine.h> |
|
30 |
#include <bautils.h> |
|
31 |
#include <AknsUtils.h> |
|
32 |
#include <AiwServiceHandler.h> |
|
33 |
#include <MVPbkContactLink.h> |
|
34 |
#include <AiwContactAssignDataTypes.h> |
|
35 |
#include <avkon.hrh> |
|
36 |
#include <aknappui.h> |
|
37 |
#include <s32mem.h> |
|
38 |
#include <CPbk2CommandHandler.h> |
|
39 |
#include <Pbk2Commands.hrh> //pbk2cmdsend |
|
40 |
#include <Pbk2DataCaging.hrh> |
|
41 |
#include <TPbk2ContactEditorParams.h> |
|
42 |
#include <CPbk2GeneralConfirmationQuery.h> |
|
43 |
#include <CPbk2PresentationContact.h> |
|
44 |
#include <CPbk2PresentationContactFieldCollection.h> |
|
45 |
#include <StringLoader.h> |
|
46 |
#include <AknQueryDialog.h> |
|
47 |
#include <mccapppluginparameter.h> |
|
48 |
#include <mccaparameter.h> |
|
49 |
#include <CVPbkContactManager.h> |
|
50 |
#include <MVPbkFieldType.h> |
|
51 |
#include <TVPbkFieldVersitProperty.h> |
|
52 |
||
53 |
// --------------------------------------------------------------------------- |
|
54 |
// Constants |
|
55 |
// --------------------------------------------------------------------------- |
|
56 |
||
57 |
/// MyCard own resource file |
|
58 |
_LIT( KMyCardResourceFileName, "ccappmycardpluginrsc.rsc" ); |
|
59 |
/// Phonebook2 UI controls resource file |
|
60 |
_LIT( KMyCardPbk2UiControlsResFileName, "pbk2uicontrols.rsc" ); |
|
61 |
// pbk2 common ui |
|
62 |
_LIT( KPbk2CommonUiDllResFileName, "Pbk2CommonUi.rsc" ); |
|
63 |
// pbk2 commands |
|
64 |
_LIT( KPbk2CommandsDllResFileName, "Pbk2Commands.rsc"); |
|
65 |
||
66 |
||
67 |
||
68 |
// --------------------------------------------------------------------------- |
|
69 |
// CCCAppMyCardPlugin::NewL |
|
70 |
// --------------------------------------------------------------------------- |
|
71 |
// |
|
72 |
CCCAppMyCardPlugin* CCCAppMyCardPlugin::NewL() |
|
73 |
{ |
|
74 |
CCA_DP(KMyCardLogFile, |
|
75 |
CCA_L("==== NEW INSTANCE============================================")); |
|
76 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::NewL()")); |
|
77 |
||
78 |
CCCAppMyCardPlugin* self = new ( ELeave ) CCCAppMyCardPlugin(); |
|
79 |
CleanupStack::PushL( self ); |
|
80 |
self->ConstructL(); |
|
81 |
CleanupStack::Pop( self ); |
|
82 |
||
83 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::NewL()")); |
|
84 |
return self; |
|
85 |
} |
|
86 |
||
87 |
// --------------------------------------------------------------------------- |
|
88 |
// CCCAppMyCardPlugin::~CCCAppMyCardPlugin |
|
89 |
// --------------------------------------------------------------------------- |
|
90 |
// |
|
91 |
CCCAppMyCardPlugin::~CCCAppMyCardPlugin() |
|
92 |
{ |
|
93 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::~CCCAppMyCardPlugin()")); |
|
94 |
||
95 |
iPbk2UiControlResource.Close(); |
|
96 |
||
97 |
iCommonUiResourceFile.Close(); |
|
98 |
||
99 |
iCommandsResourceFile.Close(); |
|
100 |
||
101 |
delete iModel; |
|
102 |
||
103 |
delete iMyCard; |
|
104 |
||
105 |
delete iCommandHandler; |
|
106 |
||
107 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::~CCCAppMyCardPlugin()")); |
|
108 |
} |
|
109 |
||
110 |
// --------------------------------------------------------------------------- |
|
111 |
// CCCAppMyCardPlugin::CCCAppMyCardPlugin() |
|
112 |
// --------------------------------------------------------------------------- |
|
113 |
// |
|
114 |
CCCAppMyCardPlugin::CCCAppMyCardPlugin() : |
|
115 |
iPbk2UiControlResource( *iCoeEnv ), |
|
116 |
iCommonUiResourceFile( *iCoeEnv ), |
|
117 |
iCommandsResourceFile( *iCoeEnv ) |
|
118 |
{ |
|
119 |
CCA_DP(KMyCardLogFile, CCA_L("CCCAppMyCardPlugin::CCCAppMyCardPlugin()")); |
|
120 |
} |
|
121 |
||
122 |
// --------------------------------------------------------------------------- |
|
123 |
// CCCAppMyCardPlugin::ConstructL |
|
124 |
// --------------------------------------------------------------------------- |
|
125 |
// |
|
126 |
void CCCAppMyCardPlugin::ConstructL() |
|
127 |
{ |
|
128 |
CCA_DP(KMyCardLogFile, CCA_L("CCCAppMyCardPlugin::ConstructL()")); |
|
129 |
// ConstructL should be as light as possible. |
|
130 |
||
131 |
//prepare view resources before creating command handler and mycard (was called on PreparePluginViewL before) |
|
132 |
PrepareViewResourcesL(); |
|
133 |
||
134 |
iMyCard = CCCAppMyCard::NewL( *this ); |
|
135 |
} |
|
136 |
||
137 |
// --------------------------------------------------------------------------- |
|
138 |
// CCCAppMyCardPlugin::MyCard |
|
139 |
// --------------------------------------------------------------------------- |
|
140 |
// |
|
141 |
CCCAppMyCard& CCCAppMyCardPlugin::MyCard() |
|
142 |
{ |
|
143 |
return *iMyCard; |
|
144 |
} |
|
145 |
||
146 |
// --------------------------------------------------------------------------- |
|
147 |
// CCCAppMyCardPlugin::Model |
|
148 |
// --------------------------------------------------------------------------- |
|
149 |
// |
|
150 |
CSpbContactDataModel& CCCAppMyCardPlugin::Model() |
|
151 |
{ |
|
152 |
return *iModel; |
|
153 |
} |
|
154 |
||
155 |
// --------------------------------------------------------------------------- |
|
156 |
// CCCAppMyCardPlugin::PreparePluginViewL |
|
157 |
// --------------------------------------------------------------------------- |
|
158 |
// |
|
159 |
void CCCAppMyCardPlugin::PreparePluginViewL( |
|
160 |
MCCAppPluginParameter& aPluginParameter ) |
|
161 |
{ |
|
162 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::PreparePluginViewL()")); |
|
163 |
||
164 |
iModel = CSpbContactDataModel::NewL( |
|
165 |
iMyCard->ContactManager(), *iCoeEnv, R_MYCARD_CLIP_FIELD_SELECTOR ); |
|
166 |
||
167 |
BaseConstructL( R_CCAMYCARD_VIEW ); |
|
168 |
MCCAParameter& param = aPluginParameter.CCAppLaunchParameter(); |
|
169 |
if( param.ContactDataFlag() == MCCAParameter::EContactLink ) |
|
170 |
{ |
|
171 |
HBufC& data = param.ContactDataL(); |
|
172 |
HBufC8* data8 = HBufC8::NewLC( data.Size() ); |
|
173 |
data8->Des().Copy( data ); |
|
174 |
CVPbkContactLinkArray* array = CVPbkContactLinkArray::NewLC( |
|
175 |
*data8, iMyCard->ContactManager().ContactStoresL() ); |
|
176 |
if( array->Count() ) |
|
177 |
{ |
|
178 |
iMyCard->SetLinkL( array->At( 0 ) ); |
|
179 |
} |
|
180 |
CleanupStack::PopAndDestroy( 2 ); // data, array |
|
181 |
} |
|
182 |
else if( param.ContactDataFlag() == MCCAParameter::EContactDataModel ) |
|
183 |
{ |
|
184 |
HBufC& cntData = param.ContactDataL(); |
|
185 |
TPtrC8 data( (TUint8*)cntData.Ptr(), cntData.Size() ); |
|
186 |
RDesReadStream stream( data ); |
|
187 |
CleanupClosePushL( stream ); |
|
188 |
iModel->InternalizeL( stream ); |
|
189 |
CleanupStack::PopAndDestroy(); // strean |
|
190 |
||
191 |
MVPbkContactLink* link = iModel->ContactLink(); |
|
192 |
if( link ) |
|
193 |
{ |
|
194 |
iMyCard->SetLinkL( *link ); |
|
195 |
} |
|
196 |
else |
|
197 |
{ |
|
198 |
// model without a link means that mycard does not exist. |
|
199 |
iMyCard->ForceCreateMyCard(); |
|
200 |
} |
|
201 |
} |
|
202 |
||
203 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::PreparePluginViewL()")); |
|
204 |
} |
|
205 |
||
206 |
// --------------------------------------------------------------------------- |
|
207 |
// CCCAppMyCardPlugin::DoActivateL |
|
208 |
// --------------------------------------------------------------------------- |
|
209 |
// |
|
210 |
void CCCAppMyCardPlugin::DoActivateL( |
|
211 |
const TVwsViewId& aPrevViewId, |
|
212 |
TUid aCustomMessageId, |
|
213 |
const TDesC8& aCustomMessage ) |
|
214 |
{ |
|
215 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::DoActivateL()")); |
|
216 |
||
217 |
// Forward the activation-call to base-class |
|
218 |
CCCAppViewPluginAknView::DoActivateL( |
|
219 |
aPrevViewId, aCustomMessageId, aCustomMessage ); |
|
220 |
||
221 |
iMyCard->FetchMyCardL(); |
|
222 |
||
223 |
// Set view title |
|
224 |
HBufC* title = iCoeEnv->AllocReadResourceLC( R_QTN_CCA_TITLE_MY_CARD ); |
|
225 |
SetTitleL( *title ); |
|
226 |
CleanupStack::PopAndDestroy( title ); |
|
227 |
||
228 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::DoActivateL()")); |
|
229 |
} |
|
230 |
||
231 |
// --------------------------------------------------------------------------- |
|
232 |
// CCCAppMyCardPlugin::DoDeactivate |
|
233 |
// --------------------------------------------------------------------------- |
|
234 |
// |
|
235 |
void CCCAppMyCardPlugin::DoDeactivate() |
|
236 |
{ |
|
237 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::DoDeactivate()")); |
|
238 |
||
239 |
// Forward the deactivation-call to base-class |
|
240 |
CCCAppViewPluginAknView::DoDeactivate(); |
|
241 |
||
242 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::DoDeactivate()")); |
|
243 |
} |
|
244 |
||
245 |
// --------------------------------------------------------------------------- |
|
246 |
// CCCAppMyCardPlugin::ProvideBitmapL |
|
247 |
// --------------------------------------------------------------------------- |
|
248 |
// |
|
249 |
void CCCAppMyCardPlugin::ProvideBitmapL( |
|
250 |
TCCAppIconType aIconType, |
|
251 |
CAknIcon& aIcon ) |
|
252 |
{ |
|
253 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::ProvideBitmapL()")); |
|
254 |
||
255 |
if ( ECCAppTabIcon == aIconType ) |
|
256 |
{ |
|
257 |
// CCA expects to always receive real icons. MyCard does not have |
|
258 |
// tab icon defined, so provide some dummy icons. |
|
259 |
aIcon.SetBitmap( new(ELeave) CFbsBitmap ); |
|
260 |
aIcon.SetMask( new(ELeave) CFbsBitmap ); |
|
261 |
} |
|
262 |
||
263 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::ProvideBitmapL()")); |
|
264 |
} |
|
265 |
||
266 |
// --------------------------------------------------------------------------- |
|
267 |
// CCCAppMyCardPlugin::CCCAppViewPluginBaseExtension |
|
268 |
// --------------------------------------------------------------------------- |
|
269 |
// |
|
270 |
TAny* CCCAppMyCardPlugin::CCCAppViewPluginBaseExtension( TUid aExtensionUid ) |
|
271 |
{ |
|
272 |
if ( aExtensionUid == KMCCAppViewPluginBaseExtension2Uid ) |
|
273 |
{ |
|
274 |
return static_cast<MCCAppViewPluginBase2*>( this ); |
|
275 |
} |
|
276 |
return NULL; |
|
277 |
} |
|
278 |
||
279 |
// --------------------------------------------------------------------------- |
|
280 |
// CCCAppMyCardPlugin::HandleCommandL |
|
281 |
// --------------------------------------------------------------------------- |
|
282 |
// |
|
283 |
void CCCAppMyCardPlugin::HandleCommandL( TInt aCommand ) |
|
284 |
{ |
|
285 |
CCA_DP(KMyCardLogFile, |
|
286 |
CCA_L("->CCCAppMyCardPlugin::HandleCommandL command=%d"), aCommand ); |
|
287 |
||
288 |
switch( aCommand ) |
|
289 |
{ |
|
290 |
case ECCAppMyCardCmdEdit: |
|
291 |
{ |
|
292 |
TInt index; |
|
293 |
MVPbkStoreContact& storeContact = iMyCard->StoreContact(); |
|
294 |
||
295 |
TRAPD( err, |
|
296 |
{ |
|
297 |
index = iMyCard->PresentationContactL().PresentationFields().StoreIndexOfField( 0 ); |
|
298 |
||
299 |
MVPbkBaseContactField* field = storeContact.Fields().FieldAtLC( index ); |
|
300 |
||
301 |
const MVPbkFieldType* type = field->BestMatchingFieldType(); |
|
302 |
const TArray<TVPbkFieldVersitProperty> fieldProperty = type->VersitProperties(); |
|
303 |
||
304 |
if( fieldProperty.Count() ) |
|
305 |
{ |
|
306 |
const TVPbkFieldVersitProperty property = fieldProperty[0]; |
|
307 |
||
308 |
if( property.Name() == EVPbkVersitNameADR ) |
|
309 |
{ |
|
310 |
index = KErrNotSupported; |
|
311 |
} |
|
312 |
} |
|
313 |
||
314 |
if( field ) |
|
315 |
{ |
|
316 |
CleanupStack::PopAndDestroy( field ); |
|
317 |
} |
|
318 |
||
319 |
EditL( index ); |
|
320 |
} ); |
|
321 |
||
322 |
if( err != KErrNone ) |
|
323 |
{ |
|
324 |
HandleError( err ); |
|
325 |
} |
|
326 |
break; |
|
327 |
} |
|
328 |
case ECCappMyCardCmdSendVCard: |
|
329 |
{ |
|
330 |
SendBusinessCardL(); |
|
331 |
break; |
|
332 |
} |
|
333 |
case ECCappMyCardCmdDelete: |
|
334 |
{ |
|
335 |
HBufC* prompt = |
|
336 |
StringLoader::LoadLC( R_QTN_PHOB_MY_CARD_CLEAR_CONFIRM ); |
|
337 |
CAknQueryDialog* dlg = CAknQueryDialog::NewL(); |
|
338 |
if( dlg->ExecuteLD( R_PBK2_GENERAL_CONFIRMATION_QUERY, *prompt ) ) |
|
339 |
{ |
|
340 |
iMyCard->PresentationContactL().DeleteL( *iMyCard ); |
|
341 |
} |
|
342 |
CleanupStack::PopAndDestroy( prompt ); |
|
343 |
break; |
|
344 |
} |
|
345 |
default: |
|
346 |
{ |
|
347 |
// Forward rest to base class |
|
348 |
CCCAppViewPluginAknView::HandleCommandL( aCommand ); |
|
349 |
} |
|
350 |
} |
|
351 |
||
352 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::HandleCommandL()")); |
|
353 |
} |
|
354 |
||
355 |
||
356 |
// --------------------------------------------------------------------------- |
|
357 |
// CCCAppMyCardPlugin::EditL |
|
358 |
// --------------------------------------------------------------------------- |
|
359 |
// |
|
360 |
void CCCAppMyCardPlugin::EditL( TInt aFocusedFieldIndex ) |
|
361 |
{ |
|
362 |
iMyCard->EditContactL( aFocusedFieldIndex ); |
|
363 |
} |
|
364 |
||
365 |
// --------------------------------------------------------------------------- |
|
366 |
// CCCAppMyCardPlugin::HandleError |
|
367 |
// --------------------------------------------------------------------------- |
|
368 |
// |
|
369 |
void CCCAppMyCardPlugin::HandleError( TInt aError ) |
|
370 |
{ |
|
371 |
CCoeEnv::Static()->HandleError( aError ); |
|
372 |
} |
|
373 |
||
374 |
// --------------------------------------------------------------------------- |
|
375 |
// CCCAppMyCardPlugin::NewContainerL |
|
376 |
// --------------------------------------------------------------------------- |
|
377 |
// |
|
378 |
void CCCAppMyCardPlugin::NewContainerL() |
|
379 |
{ |
|
380 |
iOwnContainer = new (ELeave) CCCAppMyCardContainer( *this ); |
|
381 |
iContainer = iOwnContainer; |
|
382 |
} |
|
383 |
||
384 |
// --------------------------------------------------------------------------- |
|
385 |
// CCCAppMyCardPlugin::PluginBusy |
|
386 |
// --------------------------------------------------------------------------- |
|
387 |
// |
|
388 |
TBool CCCAppMyCardPlugin::PluginBusy() |
|
389 |
{ |
|
390 |
return EFalse; |
|
391 |
} |
|
392 |
||
393 |
// --------------------------------------------------------------------------- |
|
394 |
// CCCAppMyCardPlugin::Id |
|
395 |
// --------------------------------------------------------------------------- |
|
396 |
// |
|
397 |
TUid CCCAppMyCardPlugin::Id() const |
|
398 |
{ |
|
399 |
return TUid::Uid( KCCAMyCardPluginImplmentationUid ); |
|
400 |
} |
|
401 |
||
402 |
// --------------------------------------------------------------------------- |
|
403 |
// CCCAppMyCardPlugin::PrepareViewResourcesL |
|
404 |
// --------------------------------------------------------------------------- |
|
405 |
// |
|
406 |
void CCCAppMyCardPlugin::PrepareViewResourcesL() |
|
407 |
{ |
|
408 |
CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::PrepareViewResourcesL()")); |
|
409 |
||
410 |
// MyCard own resource file |
|
411 |
TFileName fileName( KDC_RESOURCE_FILES_DIR ); |
|
412 |
fileName.Append( KMyCardResourceFileName ); |
|
413 |
BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); |
|
414 |
iResourceLoader.OpenL( fileName ); |
|
415 |
||
416 |
/// Phonebook 2 UI controls resource |
|
417 |
fileName.Copy( KDC_RESOURCE_FILES_DIR ); |
|
418 |
fileName.Append( KMyCardPbk2UiControlsResFileName ); |
|
419 |
BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); |
|
420 |
iPbk2UiControlResource.OpenL( fileName ); |
|
421 |
||
422 |
// commands |
|
423 |
fileName.Copy( KDC_RESOURCE_FILES_DIR ); |
|
424 |
fileName.Append( KPbk2CommandsDllResFileName ); |
|
425 |
BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); |
|
426 |
iCommandsResourceFile.OpenL( fileName ); |
|
427 |
||
428 |
// common ui |
|
429 |
fileName.Copy( KDC_RESOURCE_FILES_DIR ); |
|
430 |
fileName.Append( KPbk2CommonUiDllResFileName ); |
|
431 |
BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); |
|
432 |
iCommonUiResourceFile.OpenL( fileName ); |
|
433 |
||
434 |
CCA_DP(KMyCardLogFile, CCA_L("<-CCCAppMyCardPlugin::PrepareViewResourcesL()")); |
|
435 |
} |
|
436 |
||
437 |
// --------------------------------------------------------------------------- |
|
438 |
// CCCAppMyCardPlugin::CommandHandlerL |
|
439 |
// --------------------------------------------------------------------------- |
|
440 |
// |
|
441 |
CPbk2CommandHandler* CCCAppMyCardPlugin::CommandHandlerL() |
|
442 |
{ |
|
443 |
// create command handler if not created yet |
|
444 |
if( !iCommandHandler ) |
|
445 |
{ |
|
446 |
// command handler |
|
447 |
iCommandHandler = CPbk2CommandHandler::NewL(); |
|
448 |
} |
|
449 |
return iCommandHandler; |
|
450 |
} |
|
451 |
||
452 |
||
453 |
// --------------------------------------------------------------------------- |
|
454 |
// CCCAppMyCardPlugin::SendBusinessCardL |
|
455 |
// --------------------------------------------------------------------------- |
|
456 |
// |
|
457 |
void CCCAppMyCardPlugin::SendBusinessCardL() |
|
458 |
{ |
|
459 |
// send business card |
|
460 |
CommandHandlerL()->HandleCommandL( EPbk2CmdSend, *iOwnContainer, NULL ); |
|
461 |
} |
|
462 |
||
463 |
// --------------------------------------------------------------------------- |
|
464 |
// ProcessCommandL |
|
465 |
// --------------------------------------------------------------------------- |
|
466 |
// |
|
467 |
void CCCAppMyCardPlugin::ProcessCommandL(TInt aCommandId) |
|
468 |
{ |
|
469 |
TInt err = KErrNone; |
|
470 |
||
471 |
switch(aCommandId) |
|
472 |
{ |
|
473 |
case ECCAppMyCardCmdStylusViewImageCmd: |
|
474 |
TRAP( err, ViewImageCmdL() ); |
|
475 |
break; |
|
476 |
||
477 |
case ECCAppMyCardCmdStylusChangeImageCmd: |
|
478 |
TRAP( err, ChangeImageCmdL() ); |
|
479 |
break; |
|
480 |
||
481 |
case ECCAppMyCardCmdStylusRemoveImageCmd: |
|
482 |
TRAP( err, RemoveImageCmdL() ); |
|
483 |
break; |
|
484 |
||
485 |
case ECCAppMyCardCmdStylusAddImageCmd: |
|
486 |
TRAP( err, AddImageCmdL() ); |
|
487 |
break; |
|
488 |
||
489 |
case ECCAppMyCardCmdStylusCopyDetailCmd: |
|
490 |
TRAP( err, CopyDetailL() ); |
|
491 |
break; |
|
492 |
||
493 |
default: |
|
494 |
CAknView::ProcessCommandL( aCommandId ); |
|
495 |
break; |
|
496 |
} |
|
497 |
||
498 |
if( err != KErrNone ) |
|
499 |
{ |
|
500 |
HandleError( err ); |
|
501 |
} |
|
502 |
} |
|
503 |
||
504 |
// --------------------------------------------------------------------------- |
|
505 |
// CCCAppMyCardPlugin::RemoveImageCmdL |
|
506 |
// --------------------------------------------------------------------------- |
|
507 |
// |
|
508 |
void CCCAppMyCardPlugin::RemoveImageCmdL() |
|
509 |
{ |
|
510 |
CommandHandlerL()->HandleCommandL( EPbk2CmdRemoveImage, *iOwnContainer, NULL ); |
|
511 |
} |
|
512 |
||
513 |
// --------------------------------------------------------------------------- |
|
514 |
// CCCAppMyCardPlugin::AddImageCmdL |
|
515 |
// --------------------------------------------------------------------------- |
|
516 |
// |
|
517 |
void CCCAppMyCardPlugin::AddImageCmdL() |
|
518 |
{ |
|
519 |
CommandHandlerL()->HandleCommandL( EPbk2CmdAddImage, *iOwnContainer, NULL ); |
|
520 |
} |
|
521 |
||
522 |
// --------------------------------------------------------------------------- |
|
523 |
// CCCAppMyCardPlugin::ViewImageCmdL |
|
524 |
// --------------------------------------------------------------------------- |
|
525 |
// |
|
526 |
void CCCAppMyCardPlugin::ViewImageCmdL() |
|
527 |
{ |
|
528 |
CommandHandlerL()->HandleCommandL( EPbk2CmdViewImage, *iOwnContainer, NULL ); |
|
529 |
} |
|
530 |
||
531 |
// --------------------------------------------------------------------------- |
|
532 |
// CCCAppMyCardPlugin::ChangeImageCmdL |
|
533 |
// --------------------------------------------------------------------------- |
|
534 |
// |
|
535 |
void CCCAppMyCardPlugin::ChangeImageCmdL() |
|
536 |
{ |
|
537 |
CommandHandlerL()->HandleCommandL( EPbk2CmdChangeImage, *iOwnContainer, NULL ); |
|
538 |
} |
|
539 |
||
540 |
// --------------------------------------------------------------------------- |
|
541 |
// CCCAppMyCardContainer::CopyDetailL |
|
542 |
// --------------------------------------------------------------------------- |
|
543 |
// |
|
544 |
void CCCAppMyCardPlugin::CopyDetailL() |
|
545 |
{ |
|
546 |
CommandHandlerL()->HandleCommandL( EPbk2CmdCopyDetail, *iOwnContainer, NULL ); |
|
547 |
} |
|
548 |
||
549 |
void CCCAppMyCardPlugin::EnableOptionsMenu( TBool aEnable ) |
|
550 |
{ |
|
551 |
Cba()->MakeCommandVisibleByPosition( |
|
552 |
CEikButtonGroupContainer::ELeftSoftkeyPosition, aEnable ); |
|
553 |
} |
|
554 |
// End of File |