68 #include "cimcvenginefactory.h" |
68 #include "cimcvenginefactory.h" |
69 #include "mimcvenginefactory.h" |
69 #include "mimcvenginefactory.h" |
70 #include <imconnectionproviderconsts.h> |
70 #include <imconnectionproviderconsts.h> |
71 #include <e32property.h> |
71 #include <e32property.h> |
72 |
72 |
|
73 // AIW Include Files |
|
74 #include <aiwgenericparam.h> |
|
75 #include <aiwcontactassigndatatypes.h> |
|
76 #include <aiwdialdataext.h> |
|
77 #include <aiwcommon.hrh> |
|
78 #include <aiwservicehandler.h> |
|
79 #include <aiwdialdata.h> |
|
80 #include <CommonPhoneParser.h> |
|
81 |
|
82 |
73 // Dll Uid of vimpstui, to maintain uniqueness of help uid |
83 // Dll Uid of vimpstui, to maintain uniqueness of help uid |
74 const TUid KHelpUid = { 0x2001FDC2 } ; |
84 const TUid KHelpUid = { 0x2001FDC2 } ; |
75 // ============================ MEMBER FUNCTIONS =============================== |
85 // ============================ MEMBER FUNCTIONS =============================== |
76 |
86 |
77 // ----------------------------------------------------------------------------- |
87 // ----------------------------------------------------------------------------- |
129 iFromMe = NULL; |
139 iFromMe = NULL; |
130 iToMe = NULL; |
140 iToMe = NULL; |
131 |
141 |
132 //Creates manager for menu extension |
142 //Creates manager for menu extension |
133 iMenuExtManager = CIMCVMenuExtensionManager::NewL(); |
143 iMenuExtManager = CIMCVMenuExtensionManager::NewL(); |
134 |
144 iAiwServiceHandler = CAiwServiceHandler::NewL(); |
|
145 iAiwServiceHandler->AttachL( AIW_INTERNETCALL); |
|
146 iAiwServiceHandler->AttachMenuL( R_CONVERSATIONVIEW_VIEW_MENU,AIW_INTERNETCALL ); |
|
147 |
135 iConvViewDel = EFalse; |
148 iConvViewDel = EFalse; |
136 iDetailViewOpen = EFalse; |
149 iDetailViewOpen = EFalse; |
137 IM_CV_LOGS(TXT("CIMCVAppView::ConstructL() end") ); |
150 IM_CV_LOGS(TXT("CIMCVAppView::ConstructL() end") ); |
138 } |
151 } |
139 |
152 |
224 } |
243 } |
225 switch( aResourceId ) |
244 switch( aResourceId ) |
226 { |
245 { |
227 case R_CONVERSATIONVIEW_VIEW_MENU: |
246 case R_CONVERSATIONVIEW_VIEW_MENU: |
228 { |
247 { |
|
248 if(iActiveEngine->IsVoipServiceL())// internet call |
|
249 { |
|
250 aMenuPane->SetItemDimmed(KAiwCmdCall, EFalse); |
|
251 CAiwDialDataExt* dialDataExt = CAiwDialDataExt::NewL(); |
|
252 CleanupStack::PushL( dialDataExt ); |
|
253 dialDataExt->SetServiceId( iServiceId ); |
|
254 CAiwGenericParamList& paramList = iAiwServiceHandler->InParamListL(); |
|
255 dialDataExt->FillInParamListL( paramList ); |
|
256 TAiwGenericParam param (EGenericParamSIPAddress); |
|
257 paramList.AppendL( param ); |
|
258 iAiwServiceHandler->InitializeMenuPaneL( *aMenuPane, |
|
259 R_CONVERSATIONVIEW_VIEW_MENU,EIMCVCmdInternetCall,paramList ); |
|
260 CleanupStack::PopAndDestroy( dialDataExt ); |
|
261 } |
|
262 else |
|
263 { |
|
264 aMenuPane->SetItemDimmed(KAiwCmdCall, ETrue); |
|
265 } |
229 if( iContainer->Editor().Editor().TextLength() > 0 ) |
266 if( iContainer->Editor().Editor().TextLength() > 0 ) |
230 { |
267 { |
231 aMenuPane->SetItemDimmed(EIMCVCmdSend, EFalse); |
268 aMenuPane->SetItemDimmed(EIMCVCmdSend, EFalse); |
232 } |
269 } |
233 else |
270 else |
342 //command is executed, hence return. |
379 //command is executed, hence return. |
343 return; |
380 return; |
344 } |
381 } |
345 |
382 |
346 switch ( aCommand ) |
383 switch ( aCommand ) |
347 { |
384 { |
348 |
385 case EIMCVCmdInternetCall: |
349 case EIMCVCmdToolbarDetails: |
386 { |
|
387 // Truncating till ':' if exists - Extracting Userid from "ServiceName:Userid". |
|
388 TInt indexposition = iRecipientUserId->Locate(':'); |
|
389 HBufC* phonenumber = NULL; // Phonenumber = Userid |
|
390 if ( KErrNotFound != indexposition ) |
|
391 { |
|
392 phonenumber = iRecipientUserId->Right(iRecipientUserId->Length() - (indexposition+1)).AllocLC(); |
|
393 } |
|
394 else |
|
395 { |
|
396 phonenumber = iRecipientUserId->AllocLC(); // does't contain ':' |
|
397 } |
|
398 TPtr phonenumberptr( phonenumber->Des ()); |
|
399 CommonPhoneParser::ParsePhoneNumber ( phonenumberptr,CommonPhoneParser::EPhoneClientNumber); |
|
400 CAiwDialDataExt* dialDataExt = CAiwDialDataExt::NewLC(); |
|
401 dialDataExt->SetPhoneNumberL ( phonenumber->Des ()); |
|
402 dialDataExt->SetServiceId(iServiceId); |
|
403 dialDataExt->SetCallType( CAiwDialData::EAIWVoiP); |
|
404 dialDataExt->SetWindowGroup ( CCoeEnv::Static()->RootWin().Identifier() ); |
|
405 CAiwGenericParamList& paramList = iAiwServiceHandler->InParamListL(); |
|
406 dialDataExt->FillInParamListL ( paramList); |
|
407 iAiwServiceHandler->ExecuteServiceCmdL ( KAiwCmdCall,paramList, |
|
408 iAiwServiceHandler->OutParamListL(),0,NULL); |
|
409 CleanupStack::PopAndDestroy(dialDataExt); |
|
410 CleanupStack::PopAndDestroy(phonenumber); |
|
411 break; |
|
412 } |
|
413 case EIMCVCmdToolbarDetails: |
350 //Launch the cca |
414 //Launch the cca |
351 LaunchCcaL(); |
415 LaunchCcaL(); |
352 break; |
416 break; |
353 // flow through |
417 // flow through |
354 case EIMCVCmdSend: |
418 case EIMCVCmdSend: |