CTC++ Coverage Report - Execution Profile #28/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\cvimpstcmdchangeownmessage.cpp
Instrumentation mode: function-decision
TER: 93 % ( 14/ 15)

Start/ | End/ |  |  |
True | False | - | Line | Source
| 1 | /*
| 2 | * ===========================================================================
| 3 | * Name : cvimpstcmdchangeownmessage.cpp
| 4 | * Part of : IMUiServiceTab/vimpstcmdprocess
| 5 | * Description :
| 6 | * Version : %version: 4 %
| 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 "cvimpstcmdchangeownmessage.h"
| 21 |
| 22 | #include "vimpstcmd.hrh"
| 23 | #include "mvimpstcmdobserver.h"
| 24 | #include "vimpstdebugprint.h"
| 25 |
| 26 | #include <e32def.h>
| 27 | #include "mvimpstengine.h"
| 28 | #include "mvimpstenginesubservice.h"
| 29 | #include "mvimpstenginepresencesubservice.h"
| 30 |
| 31 | // Constants
| 32 |
| 33 | // --------------------------------------------------------------------------
| 34 | // CVIMPSTCmdChangeOwnMessage::CVIMPSTCmdChangeOwnMessage
| 35 | // --------------------------------------------------------------------------
| 36 | //
4 | 4 |  | 37 | CVIMPSTCmdChangeOwnMessage::CVIMPSTCmdChangeOwnMessage(
| 38 | const TInt aCommandId ,TStatusAndStatusText aStatus,
| 39 | MVIMPSTEngine& aEngine) :
| 40 | iCommandId( aCommandId ),
| 41 | iStatus(aStatus.iStatus),
| 42 | iEngine(aEngine)
| 43 | {
| 44 | iStatusText.Copy(aStatus.iStatusText);
| 45 | }
| 46 |
| 47 | // --------------------------------------------------------------------------
| 48 | // CVIMPSTCmdChangeOwnMessage::~CVIMPSTCmdChangeOwnMessage
| 49 | // --------------------------------------------------------------------------
| 50 | //
4 | 4 |  | 51 | CVIMPSTCmdChangeOwnMessage::~CVIMPSTCmdChangeOwnMessage()
| 52 | {
| 53 |
| 54 | }
| 55 |
| 56 | // --------------------------------------------------------------------------
| 57 | // CVIMPSTCmdChangeOwnMessage::NewL
| 58 | // --------------------------------------------------------------------------
| 59 | //
4 | 0 |  | 60 | CVIMPSTCmdChangeOwnMessage* CVIMPSTCmdChangeOwnMessage::NewL(
| 61 | const TInt aCommandId,TStatusAndStatusText aStatus,
| 62 | MVIMPSTEngine& aEngine)
| 63 | {
| 64 | CVIMPSTCmdChangeOwnMessage* self = new (ELeave ) CVIMPSTCmdChangeOwnMessage( aCommandId ,aStatus, aEngine);
| 65 | self->ConstructL(); //use contsurctL if necessary
4 |  |  | 66 | return self;
| 67 | }
| 68 | // --------------------------------------------------------------------------
| 69 | // CVIMPSTCmdChangeOwnMessage::ConstructL
| 70 | // --------------------------------------------------------------------------
| 71 | //
4 | 4 |  | 72 | void CVIMPSTCmdChangeOwnMessage::ConstructL()
| 73 | {
| 74 | iError = KErrNone;
| 75 | }
| 76 |
| 77 | // --------------------------------------------------------------------------
| 78 | // CVIMPSTCmdChangeOwnMessage::ExecuteLD
| 79 | // --------------------------------------------------------------------------
| 80 | //
4 | 4 |  | 81 | void CVIMPSTCmdChangeOwnMessage::ExecuteLD()
| 82 | {
| 83 | CHAT_DP_FUNC_ENTER("CVIMPSTCmdChangeOwnMessage::ExecuteLD");
| 84 | //push to the cleanupstack
| 85 | CleanupStack::PushL( this );
| 86 |
| 87 | //Get Presence SubService
| 88 | MVIMPSTEngineSubService* subService =
| 89 | (iEngine.SubService(TVIMPSTEnums::EPresence));
| 90 |
4 | 0 | - | 91 | if(subService)
| 92 | {
| 93 | MVIMPSTEnginePresenceSubService& presence =
| 94 | MVIMPSTEnginePresenceSubService::Cast (*subService);
| 95 | presence.PublishOwnPresenceL(iStatus, iStatusText);
| 96 | }
| 97 |
| 98 | CHAT_DP_FUNC_ENTER("CVIMPSTCmdChangeOwnMessage:: CommandFinished");
| 99 |
2 | 2 |  | 100 | if(iObserver)
| 101 | {
| 102 | iObserver->CommandFinishedL(*this);
| 103 | }
| 104 | CHAT_DP_FUNC_ENTER("CVIMPSTCmdChangeOwnMessage:: CommandFinished");
| 105 | CleanupStack::PopAndDestroy();
| 106 | CHAT_DP_FUNC_DONE("CVIMPSTCmdChangeOwnMessage::ExecuteLD");
| 107 | }
| 108 |
| 109 |
| 110 | // --------------------------------------------------------------------------
| 111 | // CVIMPSTCmdChangeOwnMessage::AddObserver
| 112 | // --------------------------------------------------------------------------
| 113 | //
2 | 2 |  | 114 | void CVIMPSTCmdChangeOwnMessage::AddObserver( MVIMPSTCmdObserver& aObserver )
| 115 | {
| 116 | // store the observer to notify the command completion
| 117 | iObserver = &aObserver;
| 118 | }
| 119 |
| 120 |
| 121 | // --------------------------------------------------------------------------
| 122 | // CVIMPSTCmdChangeOwnMessage::CommandId
| 123 | // --------------------------------------------------------------------------
| 124 | //
4 | 0 |  | 125 | TInt CVIMPSTCmdChangeOwnMessage::CommandId() const
| 126 | {
4 |  |  | 127 | return iCommandId;
| 128 | }
| 129 |
| 130 | // --------------------------------------------------------------------------
| 131 | // CVIMPSTCmdChangeOwnMessage::Result
| 132 | // --------------------------------------------------------------------------
| 133 | //
2 | 0 |  | 134 | TInt CVIMPSTCmdChangeOwnMessage::Result() const
| 135 | {
| 136 | //return valid data regd the command operation
2 |  |  | 137 | return iError;
| 138 | }
| 139 |
| 140 | // End of File
***TER 93% (14/15) of SOURCE FILE cvimpstcmdchangeownmessage.cpp

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