CTC++ Coverage Report - Execution Profile #26/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\cvimpstcmdcca.cpp
Instrumentation mode: function-decision
TER: 33 % ( 6/ 18)

Start/ | End/ |  |  |
True | False | - | Line | Source
| 1 | /*
| 2 | * ===========================================================================
| 3 | * Name : cvimpstcmdcca.cpp
| 4 | * Part of : IMUiServiceTab/vimpstcmdprocess
| 5 | * Description :
| 6 | * Version : %version: 12 %
| 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 |
| 21 |
| 22 | #include "vimpstcmd.hrh"
| 23 | #include "mvimpstcmdobserver.h"
| 24 | #include "cvimpstcmdcca.h"
| 25 | #include "mvimpstengine.h"
| 26 | #include "MVIMPSTProcessArray.h"
| 27 |
| 28 | #include <MVPbkContactLink.h>
| 29 |
| 30 | #include <e32def.h>
| 31 | #include <e32property.h>
| 32 | #include <imconnectionproviderconsts.h>
| 33 | #include "tvimpstconsts.h"
| 34 | #include "vimpstdetailsviewpluginuids.hrh"
| 35 |
| 36 | // Constants
| 37 |
| 38 | // --------------------------------------------------------------------------
| 39 | // CVIMPSTCmdCCA::CVIMPSTCmdCCA
| 40 | // --------------------------------------------------------------------------
| 41 | //
2 | 2 |  | 42 | CVIMPSTCmdCCA::CVIMPSTCmdCCA(
| 43 | const TInt aCommandId,
| 44 | TInt& aIndex,
| 45 | MCCAConnection* aConnection,
| 46 | MVIMPSTProcessArray& mArrayProcess,
| 47 | MVIMPSTEngine& aEngine ) :
| 48 | iCommandId( aCommandId ),
| 49 | iIndex(aIndex),
| 50 | iConnection(aConnection),
| 51 | iArrayProcess(mArrayProcess),
| 52 | iEngine( aEngine)
| 53 | {
| 54 | }
| 55 |
| 56 | // --------------------------------------------------------------------------
| 57 | // CVIMPSTCmdCCA::~CVIMPSTCmdCCA
| 58 | // --------------------------------------------------------------------------
| 59 | //
0 | 0 | - | 60 | CVIMPSTCmdCCA::~CVIMPSTCmdCCA()
| 61 | {
| 62 | }
| 63 |
| 64 | // --------------------------------------------------------------------------
| 65 | // CVIMPSTCmdCCA::NewL
| 66 | // --------------------------------------------------------------------------
| 67 | //
2 | 0 |  | 68 | CVIMPSTCmdCCA* CVIMPSTCmdCCA::NewL(
| 69 | const TInt aCommandId,TInt& aIndex,
| 70 | MCCAConnection* aConnection,
| 71 | MVIMPSTProcessArray& aArrayProcess,
| 72 | MVIMPSTEngine& aEngine )
| 73 | {
| 74 | CVIMPSTCmdCCA* self = new (ELeave ) CVIMPSTCmdCCA( aCommandId,aIndex,aConnection,aArrayProcess, aEngine );
| 75 | self->ConstructL(); //use contsurctL if necessary
2 |  |  | 76 | return self;
| 77 | }
| 78 | // --------------------------------------------------------------------------
| 79 | // CVIMPSTCmdCCA::ConstructL
| 80 | // --------------------------------------------------------------------------
| 81 | //
2 | 2 |  | 82 | void CVIMPSTCmdCCA::ConstructL()
| 83 | {
| 84 | RProperty::Define(KMeCoPropertyUid, KMeCoXSPDetailsServiceIdKey, RProperty::EInt,
| 85 | ECapabilityReadUserData ,ECapabilityWriteUserData);
| 86 |
| 87 | }
| 88 |
| 89 | // --------------------------------------------------------------------------
| 90 | // CVIMPSTCmdCCA::ExecuteLD
| 91 | // --------------------------------------------------------------------------
| 92 | //
0 | 0 | - | 93 | void CVIMPSTCmdCCA::ExecuteLD()
| 94 | {
| 95 | // CHAT_DP_FUNC_ENTER("CVIMPSTSettingsCmd::ExecuteLD");
| 96 | //push to the cleanupstack
| 97 | CleanupStack::PushL( this );
| 98 |
| 99 | LaunchCcaL();
0 | 0 | - | 100 | if(iObserver)
| 101 | {
| 102 | iObserver->CommandFinishedL(*this);
| 103 | }
| 104 | // CHAT_DP_FUNC_ENTER("CVIMPSTSettingsCmd:: CommandFinished");
| 105 | CleanupStack::PopAndDestroy();
| 106 | // CHAT_DP_FUNC_DONE("CVIMPSTSettingsCmd::ExecuteLD");
| 107 | }
| 108 |
| 109 |
| 110 | // --------------------------------------------------------------------------
| 111 | // CVIMPSTCmdCCA::AddObserver
| 112 | // --------------------------------------------------------------------------
| 113 | //
0 | 0 | - | 114 | void CVIMPSTCmdCCA::AddObserver( MVIMPSTCmdObserver& aObserver )
| 115 | {
| 116 | // store the observer to notify the command completion
| 117 | iObserver = &aObserver;
| 118 | }
| 119 |
| 120 |
| 121 | // --------------------------------------------------------------------------
| 122 | // CVIMPSTCmdCCA::CommandId
| 123 | // --------------------------------------------------------------------------
| 124 | //
2 | 0 |  | 125 | TInt CVIMPSTCmdCCA::CommandId() const
| 126 | {
2 |  |  | 127 | return iCommandId;
| 128 | }
| 129 |
| 130 | // --------------------------------------------------------------------------
| 131 | // CVIMPSTCmdCCA::Result
| 132 | // --------------------------------------------------------------------------
| 133 | //
0 | 0 | - | 134 | TInt CVIMPSTCmdCCA::Result() const
| 135 | {
| 136 | //return valid data regd the command operation
0 |  | - | 137 | return KErrNone;
| 138 | }
| 139 |
| 140 | // --------------------------------------------------------------------------
| 141 | // CVIMPSTCmdCCA::LaunchCcaL
| 142 | // --------------------------------------------------------------------------
| 143 | //
0 | 0 | - | 144 | void CVIMPSTCmdCCA::LaunchCcaL()
| 145 | {
| 146 |
0 | 0 | - | 147 | if ( iParameter )
| 148 | {
| 149 | iParameter->Close();
| 150 | iParameter = NULL;
| 151 | }
| 152 |
| 153 | // The lifetime of this cmd object is too short to hold
| 154 | // iParameterRef, caller of this must own it
| 155 | iParameter = TCCAFactory::NewParameterL();
| 156 | iParameter->SetConnectionFlag(MCCAParameter::ENormal);
| 157 | iParameter->SetContactDataFlag(MCCAParameter::EContactLink);
| 158 |
| 159 | TUid uid( TUid::Null() );
| 160 | uid.iUid = KVIMPSTDetailsViewPluginImplmentationUid + iEngine.ServiceId(); // service details view implementation uid
| 161 | iParameter->SetLaunchedViewUid( uid );
| 162 |
| 163 | RProperty::Set(KMeCoPropertyUid, KMeCoXSPDetailsServiceIdKey, iEngine.ServiceId() );
| 164 |
| 165 | MVPbkContactLink* link = iArrayProcess.ContactLink( iIndex )->CloneLC();
0 | 0 | - | 166 | if (link)
| 167 | {
| 168 | HBufC8* link8 = link->PackLC();
| 169 | HBufC16* link16 = HBufC16::NewLC( link8->Length() );
| 170 | link16->Des().Copy( *link8);
| 171 | iParameter->SetContactDataL(link16->Des() );
| 172 | CleanupStack::PopAndDestroy(3);
| 173 | }
| 174 | // Sync call
| 175 | //iParameter ownership passed to iConnection
| 176 | iConnection->LaunchApplicationL(*iParameter);
| 177 |
| 178 | }
| 179 | // End of File
***TER 33% (6/18) of SOURCE FILE cvimpstcmdcca.cpp

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