CTC++ Coverage Report - Execution Profile #34/43
Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Index | No Index
File: \meco_domain\conversations\uiservicetab\vimpstcmdprocess\src\cvimpstcmdhandler.cpp
Instrumentation mode: function-decision
TER: 0 % ( 0/ 16)

Start/ | End/ |  |  |
True | False | - | Line | Source
| 1 | /*
| 2 | * ===========================================================================
| 3 | * Name : cvimpstcmdhandler.cpp
| 4 | * Part of : IMUiServiceTab/vimpstcmdprocess
| 5 | * Description :
| 6 | * Version : %version: 1 %
| 7 | *
| 8 | * Copyright © 2008 Nokia. All rights reserved.
| 9 | * This material, including documentation and any related computer
| 10 | * programs, is protected by copyright controlled by Nokia. All
| 11 | * rights are reserved. Copying, including reproducing, storing,
| 12 | * adapting or translating, any or all of this material requires the
| 13 | * prior written consent of Nokia. This material also contains
| 14 | * confidential information which may not be disclosed to others
| 15 | * without the prior written consent of Nokia.
| 16 | * ============================================================================
| 17 | */
| 18 |
| 19 | // INCLUDE FILES
| 20 | #include "cvimpstcmdhandler.h"
| 21 | #include "cvimpstcmdfactory.h"
| 22 |
| 23 | #include "mvimpstcmd.h"
| 24 | #include "mvimpstengine.h"
| 25 |
| 26 |
| 27 | // --------------------------------------------------------------------------
| 28 | // CVIMPSTCmdHandler::CVIMPSTCmdHandler
| 29 | // --------------------------------------------------------------------------
| 30 | //
0 | 0 | - | 31 | CVIMPSTCmdHandler::CVIMPSTCmdHandler()
| 32 | {
| 33 | }
| 34 |
| 35 | // --------------------------------------------------------------------------
| 36 | // CVIMPSTCmdHandler::~CVIMPSTCmdHandler
| 37 | // --------------------------------------------------------------------------
| 38 | //
0 | 0 | - | 39 | CVIMPSTCmdHandler::~CVIMPSTCmdHandler()
| 40 | {
| 41 | delete iCommandFactory;
| 42 | }
| 43 |
| 44 | // --------------------------------------------------------------------------
| 45 | // CVIMPSTCmdHandler::NewL
| 46 | // --------------------------------------------------------------------------
| 47 | //
0 | 0 | - | 48 | EXPORT_C CVIMPSTCmdHandler* CVIMPSTCmdHandler::NewL(MVIMPSTEngine& aEngine)
| 49 | {
| 50 | CVIMPSTCmdHandler* self = new(ELeave) CVIMPSTCmdHandler();
| 51 | CleanupStack::PushL(self);
| 52 | self->ConstructL(aEngine);
| 53 | CleanupStack::Pop(self);
0 |  | - | 54 | return self;
| 55 | }
| 56 |
| 57 | // --------------------------------------------------------------------------
| 58 | // CVIMPSTCmdHandler::ConstructL
| 59 | // --------------------------------------------------------------------------
| 60 | //
0 | 0 | - | 61 | inline void CVIMPSTCmdHandler::ConstructL(MVIMPSTEngine& aEngine)
| 62 | {
| 63 | iCommandFactory = CVIMPSTCmdFactory::NewL(aEngine);
| 64 | }
| 65 |
| 66 | // --------------------------------------------------------------------------
| 67 | // CVIMPSTCmdHandler::HandleCommandL
| 68 | // --------------------------------------------------------------------------
| 69 | //
0 | 0 | - | 70 | TBool CVIMPSTCmdHandler::HandleCommandL
| 71 | ( const TImCommandId aCommandId, MVIMPSTCmdObserver* aObserver,
| 72 | TAny* aData )
| 73 | {
| 74 | TBool ret = EFalse;
| 75 |
| 76 | //use the variable aData to set the command related data
| 77 | MVIMPSTCmd* cmd = iCommandFactory->CreateCommandForIdL(
| 78 | aCommandId,aData);
| 79 |
0 | 0 | - | 80 | if (cmd)
| 81 | {
| 82 | cmd->AddObserver(*aObserver);
0 | 0 | - | 83 | TRAPD (err, cmd->ExecuteLD());
0 |  | - | 83 | catch (XLeaveException & l)
0 |  | - | 83 | catch (...)
| 84 | User::LeaveIfError(err);
| 85 | ret = ETrue;
| 86 | }
| 87 |
0 |  | - | 88 | return ret;
| 89 | }
| 90 | // --------------------------------------------------------------------------
| 91 | // CVIMPSTCmdHandler::RegisterEventObserver
| 92 | // --------------------------------------------------------------------------
| 93 | //
0 | 0 | - | 94 | void CVIMPSTCmdHandler::RegisterEventObserverL( MVIMPSTCmdObserver* aObserver )
| 95 | {
| 96 | iCommandFactory->AddObserverL(aObserver);
| 97 |
| 98 | }
| 99 | // --------------------------------------------------------------------------
| 100 | // CVIMPSTCmdHandler::UnRegisterEventObserver
| 101 | // --------------------------------------------------------------------------
| 102 | //
0 | 0 | - | 103 | void CVIMPSTCmdHandler::UnRegisterEventObserver( MVIMPSTCmdObserver* aObserver )
| 104 | {
| 105 | iCommandFactory->RemoveObserver(aObserver);
| 106 | }
| 107 | // --------------------------------------------------------------------------
| 108 | // CVIMPSTCmdHandler::GetProcessInterface
| 109 | // --------------------------------------------------------------------------
| 110 | //
0 | 0 | - | 111 | MVIMPSTProcessArray& CVIMPSTCmdHandler::GetProcessInterface()
| 112 | {
0 |  | - | 113 | return iCommandFactory->GetProcessInterface();
| 114 | }
| 115 |
| 116 |
| 117 | // End of File
***TER 0% (0/16) of SOURCE FILE cvimpstcmdhandler.cpp

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Top | Index | No Index