diff -r 000000000000 -r 5e5d6b214f4f uiservicetab/vimpstcmdprocess/tsrc/vimpstcmdprocess_utest/data/branch_coverage/indexD43.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uiservicetab/vimpstcmdprocess/tsrc/vimpstcmdprocess_utest/data/branch_coverage/indexD43.html Tue Feb 02 10:12:18 2010 +0200 @@ -0,0 +1,175 @@ + +
+Start/ | End/ | |||
True | False | - | Line | Source |
1 | /* | |||
2 | * =========================================================================== | |||
3 | * Name : cvimstcmdfriendrequest.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 "cvimstcmdfriendrequest.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 "mvimpstenginepresencesubservice.h" | |||
29 | #include "mvimpstenginesubservice.h" | |||
30 | ||||
31 | // Constants | |||
32 | ||||
33 | // -------------------------------------------------------------------------- | |||
34 | // CVIMPSTCmdFriendRequest::CVIMPSTCmdFriendRequest | |||
35 | // -------------------------------------------------------------------------- | |||
36 | // | |||
4 | 4 | 37 | CVIMPSTCmdFriendRequest::CVIMPSTCmdFriendRequest( | |
38 | const TInt aCommandId ,const TDesC& aContactId, | |||
39 | MVIMPSTEngine& aEngine) : | |||
40 | iCommandId( aCommandId ), | |||
41 | iContactId( aContactId ), | |||
42 | iEngine(aEngine) | |||
43 | { | |||
44 | } | |||
45 | ||||
46 | // -------------------------------------------------------------------------- | |||
47 | // CVIMPSTCmdFriendRequest::~CVIMPSTCmdFriendRequest | |||
48 | // -------------------------------------------------------------------------- | |||
49 | // | |||
4 | 4 | 50 | CVIMPSTCmdFriendRequest::~CVIMPSTCmdFriendRequest() | |
51 | { | |||
52 | ||||
53 | } | |||
54 | ||||
55 | // -------------------------------------------------------------------------- | |||
56 | // CVIMPSTCmdFriendRequest::NewL | |||
57 | // -------------------------------------------------------------------------- | |||
58 | // | |||
4 | 0 | 59 | CVIMPSTCmdFriendRequest* CVIMPSTCmdFriendRequest::NewL( | |
60 | const TInt aCommandId,const TDesC& aContactId, | |||
61 | MVIMPSTEngine& aEngine) | |||
62 | { | |||
63 | CVIMPSTCmdFriendRequest* self = new (ELeave ) CVIMPSTCmdFriendRequest( aCommandId ,aContactId, aEngine); | |||
64 | self->ConstructL(); //use contsurctL if necessary | |||
4 | 65 | return self; | ||
66 | } | |||
67 | // -------------------------------------------------------------------------- | |||
68 | // CVIMPSTCmdFriendRequest::ConstructL | |||
69 | // -------------------------------------------------------------------------- | |||
70 | // | |||
4 | 4 | 71 | void CVIMPSTCmdFriendRequest::ConstructL() | |
72 | { | |||
73 | iError = KErrNone; | |||
74 | } | |||
75 | ||||
76 | // -------------------------------------------------------------------------- | |||
77 | // CVIMPSTCmdFriendRequest::ExecuteLD | |||
78 | // -------------------------------------------------------------------------- | |||
79 | // | |||
4 | 4 | 80 | void CVIMPSTCmdFriendRequest::ExecuteLD() | |
81 | { | |||
82 | CHAT_DP_FUNC_ENTER("CVIMPSTCmdFriendRequest::ExecuteLD"); | |||
83 | //push to the cleanupstack | |||
84 | CleanupStack::PushL( this ); | |||
85 | ||||
86 | //Get Presence SubService | |||
87 | MVIMPSTEngineSubService* subService = | |||
88 | (iEngine.SubService(TVIMPSTEnums::EPresence)); | |||
89 | ||||
4 | 0 | - | 90 | if(subService) |
91 | { | |||
92 | MVIMPSTEnginePresenceSubService& presence = | |||
93 | MVIMPSTEnginePresenceSubService::Cast (*subService); | |||
94 | presence.SendPresenceGrantPresentityL(iContactId, ( iCommandId == EFriendAccpeted )); | |||
95 | } | |||
96 | ||||
97 | CHAT_DP_FUNC_ENTER("CVIMPSTCmdFriendRequest:: CommandFinished"); | |||
98 | ||||
2 | 2 | 99 | if(iObserver) | |
100 | { | |||
101 | iObserver->CommandFinishedL(*this); | |||
102 | } | |||
103 | CHAT_DP_FUNC_ENTER("CVIMPSTCmdFriendRequest:: CommandFinished"); | |||
104 | CleanupStack::PopAndDestroy(); | |||
105 | CHAT_DP_FUNC_DONE("CVIMPSTCmdFriendRequest::ExecuteLD"); | |||
106 | } | |||
107 | ||||
108 | ||||
109 | // -------------------------------------------------------------------------- | |||
110 | // CVIMPSTCmdFriendRequest::AddObserver | |||
111 | // -------------------------------------------------------------------------- | |||
112 | // | |||
2 | 2 | 113 | void CVIMPSTCmdFriendRequest::AddObserver( MVIMPSTCmdObserver& aObserver ) | |
114 | { | |||
115 | // store the observer to notify the command completion | |||
116 | iObserver = &aObserver; | |||
117 | } | |||
118 | ||||
119 | ||||
120 | // -------------------------------------------------------------------------- | |||
121 | // CVIMPSTCmdFriendRequest::CommandId | |||
122 | // -------------------------------------------------------------------------- | |||
123 | // | |||
4 | 0 | 124 | TInt CVIMPSTCmdFriendRequest::CommandId() const | |
125 | { | |||
4 | 126 | return iCommandId; | ||
127 | } | |||
128 | ||||
129 | // -------------------------------------------------------------------------- | |||
130 | // CVIMPSTCmdFriendRequest::Result | |||
131 | // -------------------------------------------------------------------------- | |||
132 | // | |||
2 | 0 | 133 | TInt CVIMPSTCmdFriendRequest::Result() const | |
134 | { | |||
135 | //return valid data regd the command operation | |||
2 | 136 | return iError; | ||
137 | } | |||
138 | ||||
139 | // End of File | |||
***TER 93% (14/15) of SOURCE FILE cvimstcmdfriendrequest.cpp |