478 // --------------------------------------------------------------------------- |
478 // --------------------------------------------------------------------------- |
479 // RWsfSession::ConnectWlanBearerL |
479 // RWsfSession::ConnectWlanBearerL |
480 // --------------------------------------------------------------------------- |
480 // --------------------------------------------------------------------------- |
481 // |
481 // |
482 EXPORT_C TInt RWsfSession::ConnectWlanBearerL( TUint32 aIapId, |
482 EXPORT_C TInt RWsfSession::ConnectWlanBearerL( TUint32 aIapId, |
483 TWsfIapPersistence aPersistence ) |
483 TBool aConnectOnly, |
|
484 TWsfIapPersistence aPersistence ) |
484 { |
485 { |
485 LOG_ENTERFN( "RWsfSession::ConnectWlanBearerL" ); |
486 LOG_ENTERFN( "RWsfSession::ConnectWlanBearerL" ); |
486 LOG_WRITEF( "IAP id = %d", aIapId ); |
487 LOG_WRITEF( "IAP id = %d", aIapId ); |
487 |
488 |
488 // mark the beginning of the connection process |
489 // mark the beginning of the connection process |
493 TPckgBuf<TInt> pckg; |
494 TPckgBuf<TInt> pckg; |
494 |
495 |
495 CWsfActiveWaiter *waiter = CWsfActiveWaiter::NewL(); |
496 CWsfActiveWaiter *waiter = CWsfActiveWaiter::NewL(); |
496 CleanupStack::PushL( waiter ); |
497 CleanupStack::PushL( waiter ); |
497 |
498 |
498 SendReceive( ESnifferCmdConnect, TIpcArgs( &pckg, aIapId, aPersistence ), |
499 SendReceive( ESnifferCmdConnect, |
499 waiter->iStatus ); |
500 TIpcArgs( &pckg, aIapId, aConnectOnly, aPersistence ), |
|
501 waiter->iStatus ); |
|
502 |
500 waiter->WaitForRequest(); |
503 waiter->WaitForRequest(); |
501 LOG_WRITEF( "message[%d] call returned %d", |
504 LOG_WRITEF( "message[%d] call returned %d", |
502 ESnifferCmdConnect, |
505 ESnifferCmdConnect, |
503 waiter->iStatus.Int() ); |
506 waiter->iStatus.Int() ); |
504 User::LeaveIfError( waiter->iStatus.Int() ); |
507 User::LeaveIfError( waiter->iStatus.Int() ); |
532 // RWsfSession::ConnectWlanBearer |
535 // RWsfSession::ConnectWlanBearer |
533 // --------------------------------------------------------------------------- |
536 // --------------------------------------------------------------------------- |
534 // |
537 // |
535 EXPORT_C void RWsfSession::ConnectWlanBearer( TPckgBuf<TBool>& aPckg, |
538 EXPORT_C void RWsfSession::ConnectWlanBearer( TPckgBuf<TBool>& aPckg, |
536 TUint32 aIapId, |
539 TUint32 aIapId, |
|
540 TBool aConnectOnly, |
537 TWsfIapPersistence aPersistence, |
541 TWsfIapPersistence aPersistence, |
538 TRequestStatus& aStatus ) |
542 TRequestStatus& aStatus ) |
539 { |
543 { |
540 LOG_ENTERFN( "RWsfSession::ConnectWlanBearer" ); |
544 LOG_ENTERFN( "RWsfSession::ConnectWlanBearer" ); |
541 LOG_WRITEF( "IAP id = %d", aIapId ); |
545 LOG_WRITEF( "IAP id = %d", aIapId ); |
542 |
546 |
543 // mark the beginning of the connection process |
547 // mark the beginning of the connection process |
544 iEventHandler->UnBlockNextConnectedEvent(); |
548 iEventHandler->UnBlockNextConnectedEvent(); |
545 iEventHandler->SetConnecting( ETrue ); |
549 iEventHandler->SetConnecting( ETrue ); |
546 |
550 |
547 SendReceive( ESnifferCmdConnect, TIpcArgs( &aPckg, aIapId, aPersistence ), |
551 SendReceive( ESnifferCmdConnect, |
548 aStatus ); |
552 TIpcArgs( &aPckg, aIapId, aConnectOnly, aPersistence ), |
|
553 aStatus ); |
549 } |
554 } |
550 |
555 |
551 |
556 |
552 // --------------------------------------------------------------------------- |
557 // --------------------------------------------------------------------------- |
553 // RWsfSession::SetConnectWlanBearerResult |
558 // RWsfSession::SetConnectWlanBearerResult |