439 return err; |
439 return err; |
440 } |
440 } |
441 |
441 |
442 |
442 |
443 // ----------------------------------------------------------------------------- |
443 // ----------------------------------------------------------------------------- |
444 // CPsdFax::Stop |
444 // CPsdFax::Stop (sync) |
445 // ----------------------------------------------------------------------------- |
445 // ----------------------------------------------------------------------------- |
446 // |
446 // |
447 TInt CPsdFax::Stop( const TUint aConnectionId ) |
447 TInt CPsdFax::Stop( const TUint aConnectionId ) |
448 { |
448 { |
449 LOGENTRFN("CPsdFax::Stop()") |
449 LOGENTRFN("CPsdFax::Stop()") |
464 |
464 |
465 LOGEXITFN1("CPsdFax::Stop()", err) |
465 LOGEXITFN1("CPsdFax::Stop()", err) |
466 return err; |
466 return err; |
467 } |
467 } |
468 |
468 |
|
469 // ----------------------------------------------------------------------------- |
|
470 // CPsdFax::Stop (async) |
|
471 // ----------------------------------------------------------------------------- |
|
472 // |
|
473 TInt CPsdFax::Stop( const TUint aConnectionId, TRequestStatus& aStatus ) |
|
474 { |
|
475 LOGENTRFN("CPsdFax::Stop(TUint, TRequestStatus)") |
|
476 TInt err( KErrNone ); |
|
477 |
|
478 // Check if connection ID is valid and connection is open |
|
479 TInt index = ConnectionIndex( aConnectionId ); |
|
480 if ( index == KErrNotFound || !iConnectionData[index]->IsOpen() ) |
|
481 { |
|
482 LOGIT1("CPsdFax::Stop() connection not found, index %d", index) |
|
483 err = KErrNotFound; |
|
484 } |
|
485 else |
|
486 { |
|
487 // Stop connection |
|
488 iConnectionData[index]->Stop( aStatus ); |
|
489 } |
|
490 |
|
491 LOGEXITFN1("CPsdFax::Stop(TUint, TRequestStatus)", err) |
|
492 return err; |
|
493 } |
|
494 |
|
495 // ----------------------------------------------------------------------------- |
|
496 // CPsdFax::CleanupConnectionInfo |
|
497 // ----------------------------------------------------------------------------- |
|
498 // |
|
499 TInt CPsdFax::CleanupConnectionInfo( const TUint aConnectionId ) |
|
500 { |
|
501 LOGENTRFN("CPsdFax::CleanupConnectionInfo()") |
|
502 TInt err( KErrNone ); |
|
503 |
|
504 TInt index = ConnectionIndex( aConnectionId ); |
|
505 if ( index != KErrNotFound ) |
|
506 { |
|
507 iConnectionData[index]->CleanupConnectionInfo(); |
|
508 } |
|
509 else |
|
510 { |
|
511 LOGIT1("CleanupConnectionInfo: connection ID %d not found", aConnectionId) |
|
512 err = KErrNotFound; |
|
513 } |
|
514 |
|
515 LOGEXITFN1("CPsdFax::CleanupConnectionInfo()", err) |
|
516 return err; |
|
517 } |
469 |
518 |
470 // ----------------------------------------------------------------------------- |
519 // ----------------------------------------------------------------------------- |
471 // CPsdFax::DeleteConnections |
520 // CPsdFax::DeleteConnections |
472 // ----------------------------------------------------------------------------- |
521 // ----------------------------------------------------------------------------- |
473 // |
522 // |
834 LOGEXITFN1("CPsdFaxConnectionData::GetDataVolumes()", err) |
883 LOGEXITFN1("CPsdFaxConnectionData::GetDataVolumes()", err) |
835 return err; |
884 return err; |
836 } |
885 } |
837 |
886 |
838 // ----------------------------------------------------------------------------- |
887 // ----------------------------------------------------------------------------- |
839 // CPsdFaxConnectionData::Stop |
888 // CPsdFaxConnectionData::Stop (sync) |
840 // ----------------------------------------------------------------------------- |
889 // ----------------------------------------------------------------------------- |
841 // |
890 // |
842 TInt CPsdFaxConnectionData::Stop() |
891 TInt CPsdFaxConnectionData::Stop() |
843 { |
892 { |
844 LOGENTRFN("CPsdFaxConnectionData::Stop()") |
893 LOGENTRFN("CPsdFaxConnectionData::Stop()") |
866 iFaxModule->DeleteConnections(); |
915 iFaxModule->DeleteConnections(); |
867 } |
916 } |
868 |
917 |
869 LOGEXITFN1("CPsdFaxConnectionData::Stop()", err) |
918 LOGEXITFN1("CPsdFaxConnectionData::Stop()", err) |
870 return err; |
919 return err; |
|
920 } |
|
921 |
|
922 // ----------------------------------------------------------------------------- |
|
923 // CPsdFaxConnectionData::Stop (async) |
|
924 // ----------------------------------------------------------------------------- |
|
925 // |
|
926 void CPsdFaxConnectionData::Stop( TRequestStatus& aStatus ) |
|
927 { |
|
928 LOGENTRFN("CPsdFaxConnectionData::Stop(TRequestStatus)") |
|
929 iContext.Deactivate( aStatus ); |
|
930 LOGEXITFN("CPsdFaxConnectionData::Stop(TRequestStatus)") |
|
931 } |
|
932 |
|
933 // ----------------------------------------------------------------------------- |
|
934 // CPsdFaxConnectionData::CleanupConnectionInfo |
|
935 // ----------------------------------------------------------------------------- |
|
936 // |
|
937 void CPsdFaxConnectionData::CleanupConnectionInfo() |
|
938 { |
|
939 LOGENTRFN("CPsdFaxConnectionData::CleanupConnectionInfo()") |
|
940 |
|
941 // Remove from server tables if status notifier is not active. |
|
942 if ( iStatusNotifier && !iStatusNotifier->IsActive() ) |
|
943 { |
|
944 // Remove from server tables |
|
945 RemoveFromServer(); |
|
946 |
|
947 // Close the context |
|
948 CloseContext(); |
|
949 |
|
950 // Delete all old connection objects. This method should be used |
|
951 // carefully because it will delete ConnectionData and statusnotifier |
|
952 // objects. Get out fast from Stop() |
|
953 iFaxModule->DeleteConnections(); |
|
954 } |
|
955 |
|
956 LOGEXITFN("CPsdFaxConnectionData::CleanupConnectionInfo()") |
871 } |
957 } |
872 |
958 |
873 // ----------------------------------------------------------------------------- |
959 // ----------------------------------------------------------------------------- |
874 // CPsdFaxConnectionData::RemoveFromServer |
960 // CPsdFaxConnectionData::RemoveFromServer |
875 // ----------------------------------------------------------------------------- |
961 // ----------------------------------------------------------------------------- |