equal
deleted
inserted
replaced
38 // --------------------------------------------------------------------------- |
38 // --------------------------------------------------------------------------- |
39 // CAcpHttpHandler::CAcpHttpHandler |
39 // CAcpHttpHandler::CAcpHttpHandler |
40 // --------------------------------------------------------------------------- |
40 // --------------------------------------------------------------------------- |
41 // |
41 // |
42 CAcpHttpHandler::CAcpHttpHandler( MAcpHttpHandlerObserver& aObserver ) |
42 CAcpHttpHandler::CAcpHttpHandler( MAcpHttpHandlerObserver& aObserver ) |
43 : CActive( CActive::EPriorityStandard ), iObserver( aObserver ) |
43 : CActive( CActive::EPriorityStandard ), iObserver( aObserver ), iCancelRequest( EFalse ) |
44 { |
44 { |
45 CActiveScheduler::Add( this ); |
45 CActiveScheduler::Add( this ); |
46 } |
46 } |
47 |
47 |
48 // --------------------------------------------------------------------------- |
48 // --------------------------------------------------------------------------- |
309 ACPLOG( "CAcpHttpHandler::CancelTransaction begin" ); |
309 ACPLOG( "CAcpHttpHandler::CancelTransaction begin" ); |
310 |
310 |
311 if ( !iTransactionRunning ) |
311 if ( !iTransactionRunning ) |
312 { |
312 { |
313 ACPLOG( "CAcpHttpHandler::CancelTransaction end (not running)" ); |
313 ACPLOG( "CAcpHttpHandler::CancelTransaction end (not running)" ); |
|
314 iCancelRequest = ETrue; |
314 return; |
315 return; |
315 } |
316 } |
316 |
317 |
317 iTransaction.Close(); |
318 iTransaction.Close(); |
318 ACPLOG( " - transaction closed" ); |
319 ACPLOG( " - transaction closed" ); |
557 iNetId = connInfo.iNetId; |
558 iNetId = connInfo.iNetId; |
558 |
559 |
559 iConnectionOpen = ETrue; |
560 iConnectionOpen = ETrue; |
560 } |
561 } |
561 |
562 |
562 // Submit the first transaction. Further transactions are submitted |
563 // If the cancel button is pressed by the end user during the period of connection-opening, |
563 // in GetDataL. |
564 // transaction need not to be submitted. Otherwise, need to be submitted. |
564 SubmitTransactionL(); |
565 if ( iCancelRequest ) |
|
566 { |
|
567 iCancelRequest = EFalse; |
|
568 } |
|
569 else |
|
570 { |
|
571 // Submit the first transaction. Further transactions are submitted |
|
572 // in GetDataL. |
|
573 SubmitTransactionL(); |
|
574 } |
565 } |
575 } |
566 else |
576 else |
567 { |
577 { |
568 // Error occurred, notify observer. |
578 // Error occurred, notify observer. |
569 iObserver.NotifyHttpError( iStatus.Int() ); |
579 iObserver.NotifyHttpError( iStatus.Int() ); |