|
1 /* |
|
2 * Copyright (c) 2002 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: SyncML transport interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include <CoreApplicationUIsSDKCRKeys.h> |
|
22 #include <btengdomaincrkeys.h> |
|
23 #include <centralrepository.h> |
|
24 #include <ApUtils.h> |
|
25 #include "nsmltransport.h" |
|
26 #include "nsmlhttp.h" |
|
27 #include "NSmlObexClient.h" |
|
28 #include "nsmlobexserverbinding.h" |
|
29 #include "nsmlerror.h" |
|
30 #include <featmgr.h> |
|
31 |
|
32 //============================================================ |
|
33 // CNSmlTransport definition |
|
34 //============================================================ |
|
35 EXPORT_C CNSmlTransport::CNSmlTransport() |
|
36 { |
|
37 } |
|
38 //------------------------------------------------------------ |
|
39 // desctructor |
|
40 //------------------------------------------------------------ |
|
41 EXPORT_C CNSmlTransport::~CNSmlTransport() |
|
42 { |
|
43 DBG_FILE(_S8("CNSmlTransport::~CNSmlTransport() begin")); |
|
44 if( iObexBinding ) |
|
45 { |
|
46 DBG_FILE(_S8("delete iObexBinding")); |
|
47 delete iObexBinding; |
|
48 iObexBinding = NULL; |
|
49 iObexLibrary.Close(); |
|
50 } |
|
51 if( iHTTPBinding ) |
|
52 { |
|
53 DBG_FILE(_S8("delete iHTTPBinding")); |
|
54 delete iHTTPBinding; |
|
55 iHTTPBinding = NULL; |
|
56 iHTTPLibrary.Close(); |
|
57 } |
|
58 if( iObexServerBinding ) |
|
59 { |
|
60 DBG_FILE(_S8("delete iObexServerBinding")); |
|
61 delete iObexServerBinding; |
|
62 iObexServerBinding = NULL; |
|
63 iObexServerBindingLib.Close(); |
|
64 } |
|
65 DBG_FILE(_S8("CNSmlTransport::~CNSmlTransport() end")); |
|
66 } |
|
67 // --------------------------------------------------------- |
|
68 // CNSmlTransport::NewL() |
|
69 // Creates new instance of CNSmlTransport. |
|
70 // Does not leave instance pointer to CleanupStack. |
|
71 // --------------------------------------------------------- |
|
72 EXPORT_C CNSmlTransport* CNSmlTransport::NewL() |
|
73 { |
|
74 CNSmlTransport* self = CNSmlTransport::NewLC(); |
|
75 CleanupStack::Pop(); |
|
76 return( self ); |
|
77 } |
|
78 // --------------------------------------------------------- |
|
79 // CNSmlTransport::NewLC() |
|
80 // Creates new instance of CNSmlTransport |
|
81 // Leaves instance pointer to CleanupStack. |
|
82 // --------------------------------------------------------- |
|
83 EXPORT_C CNSmlTransport* CNSmlTransport::NewLC() |
|
84 { |
|
85 CNSmlTransport* self = new (ELeave) CNSmlTransport(); |
|
86 CleanupStack::PushL( self ); |
|
87 self->ConstructL(); |
|
88 return( self ); |
|
89 } |
|
90 //------------------------------------------------------------ |
|
91 // 2-phase construct |
|
92 //------------------------------------------------------------ |
|
93 EXPORT_C void CNSmlTransport::ConstructL() |
|
94 { |
|
95 iObex = EFalse; |
|
96 iObexServer = EFalse; |
|
97 |
|
98 iBTObserver = 0; |
|
99 iBTDevAddr = TBTDevAddr( 0 ); |
|
100 iServiceUid = TUUID( 0 ); |
|
101 FeatureManager::InitializeLibL(); |
|
102 iWLANBearer = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); |
|
103 FeatureManager::UnInitializeLib(); |
|
104 } |
|
105 |
|
106 //------------------------------------------------------------ |
|
107 // CNSmlTransport::LoadObexServerBindingDllL() |
|
108 // Loads OBEX client dll. |
|
109 //------------------------------------------------------------ |
|
110 void CNSmlTransport::LoadObexServerBindingDllL() |
|
111 { |
|
112 DBG_FILE(_S8("CNSmlTransport::LoadObexServerBindingDllL()")); |
|
113 // Dynamically load DLL |
|
114 User::LeaveIfError( iObexServerBindingLib.Load( KSmlObexServerBindingLibName ) ); |
|
115 if( iObexServerBindingLib.Type()[1] != KSmlTransBindingUid ) |
|
116 { |
|
117 DBG_FILE(_S8("KSmlTransBindingUid incorrect...")); |
|
118 iObexServerBindingLib.Close(); |
|
119 User::Leave( KErrNotFound ); |
|
120 } |
|
121 TNSmlCreateObexServerBindingFunc CreateCNsmlObexServerBindingL = (TNSmlCreateObexServerBindingFunc)iObexServerBindingLib.Lookup(1); |
|
122 iObexServerBinding = (CNSmlObexServerBinding*)CreateCNsmlObexServerBindingL(); |
|
123 } |
|
124 //------------------------------------------------------------ |
|
125 // CNSmlTransport::LoadObexDllL() |
|
126 // Loads OBEX client dll. |
|
127 //------------------------------------------------------------ |
|
128 void CNSmlTransport::LoadObexDllL() |
|
129 { |
|
130 DBG_FILE(_S8("CNSmlTransport::LoadObexDllL()")); |
|
131 |
|
132 // Dynamically load DLL |
|
133 // Check what is the used medium type and load the correct DLL |
|
134 // BT, IR, USB |
|
135 if ( iCurrMedium == KUidNSmlMediumTypeUSB ) |
|
136 { |
|
137 User::LeaveIfError( iObexLibrary.Load( KSmlObexUsbClientLibName ) ); |
|
138 } |
|
139 else |
|
140 { |
|
141 User::LeaveIfError( iObexLibrary.Load( KSmlObexClientLibName ) ); |
|
142 } |
|
143 |
|
144 if( iObexLibrary.Type()[1] != KSmlTransBindingUid ) |
|
145 { |
|
146 iObexLibrary.Close(); |
|
147 User::Leave( KErrNotFound ); |
|
148 } |
|
149 TNSmlCreateObexClientFunc createObexClientL = (TNSmlCreateObexClientFunc)iObexLibrary.Lookup(1); |
|
150 iObexBinding = (CNsmlObexClient*)createObexClientL(); |
|
151 } |
|
152 |
|
153 //------------------------------------------------------------ |
|
154 // CNSmlTransport::LoadHTTPDllL() |
|
155 // Loads HTTP client dll. |
|
156 //------------------------------------------------------------ |
|
157 void CNSmlTransport::LoadHTTPDllL() |
|
158 { |
|
159 DBG_FILE(_S8("CNSmlTransport::LoadHTTPDllL()")); |
|
160 // Dynamically load DLL |
|
161 User::LeaveIfError( iHTTPLibrary.Load( KSmlHTTPClientLibName ) ); |
|
162 if( iHTTPLibrary.Type()[1] != KSmlTransBindingUid ) |
|
163 { |
|
164 iHTTPLibrary.Close(); |
|
165 User::Leave( KErrNotFound ); |
|
166 } |
|
167 TNSmlCreateHTTPFunc createHTTPClientL = (TNSmlCreateHTTPFunc)iHTTPLibrary.Lookup(1); |
|
168 iHTTPBinding = (CNSmlHTTP*)createHTTPClientL(); |
|
169 } |
|
170 |
|
171 // 1.2 CHANGES: Offline mode |
|
172 //------------------------------------------------------------ |
|
173 // CNSmlTransport::IsInOfflineMode() |
|
174 // Checks if device is at offline mode |
|
175 //------------------------------------------------------------ |
|
176 TBool CNSmlTransport::IsInOfflineModeL() |
|
177 { |
|
178 TInt operationsAllowed( ECoreAppUIsNetworkConnectionAllowed ); |
|
179 CRepository* rep = CRepository::NewLC( KCRUidCoreApplicationUIs ); |
|
180 rep->Get(KCoreAppUIsNetworkConnectionAllowed, operationsAllowed ); |
|
181 CleanupStack::PopAndDestroy(); //rep |
|
182 |
|
183 return ( operationsAllowed == ECoreAppUIsNetworkConnectionNotAllowed ) ? ETrue : EFalse; |
|
184 } |
|
185 // Changes end |
|
186 |
|
187 //------------------------------------------------------------ |
|
188 // CNSmlTransport::Connect |
|
189 // Establishes a communication using the protocol service with the given ID. |
|
190 //------------------------------------------------------------ |
|
191 EXPORT_C void CNSmlTransport::ConnectL( TUid aMediumType, TBool aServerAlerted, CArrayFixFlat<TUint32>* aIAPIdArray, TDesC8& aURI, TDesC8& aMimeType, TRequestStatus &aStatus, TDesC8& aHTTPusername, TDesC8& aHTTPpassword, TInt aHTTPauthused ) |
|
192 { |
|
193 DBG_FILE(_S8("Connect starts...")); |
|
194 iAgentStatus = &aStatus; |
|
195 |
|
196 iCurrMedium = aMediumType; |
|
197 |
|
198 if( aMediumType != KUidNSmlMediumTypeInternet ) |
|
199 { |
|
200 TNSmlObexTransport obexTransport; |
|
201 |
|
202 if ( aMediumType == KUidNSmlMediumTypeUSB ) |
|
203 { |
|
204 obexTransport = EObexUsb; |
|
205 } |
|
206 else if ( aMediumType == KUidNSmlMediumTypeIrDA ) |
|
207 { |
|
208 obexTransport = EObexIr; |
|
209 } |
|
210 else |
|
211 { |
|
212 obexTransport = EObexBt; |
|
213 |
|
214 if ( IsInOfflineModeL() ) |
|
215 { |
|
216 TInt btActivationEnabled( EBTEnabledInOfflineMode ); |
|
217 CRepository* rep = CRepository::NewLC( KCRUidBluetoothEngine ); |
|
218 TInt properr = rep->Get( KBTEnabledInOffline, btActivationEnabled ); |
|
219 CleanupStack::PopAndDestroy(); |
|
220 |
|
221 if ( btActivationEnabled == EBTDisabledInOfflineMode ) |
|
222 { |
|
223 DBG_FILE(_S8("Offline mode set!")); |
|
224 *iAgentStatus = KRequestPending; |
|
225 TRequestStatus* status = iAgentStatus; |
|
226 User::RequestComplete( status, TNSmlError::ESmlStatusNotPossibleInOfflineMode ); |
|
227 return; |
|
228 } |
|
229 } |
|
230 } |
|
231 |
|
232 Connect( obexTransport, aServerAlerted, aMimeType, aStatus ); |
|
233 } |
|
234 else |
|
235 { |
|
236 TBool errormsg = EFalse; |
|
237 if(IsInOfflineModeL()) |
|
238 { |
|
239 // 1.2 CHANGES: Offline mode |
|
240 if( !iWLANBearer ) // offline mode and no WLAN support |
|
241 { |
|
242 errormsg = ETrue; |
|
243 } |
|
244 else |
|
245 { |
|
246 // used, so it is ok to use first one in the list. |
|
247 if ( aIAPIdArray->At(0) != 0xffffffff && aIAPIdArray->At(0) != 0xfffffffe ) |
|
248 // 0xffffffff is same as -1 (KErrNotFound) and -2 for Default connection |
|
249 { |
|
250 TUint32 accesspointId = aIAPIdArray->At(0); |
|
251 CCommsDatabase* commDb = CCommsDatabase::NewL(); |
|
252 CleanupStack::PushL(commDb); |
|
253 CApUtils* aputils = CApUtils::NewLC( *commDb ); |
|
254 TRAP_IGNORE( accesspointId = aputils->WapIdFromIapIdL( accesspointId ) ); |
|
255 TApBearerType bearerType = aputils->BearerTypeL( accesspointId ); |
|
256 CleanupStack::PopAndDestroy( 2 ); //commdb,aputils |
|
257 |
|
258 if ( bearerType != EApBearerTypeWLAN ) |
|
259 { |
|
260 errormsg = ETrue; |
|
261 } |
|
262 } |
|
263 } |
|
264 } |
|
265 if(errormsg) |
|
266 { |
|
267 DBG_FILE(_S8("Offline mode set!")); |
|
268 *iAgentStatus = KRequestPending; |
|
269 TRequestStatus* status = iAgentStatus; |
|
270 User::RequestComplete( status, TNSmlError::ESmlStatusNotPossibleInOfflineMode ); |
|
271 return; |
|
272 } |
|
273 // Changes end |
|
274 |
|
275 // New attributes username and password to support HTTP authentication |
|
276 Connect( aIAPIdArray, aURI, aMimeType, aStatus, aHTTPusername, aHTTPpassword, aHTTPauthused ); |
|
277 } |
|
278 } |
|
279 |
|
280 |
|
281 //------------------------------------------------------------ |
|
282 // CNSmlTransport::Connect |
|
283 // Establishes a communication for OBEX. |
|
284 //------------------------------------------------------------ |
|
285 void CNSmlTransport::Connect( TNSmlObexTransport aTransport,TBool aServerAlerted, TDesC8& aMimeType, TRequestStatus &aStatus ) |
|
286 { |
|
287 DBG_FILE(_S8("OBEX Connect starts...")); |
|
288 iObex = ETrue; |
|
289 TInt err( KErrNone ); |
|
290 iAgentStatus = &aStatus; |
|
291 if( !aServerAlerted ) // starting OBEX client |
|
292 { |
|
293 DBG_FILE(_S8("starting OBEX client...")); |
|
294 if( iObexBinding == NULL ) |
|
295 { |
|
296 TRAP( err, LoadObexDllL() ); |
|
297 if( err != KErrNone ) |
|
298 { |
|
299 DBG_FILE(_S8("LoadObexDllL() failed!")); |
|
300 *iAgentStatus = KRequestPending; |
|
301 TRequestStatus* status = iAgentStatus; |
|
302 User::RequestComplete( status, err ); |
|
303 } |
|
304 } |
|
305 |
|
306 if( iObexBinding && aTransport == EObexBt && !err ) |
|
307 { |
|
308 // Set observer to get partners bluetooth address/name |
|
309 if( iBTObserver ) |
|
310 { |
|
311 iObexBinding->SetExtObserver( iBTObserver ); |
|
312 } |
|
313 // Set bluetooth connection info |
|
314 if( iBTDevAddr != TBTDevAddr( 0 ) || iServiceUid != TUUID( 0 ) ) |
|
315 { |
|
316 iObexBinding->SetBTConnInfo( iBTDevAddr, iServiceUid ); |
|
317 } |
|
318 } |
|
319 |
|
320 if( iObexBinding && !err ) |
|
321 { |
|
322 TRAP( err, iObexBinding->ConnectL( aTransport, aServerAlerted, aMimeType, aStatus ) ); |
|
323 if( err != KErrNone ) |
|
324 { |
|
325 DBG_FILE(_S8("iObexBinding->ConnectL() failed")); |
|
326 *iAgentStatus = KRequestPending; |
|
327 TRequestStatus* status = iAgentStatus; |
|
328 User::RequestComplete( status, err ); |
|
329 } |
|
330 } |
|
331 } |
|
332 else |
|
333 { |
|
334 DBG_FILE(_S8("starting OBEX server binding...")); |
|
335 iObexServer = ETrue; |
|
336 if( iObexServerBinding == NULL ) |
|
337 { |
|
338 TRAP( err, LoadObexServerBindingDllL() ); |
|
339 if( err != KErrNone ) |
|
340 { |
|
341 DBG_FILE(_S8("LoadObexServerBindingDllL() failed!")); |
|
342 *iAgentStatus = KRequestPending; |
|
343 TRequestStatus* status = iAgentStatus; |
|
344 User::RequestComplete( status, err ); |
|
345 } |
|
346 } |
|
347 if( iObexServerBinding && !err ) |
|
348 { |
|
349 iObexServerBinding->Connect( aTransport, aServerAlerted, aMimeType, aStatus ); |
|
350 } |
|
351 } |
|
352 } |
|
353 |
|
354 //------------------------------------------------------------ |
|
355 // CNSmlTransport::Connect |
|
356 // Establishes a communication using the protocol service with the given ID. |
|
357 //------------------------------------------------------------ |
|
358 void CNSmlTransport::Connect( CArrayFixFlat<TUint32>* aIAPIdArray, TDesC8& aURI, TDesC8& aMimeType, TRequestStatus &aStatus, TDesC8& aHTTPusername, TDesC8& aHTTPpassword, TInt aHTTPauthused ) |
|
359 { |
|
360 DBG_FILE(_S8("HTTP Connect starts...")); |
|
361 TInt err( KErrNone ); |
|
362 iAgentStatus = &aStatus; |
|
363 iObex = EFalse; |
|
364 if( iHTTPBinding == NULL ) |
|
365 { |
|
366 TRAP( err, LoadHTTPDllL() ); |
|
367 if( err != KErrNone ) |
|
368 { |
|
369 DBG_FILE(_S8("LoadHTTPDllL() failed!")); |
|
370 *iAgentStatus = KRequestPending; |
|
371 TRequestStatus* status = iAgentStatus; |
|
372 User::RequestComplete( status, err ); |
|
373 } |
|
374 } |
|
375 if( iHTTPBinding && !err ) |
|
376 { |
|
377 TRAP( err, iHTTPBinding->OpenCommunicationL( aIAPIdArray, aURI, aMimeType, aStatus, aHTTPusername, aHTTPpassword, aHTTPauthused ) ); |
|
378 if( err != KErrNone ) |
|
379 { |
|
380 DBG_FILE(_S8("iHTTPBinding->OpenCommunicationL() failed!")); |
|
381 *iAgentStatus = KRequestPending; |
|
382 TRequestStatus* status = iAgentStatus; |
|
383 User::RequestComplete( status, err ); |
|
384 } |
|
385 } |
|
386 } |
|
387 //------------------------------------------------------------ |
|
388 // CNSmlTransport::Disconnect |
|
389 // Closes a previously opened communication. |
|
390 //------------------------------------------------------------ |
|
391 EXPORT_C void CNSmlTransport::Disconnect( ) |
|
392 { |
|
393 DBG_FILE(_S8("CNSmlTransport::Disconnect( )")); |
|
394 if( iObex ) |
|
395 { |
|
396 if( iObexBinding != NULL ) |
|
397 { |
|
398 DBG_FILE(_S8("iObexBinding->Cancel() starts..")); |
|
399 iObexBinding->Cancel(); |
|
400 |
|
401 TRequestStatus* status = iAgentStatus; |
|
402 TInt err( KErrNone ); |
|
403 TRAP(err, iObexBinding->CloseCommunicationL( *status ) ); |
|
404 } |
|
405 if( iObexServerBinding != NULL ) |
|
406 { |
|
407 DBG_FILE(_S8("iObexServerBinding->Cancel() starts..")); |
|
408 iObexServerBinding->Cancel(); |
|
409 iObexServerBinding->Disconnect(); |
|
410 } |
|
411 } |
|
412 else |
|
413 { |
|
414 if( iHTTPBinding != NULL ) |
|
415 { |
|
416 DBG_FILE(_S8("iHTTPBinding->Cancel() starts..")); |
|
417 iHTTPBinding->Cancel(); |
|
418 } |
|
419 } |
|
420 } |
|
421 //------------------------------------------------------------ |
|
422 // CNSmlTransport::Receive |
|
423 // Read data across a connection. |
|
424 //------------------------------------------------------------ |
|
425 EXPORT_C void CNSmlTransport::Receive( TPtr8& aStartPtr, TRequestStatus &aStatus ) |
|
426 { |
|
427 DBG_FILE(_S8("CNSmlTransport::Receive starts...")); |
|
428 TInt err( KErrNone ); |
|
429 if( iObex ) |
|
430 { |
|
431 if( iObexServer ) |
|
432 { |
|
433 DBG_FILE(_S8("OBEX server binding Receive starts...")); |
|
434 this->iObexServerBinding->Receive( aStartPtr, aStatus ); |
|
435 } |
|
436 else |
|
437 { |
|
438 DBG_FILE(_S8("OBEX ReceiveDataL starts...")); |
|
439 TRAP( err, this->iObexBinding->ReceiveDataL( aStartPtr, aStatus ) ); |
|
440 if( err != KErrNone ) |
|
441 { |
|
442 DBG_FILE(_S8("iObexBinding->ReceiveDataL failed!")); |
|
443 *iAgentStatus = KRequestPending; |
|
444 TRequestStatus* status = iAgentStatus; |
|
445 User::RequestComplete( status, err ); |
|
446 } |
|
447 } |
|
448 } |
|
449 else |
|
450 { |
|
451 DBG_FILE(_S8("HTTP ReceiveDataL starts...")); |
|
452 TRAP( err, this->iHTTPBinding->ReceiveDataL( aStartPtr, aStatus ) ); |
|
453 if( err != KErrNone ) |
|
454 { |
|
455 DBG_FILE(_S8("iHTTPBinding->ReceiveDataL failed!")); |
|
456 *iAgentStatus = KRequestPending; |
|
457 TRequestStatus* status = iAgentStatus; |
|
458 User::RequestComplete( status, err ); |
|
459 } |
|
460 } |
|
461 } |
|
462 //------------------------------------------------------------ |
|
463 // CNSmlTransport::Send |
|
464 // Send data across a connection. |
|
465 //------------------------------------------------------------ |
|
466 EXPORT_C void CNSmlTransport::Send( TDesC8& aStartPtr, TBool /*aFinalPacket*/, TRequestStatus &aStatus ) |
|
467 { |
|
468 DBG_FILE(_S8("CNSmlTransport::Send starts...")); |
|
469 TInt err( KErrNone ); |
|
470 |
|
471 if( iObex ) |
|
472 { |
|
473 if ( iObexServer ) |
|
474 { |
|
475 DBG_FILE(_S8("OBEX server binding SendDataL starts...")); |
|
476 this->iObexServerBinding->Send( aStartPtr, ETrue, aStatus ); |
|
477 } |
|
478 else |
|
479 { |
|
480 DBG_FILE(_S8("OBEX client SendDataL starts...")); |
|
481 TRAP( err, this->iObexBinding->SendDataL( aStartPtr, ETrue, aStatus ) ); |
|
482 if( err != KErrNone ) |
|
483 { |
|
484 DBG_FILE(_S8("iObexBinding->SendDataL() failed!")); |
|
485 *iAgentStatus = KRequestPending; |
|
486 TRequestStatus* status = iAgentStatus; |
|
487 User::RequestComplete( status, err ); |
|
488 } |
|
489 } |
|
490 } |
|
491 else |
|
492 { |
|
493 // 1.2 CHANGES: Offline mode |
|
494 TBool offline = EFalse; |
|
495 TInt offlineError( KErrNone ); |
|
496 TRAP( offlineError, offline = IsInOfflineModeL() ); |
|
497 if ( offline && !iWLANBearer ) |
|
498 { |
|
499 DBG_FILE(_S8("Offline mode selected!")); |
|
500 *iAgentStatus = KRequestPending; |
|
501 TRequestStatus* status = iAgentStatus; |
|
502 User::RequestComplete( status, TNSmlError::ESmlStatusNotPossibleInOfflineMode ); |
|
503 return; |
|
504 } |
|
505 // Changes end |
|
506 |
|
507 DBG_FILE(_S8("HTTP SendDataL starts...")); |
|
508 TRAP( err, this->iHTTPBinding->SendDataL( aStartPtr, ETrue, aStatus ) ); |
|
509 if( err != KErrNone ) |
|
510 { |
|
511 DBG_FILE(_S8("iHTTPBinding->SendDataL() failed!")); |
|
512 *iAgentStatus = KRequestPending; |
|
513 TRequestStatus* status = iAgentStatus; |
|
514 User::RequestComplete( status, err ); |
|
515 } |
|
516 } |
|
517 } |
|
518 //------------------------------------------------------------ |
|
519 // CNSmlTransport::ChangeTargetURIL |
|
520 // Changes target URI |
|
521 //------------------------------------------------------------ |
|
522 EXPORT_C void CNSmlTransport::ChangeTargetURIL( TDesC8& aURI ) |
|
523 { |
|
524 if( iObex ) |
|
525 { |
|
526 } |
|
527 else |
|
528 { |
|
529 DBG_FILE(_S8("HTTP ChangeTargetURIL starts...")); |
|
530 this->iHTTPBinding->ChangeTargetURIL( aURI ); |
|
531 } |
|
532 } |
|
533 |
|
534 //------------------------------------------------------------ |
|
535 // CNSmlTransport::SetBTConnInfo() |
|
536 // Set BT device address and service class uid |
|
537 //------------------------------------------------------------ |
|
538 EXPORT_C void CNSmlTransport::SetBTConnInfo( const TBTDevAddr aBTDevAddr, |
|
539 const TUUID aUid ) |
|
540 { |
|
541 iBTDevAddr = aBTDevAddr; |
|
542 iServiceUid = aUid; |
|
543 } |
|
544 |
|
545 //------------------------------------------------------------ |
|
546 // CNSmlTransport::SetExtObserver( MExtBTSearcherObserver* aExtObserver ) |
|
547 // Set observer to get callbacks |
|
548 //------------------------------------------------------------ |
|
549 EXPORT_C void CNSmlTransport::SetExtObserver( MExtBTSearcherObserver* aExtObserver ) |
|
550 { |
|
551 iBTObserver = aExtObserver; |
|
552 } |
|
553 |
|
554 //End of File |
|
555 |