phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/CCCAppCommLauncherPbkCmd.cpp
equal
deleted
inserted
replaced
31 #include <MPbk2Command.h> |
31 #include <MPbk2Command.h> |
32 #include <Pbk2MenuFilteringFlags.hrh> |
32 #include <Pbk2MenuFilteringFlags.hrh> |
33 #include <coemain.h> |
33 #include <coemain.h> |
34 #include <aknnotewrappers.h> |
34 #include <aknnotewrappers.h> |
35 #include <StringLoader.h> |
35 #include <StringLoader.h> |
36 #include <CPbk2CommandStore.h> |
|
37 |
36 |
38 _LIT(KPbk2CommandsDllResFileName, "Pbk2Commands.rsc"); |
37 _LIT(KPbk2CommandsDllResFileName, "Pbk2Commands.rsc"); |
39 _LIT(KPbk2UiControlsDllResFileName, "Pbk2UiControls.rsc"); |
38 _LIT(KPbk2UiControlsDllResFileName, "Pbk2UiControls.rsc"); |
40 _LIT(KPbk2CommonUiDllResFileName, "Pbk2CommonUi.rsc" ); |
39 _LIT(KPbk2CommonUiDllResFileName, "Pbk2CommonUi.rsc" ); |
41 |
40 |
375 cmdState.PopCleanup(); |
374 cmdState.PopCleanup(); |
376 } |
375 } |
377 } |
376 } |
378 |
377 |
379 // --------------------------------------------------------------------------- |
378 // --------------------------------------------------------------------------- |
380 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdSendBCardL |
|
381 // --------------------------------------------------------------------------- |
|
382 // |
|
383 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdSendBCardL( const TDesC8& aContact ) |
|
384 { |
|
385 TCCAppCommandState& cmdState( iPlugin.CommandState() ); |
|
386 if ( !cmdState.IsRunning() ) |
|
387 { |
|
388 cmdState.SetRunningAndPushCleanupL(); |
|
389 |
|
390 iPbk2CommandId = EPbk2CmdSend; |
|
391 |
|
392 if( iLinks ) |
|
393 { |
|
394 delete iLinks; |
|
395 iLinks = NULL; |
|
396 } |
|
397 |
|
398 iLinks = iAppServices->ContactManager().CreateLinksLC( aContact ); |
|
399 |
|
400 if ( iLinks->Count() > 0 ) |
|
401 { |
|
402 // operation completes by StoreReady, |
|
403 // StoreUnavailable or HandleStoreEventL |
|
404 ( iLinks->At( 0 ) ).ContactStore().OpenL( *this ); |
|
405 } |
|
406 |
|
407 CleanupStack::Pop( 1 ); // iLinks (deleted in destructor) |
|
408 cmdState.PopCleanup(); |
|
409 } |
|
410 } |
|
411 |
|
412 // --------------------------------------------------------------------------- |
|
413 // CCCAppCommLauncherMenuHandler::HandleError |
379 // CCCAppCommLauncherMenuHandler::HandleError |
414 // --------------------------------------------------------------------------- |
380 // --------------------------------------------------------------------------- |
415 // |
381 // |
416 void CCCAppCommLauncherPbkCmd::HandleError( TInt aError ) |
382 void CCCAppCommLauncherPbkCmd::HandleError( TInt aError ) |
417 { |
383 { |
976 // |
942 // |
977 CPbk2ApplicationServices& CCCAppCommLauncherPbkCmd::ApplicationServices() const |
943 CPbk2ApplicationServices& CCCAppCommLauncherPbkCmd::ApplicationServices() const |
978 { |
944 { |
979 return *iAppServices; |
945 return *iAppServices; |
980 } |
946 } |
981 |
|
982 // -------------------------------------------------------------------------- |
|
983 // CCCAppCommLauncherPbkCmd::DeleteAllRunningCmd |
|
984 // -------------------------------------------------------------------------- |
|
985 // |
|
986 void CCCAppCommLauncherPbkCmd::DeleteAllRunningCmd() |
|
987 { |
|
988 //Close all the pending pbk2commands launched from CCA |
|
989 if ( iPlugin.CommandState().IsRunning() ) |
|
990 { |
|
991 iPlugin.CommandState().SetNotRunning(); |
|
992 if ( iCommandHandler ) |
|
993 { |
|
994 CPbk2CommandStore* cmdStore( iCommandHandler->CommandStore() ); |
|
995 if ( cmdStore ) |
|
996 { |
|
997 cmdStore->DestroyAllCommands(); |
|
998 } |
|
999 } |
|
1000 } |
|
1001 } |
|
1002 |
|