45 MAsyncLinkCreationObserver& aObserver, CMccUlDlClient* aSession ) : |
45 MAsyncLinkCreationObserver& aObserver, CMccUlDlClient* aSession ) : |
46 CActive( EPriorityStandard ), iObserver( aObserver ), |
46 CActive( EPriorityStandard ), iObserver( aObserver ), |
47 iClientData( TMccCreateLinkPckg() ), iSession( aSession ) |
47 iClientData( TMccCreateLinkPckg() ), iSession( aSession ) |
48 { |
48 { |
49 CActiveScheduler::Add( this ); |
49 CActiveScheduler::Add( this ); |
|
50 iFileName = NULL; |
|
51 iFileType = NULL; |
50 } |
52 } |
51 |
53 |
52 // --------------------------------------------------------------------------- |
54 // --------------------------------------------------------------------------- |
53 // Static constructor, does not leave instance in cleanupstack |
55 // Static constructor, does not leave instance in cleanupstack |
54 // --------------------------------------------------------------------------- |
56 // --------------------------------------------------------------------------- |
99 iStatus.Int() ); |
103 iStatus.Int() ); |
100 #endif |
104 #endif |
101 |
105 |
102 if( KErrNone == iStatus.Int() ) |
106 if( KErrNone == iStatus.Int() ) |
103 { |
107 { |
|
108 if (iClientData().iLinkType == KMccLinkMessage) |
|
109 { |
|
110 RDebug::Print( _L("CMccAsyncLinkCreator::RunL Link Type") ); |
|
111 |
|
112 iLinkCreated = ETrue; |
|
113 } |
104 if ( iLinkCreated == EFalse ) |
114 if ( iLinkCreated == EFalse ) |
105 { |
115 { |
106 iSession->CreateRtpSessionL( iClientData().iLinkID, |
116 iSession->CreateRtpSessionL( iClientData().iLinkID, |
107 iClientData().iLocalAddress.Port(), |
117 iClientData().iLocalAddress.Port(), |
108 iClientData().iIpTOS, |
118 iClientData().iIpTOS, |
206 __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) ); |
216 __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) ); |
207 |
217 |
208 aMessage.ReadData1FromClientL( iClientData ); |
218 aMessage.ReadData1FromClientL( iClientData ); |
209 |
219 |
210 iSession->CreateLinkL( iClientData().iLinkID, iClientData().iLinkType ); |
220 iSession->CreateLinkL( iClientData().iLinkID, iClientData().iLinkType ); |
211 iSession->InitializeLinkL( iStatus, |
221 |
|
222 if(iClientData().iLinkType == KMccLinkMessage) |
|
223 { |
|
224 HBufC8* tmpMsrpPath = NULL; |
|
225 iSession->InitializeLinkL( iStatus, |
|
226 iClientData().iLinkID, |
|
227 iClientData().iIapId, |
|
228 tmpMsrpPath); |
|
229 if (NULL != tmpMsrpPath ) |
|
230 { |
|
231 iClientData().iLocalMsrpPath.Zero(); |
|
232 iClientData().iLocalMsrpPath.Copy(tmpMsrpPath->Des()); |
|
233 delete tmpMsrpPath; |
|
234 tmpMsrpPath = NULL; |
|
235 } |
|
236 if ( iClientData().iFileShare ) |
|
237 { |
|
238 if (iClientData().iFileName.Length() > 0) |
|
239 { |
|
240 if (NULL != iFileName ) |
|
241 delete iFileName; |
|
242 iFileName = iClientData().iFileName.Alloc(); |
|
243 } |
|
244 if (iClientData().iFileType.Length() >0 ) |
|
245 { |
|
246 if (NULL != iFileType ) |
|
247 delete iFileType; |
|
248 iFileType = iClientData().iFileType.Alloc(); |
|
249 } |
|
250 iSession->SetFileShareAttrbs(iFileName, |
|
251 iClientData().iFileSize, |
|
252 iFileType, |
|
253 iClientData().iFTProgressNotification); |
|
254 } |
|
255 } |
|
256 else |
|
257 { |
|
258 iSession->InitializeLinkL( iStatus, |
212 iClientData().iLinkID, |
259 iClientData().iLinkID, |
213 iClientData().iIapId ); |
260 iClientData().iIapId ); |
214 |
261 |
|
262 } |
215 this->SetActive(); |
263 this->SetActive(); |
216 aMessage.WriteDataToClientL( iClientData ); |
264 aMessage.WriteDataToClientL( iClientData ); |
217 } |
265 } |
218 |
266 |
219 |
267 |