|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: implementation for CVIMPSTCmdCall |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 |
|
22 #include "vimpstcmd.hrh" |
|
23 #include "mvimpstcmdobserver.h" |
|
24 #include "cvimpstcmdcall.h" |
|
25 #include "mvimpstprocessarray.h" |
|
26 |
|
27 |
|
28 #include <aiwdialdataext.h> |
|
29 #include <aknpopup.h> |
|
30 #include <aiwcommon.hrh> |
|
31 #include <aiwservicehandler.h> |
|
32 #include <MVPbkContactLink.h> |
|
33 |
|
34 |
|
35 |
|
36 // Constants |
|
37 |
|
38 // -------------------------------------------------------------------------- |
|
39 // CVIMPSTCmdCall::CVIMPSTCmdCall |
|
40 // -------------------------------------------------------------------------- |
|
41 // |
|
42 CVIMPSTCmdCall::CVIMPSTCmdCall( |
|
43 const TInt aCommandId,TInt& aIndex, |
|
44 MVIMPSTProcessArray& mArrayProcess, |
|
45 TInt aWindowGroup, |
|
46 TUint32 aServiceId) : |
|
47 iCommandId( aCommandId ), |
|
48 iIndex(aIndex), |
|
49 iArrayProcess(mArrayProcess), |
|
50 iWindowGroup(aWindowGroup), |
|
51 iServiceId(aServiceId) |
|
52 { |
|
53 } |
|
54 |
|
55 // -------------------------------------------------------------------------- |
|
56 // CVIMPSTCmdCall::~CVIMPSTCmdCall |
|
57 // -------------------------------------------------------------------------- |
|
58 // |
|
59 CVIMPSTCmdCall::~CVIMPSTCmdCall() |
|
60 { |
|
61 |
|
62 } |
|
63 |
|
64 // -------------------------------------------------------------------------- |
|
65 // CVIMPSTCmdCall::NewL |
|
66 // -------------------------------------------------------------------------- |
|
67 // |
|
68 CVIMPSTCmdCall* CVIMPSTCmdCall::NewL( |
|
69 const TInt aCommandId,TInt& aIndex, |
|
70 MVIMPSTProcessArray& aArrayProcess, |
|
71 TInt aWindowGroup, |
|
72 TUint32 aServiceId) |
|
73 { |
|
74 CVIMPSTCmdCall* self = new (ELeave ) CVIMPSTCmdCall( aCommandId,aIndex, |
|
75 aArrayProcess, aWindowGroup, |
|
76 aServiceId); |
|
77 self->ConstructL(); //use contsurctL if necessary |
|
78 return self; |
|
79 } |
|
80 // -------------------------------------------------------------------------- |
|
81 // CVIMPSTCmdCall::ConstructL |
|
82 // -------------------------------------------------------------------------- |
|
83 // |
|
84 void CVIMPSTCmdCall::ConstructL() |
|
85 { |
|
86 |
|
87 } |
|
88 |
|
89 // -------------------------------------------------------------------------- |
|
90 // CVIMPSTCmdCall::ExecuteLD |
|
91 // -------------------------------------------------------------------------- |
|
92 // |
|
93 void CVIMPSTCmdCall::ExecuteLD() |
|
94 { |
|
95 // CHAT_DP_FUNC_ENTER("CVIMPSTCallCmd::ExecuteLD"); |
|
96 //push to the cleanupstack |
|
97 CleanupStack::PushL( this ); |
|
98 |
|
99 CAiwServiceHandler * aiwServiceHandler = CAiwServiceHandler::NewL(); |
|
100 |
|
101 CAiwDialDataExt* dialDataExt = CAiwDialDataExt::NewL(); |
|
102 CleanupStack::PushL( dialDataExt ); |
|
103 |
|
104 dialDataExt->SetWindowGroup( iWindowGroup ); |
|
105 |
|
106 HBufC8* pack = iArrayProcess.ContactLink(iIndex)->PackLC(); |
|
107 |
|
108 dialDataExt->SetContactLinkL( *pack ); |
|
109 |
|
110 dialDataExt->SetCallType( CAiwDialData::EAIWVoiP ); |
|
111 |
|
112 //dialDataExt->SetServiceId( iServiceId ); |
|
113 |
|
114 |
|
115 CAiwGenericParamList& paramList = |
|
116 aiwServiceHandler->InParamListL(); |
|
117 dialDataExt->FillInParamListL( paramList ); |
|
118 |
|
119 aiwServiceHandler->ExecuteServiceCmdL( |
|
120 KAiwCmdCall, |
|
121 paramList, |
|
122 aiwServiceHandler->OutParamListL(), |
|
123 NULL); // No need for callback |
|
124 |
|
125 |
|
126 CleanupStack::PopAndDestroy( pack ); |
|
127 CleanupStack::PopAndDestroy( dialDataExt ); |
|
128 |
|
129 if(iObserver) |
|
130 { |
|
131 iObserver->CommandFinishedL(*this); |
|
132 } |
|
133 // CHAT_DP_FUNC_ENTER("CVIMPSTCallCmd:: CommandFinished"); |
|
134 CleanupStack::PopAndDestroy(); |
|
135 // CHAT_DP_FUNC_DONE("CVIMPSTCallCmd::ExecuteLD"); |
|
136 } |
|
137 |
|
138 |
|
139 // -------------------------------------------------------------------------- |
|
140 // CVIMPSTCmdCall::AddObserver |
|
141 // -------------------------------------------------------------------------- |
|
142 // |
|
143 void CVIMPSTCmdCall::AddObserver( MVIMPSTCmdObserver& aObserver ) |
|
144 { |
|
145 // store the observer to notify the command completion |
|
146 iObserver = &aObserver; |
|
147 } |
|
148 |
|
149 |
|
150 // -------------------------------------------------------------------------- |
|
151 // CVIMPSTCmdCall::CommandId |
|
152 // -------------------------------------------------------------------------- |
|
153 // |
|
154 TInt CVIMPSTCmdCall::CommandId() const |
|
155 { |
|
156 return iCommandId; |
|
157 } |
|
158 |
|
159 // -------------------------------------------------------------------------- |
|
160 // CVIMPSTCmdCall::Result |
|
161 // -------------------------------------------------------------------------- |
|
162 // |
|
163 TInt CVIMPSTCmdCall::Result() const |
|
164 { |
|
165 //return valid data regd the command operation |
|
166 return KErrNone; |
|
167 } |
|
168 |
|
169 |
|
170 |
|
171 // End of File |