274 // RVoIPAudioSession::StartDownlink |
274 // RVoIPAudioSession::StartDownlink |
275 // ----------------------------------------------------------------------------- |
275 // ----------------------------------------------------------------------------- |
276 // |
276 // |
277 EXPORT_C TInt RVoIPAudioSession::StartDownlink() |
277 EXPORT_C TInt RVoIPAudioSession::StartDownlink() |
278 { |
278 { |
279 TInt err = SendClientRequest(EVoIPStartDownlink, TIpcArgs(TIpcArgs::ENothing)); |
279 TInt err = SendClientRequest(EVoIPStartDownlink, TIpcArgs( |
|
280 TIpcArgs::ENothing)); |
280 return err; |
281 return err; |
281 } |
282 } |
282 |
283 |
283 // ----------------------------------------------------------------------------- |
284 // ----------------------------------------------------------------------------- |
284 // RVoIPAudioSession::StopDownlink |
285 // RVoIPAudioSession::StopDownlink |
285 // ----------------------------------------------------------------------------- |
286 // ----------------------------------------------------------------------------- |
286 // |
287 // |
287 EXPORT_C TInt RVoIPAudioSession::StopDownlink() |
288 EXPORT_C TInt RVoIPAudioSession::StopDownlink() |
288 { |
289 { |
289 TInt err = SendClientRequest(EVoIPStopDownlink, TIpcArgs(TIpcArgs::ENothing)); |
290 TInt err = SendClientRequest(EVoIPStopDownlink, TIpcArgs( |
|
291 TIpcArgs::ENothing)); |
290 return err; |
292 return err; |
291 } |
293 } |
292 |
294 |
293 // ----------------------------------------------------------------------------- |
295 // ----------------------------------------------------------------------------- |
294 // RVoIPAudioSession::CloseDownlink |
296 // RVoIPAudioSession::CloseDownlink |
425 // RVoIPAudioSession::StartUplink |
427 // RVoIPAudioSession::StartUplink |
426 // ----------------------------------------------------------------------------- |
428 // ----------------------------------------------------------------------------- |
427 // |
429 // |
428 EXPORT_C TInt RVoIPAudioSession::StartUplink() |
430 EXPORT_C TInt RVoIPAudioSession::StartUplink() |
429 { |
431 { |
430 TInt err = SendClientRequest(EVoIPStartUplink, TIpcArgs(TIpcArgs::ENothing)); |
432 TInt err = SendClientRequest(EVoIPStartUplink, TIpcArgs( |
|
433 TIpcArgs::ENothing)); |
431 return err; |
434 return err; |
432 } |
435 } |
433 |
436 |
434 // ----------------------------------------------------------------------------- |
437 // ----------------------------------------------------------------------------- |
435 // RVoIPAudioSession::StopUplink |
438 // RVoIPAudioSession::StopUplink |
481 { |
484 { |
482 brCount = pckg().iInt; |
485 brCount = pckg().iInt; |
483 err = pckg().iStatus; |
486 err = pckg().iStatus; |
484 } |
487 } |
485 |
488 |
|
489 if (err != KErrNone) |
|
490 { |
|
491 User::Leave(err); |
|
492 } |
|
493 |
486 TRACE_PRN_N1(_L("BRCount [%d]"), brCount); |
494 TRACE_PRN_N1(_L("BRCount [%d]"), brCount); |
487 |
495 |
488 if (brCount > 0 && err == KErrNone) |
496 if (brCount > 0) |
489 { |
497 { |
490 HBufC8* buf = HBufC8::NewLC(brCount * sizeof(TUint)); |
498 HBufC8* buf = HBufC8::NewLC(brCount * sizeof(TUint)); |
491 TPtr8 ptr = buf->Des(); |
499 TPtr8 ptr = buf->Des(); |
492 TIpcArgs args1; |
500 TIpcArgs args1; |
493 args1.Set(0, &ptr); |
501 args1.Set(0, &ptr); |
615 // RVoIPAudioSession::ConcealErrorForNextBuffer |
623 // RVoIPAudioSession::ConcealErrorForNextBuffer |
616 // ----------------------------------------------------------------------------- |
624 // ----------------------------------------------------------------------------- |
617 // |
625 // |
618 EXPORT_C TInt RVoIPAudioSession::ConcealErrorForNextBuffer() |
626 EXPORT_C TInt RVoIPAudioSession::ConcealErrorForNextBuffer() |
619 { |
627 { |
620 TInt err = SendClientRequest(EVoIPConcealErrForNextBuf, TIpcArgs(TIpcArgs::ENothing)); |
628 TInt err = SendClientRequest(EVoIPConcealErrForNextBuf, TIpcArgs( |
|
629 TIpcArgs::ENothing)); |
621 return err; |
630 return err; |
622 } |
631 } |
623 |
632 |
624 // ----------------------------------------------------------------------------- |
633 // ----------------------------------------------------------------------------- |
625 // RVoIPAudioSession::SetMode |
634 // RVoIPAudioSession::SetMode |
745 // RVoIPAudioSession::BadLsfNextBuffer |
754 // RVoIPAudioSession::BadLsfNextBuffer |
746 // ----------------------------------------------------------------------------- |
755 // ----------------------------------------------------------------------------- |
747 // |
756 // |
748 EXPORT_C TInt RVoIPAudioSession::BadLsfNextBuffer() |
757 EXPORT_C TInt RVoIPAudioSession::BadLsfNextBuffer() |
749 { |
758 { |
750 TInt err = SendClientRequest(EVoIPBadLsfNextBuffer, TIpcArgs(TIpcArgs::ENothing)); |
759 TInt err = SendClientRequest(EVoIPBadLsfNextBuffer, TIpcArgs( |
751 return err; |
760 TIpcArgs::ENothing)); |
752 } |
761 return err; |
753 |
762 } |
754 // ----------------------------------------------------------------------------- |
763 |
755 // RVoIPAudioSession::Open |
764 // ----------------------------------------------------------------------------- |
|
765 // RVoIPAudioSession::OpenDTMFTonePlayer |
756 // ----------------------------------------------------------------------------- |
766 // ----------------------------------------------------------------------------- |
757 // |
767 // |
758 EXPORT_C TInt RVoIPAudioSession::OpenDTMFTonePlayer() |
768 EXPORT_C TInt RVoIPAudioSession::OpenDTMFTonePlayer() |
759 { |
769 { |
760 TInt err = SendClientRequest(EVoIPOpenDTMFTonePlayer, TIpcArgs(TIpcArgs::ENothing)); |
770 TInt err = SendClientRequest(EVoIPOpenDTMFTonePlayer, TIpcArgs( |
|
771 TIpcArgs::ENothing)); |
761 return err; |
772 return err; |
762 } |
773 } |
763 |
774 |
764 // --------------------------------------------------------------------------- |
775 // --------------------------------------------------------------------------- |
765 // RVoIPAudioSession::Play |
776 // RVoIPAudioSession::PlayDTMFTone |
766 // --------------------------------------------------------------------------- |
777 // --------------------------------------------------------------------------- |
767 // |
778 // |
768 EXPORT_C TInt RVoIPAudioSession::PlayDTMFTone(const TDesC& aTones) |
779 EXPORT_C TInt RVoIPAudioSession::PlayDTMFTone(const TDesC& aTones) |
769 { |
780 { |
770 TTonesMsgBufPckg pckg; |
781 TTonesMsgBufPckg pckg; |
773 TInt err = SendClientRequest(EVoIPPlayDTMFTone, args); |
784 TInt err = SendClientRequest(EVoIPPlayDTMFTone, args); |
774 return err; |
785 return err; |
775 } |
786 } |
776 |
787 |
777 // --------------------------------------------------------------------------- |
788 // --------------------------------------------------------------------------- |
778 // RVoIPAudioSession::Stop |
789 // RVoIPAudioSession::StopDTMFTonePlay |
779 // --------------------------------------------------------------------------- |
790 // --------------------------------------------------------------------------- |
780 // |
791 // |
781 EXPORT_C TInt RVoIPAudioSession::StopDTMFTonePlay() |
792 EXPORT_C TInt RVoIPAudioSession::StopDTMFTonePlay() |
782 { |
793 { |
783 TInt err = SendClientRequest(EVoIPStopDTMFTone, TIpcArgs(TIpcArgs::ENothing)); |
794 TInt err = SendClientRequest(EVoIPStopDTMFTone, TIpcArgs( |
|
795 TIpcArgs::ENothing)); |
784 return err; |
796 return err; |
785 } |
797 } |
786 |
798 |
787 // --------------------------------------------------------------------------- |
799 // --------------------------------------------------------------------------- |
788 // RVoIPAudioSession::Close |
800 // RVoIPAudioSession::CloseDTMFTonePlayer |
789 // --------------------------------------------------------------------------- |
801 // --------------------------------------------------------------------------- |
790 // |
802 // |
791 EXPORT_C void RVoIPAudioSession::CloseDTMFTonePlayer() |
803 EXPORT_C void RVoIPAudioSession::CloseDTMFTonePlayer() |
792 { |
804 { |
793 SendClientRequest(EVoIPCloseDTMFTonePlayer, TIpcArgs(TIpcArgs::ENothing)); |
805 SendClientRequest(EVoIPCloseDTMFTonePlayer, TIpcArgs(TIpcArgs::ENothing)); |
797 // RVoIPAudioSession::OpenRingTonePlayer |
809 // RVoIPAudioSession::OpenRingTonePlayer |
798 // ----------------------------------------------------------------------------- |
810 // ----------------------------------------------------------------------------- |
799 // |
811 // |
800 EXPORT_C TInt RVoIPAudioSession::OpenRingTonePlayer() |
812 EXPORT_C TInt RVoIPAudioSession::OpenRingTonePlayer() |
801 { |
813 { |
802 TInt err = SendClientRequest(EVoIPOpenRingTonePlayerFromProfile, TIpcArgs(TIpcArgs::ENothing)); |
814 TInt err = SendClientRequest(EVoIPOpenRingTonePlayerFromProfile, |
|
815 TIpcArgs(TIpcArgs::ENothing)); |
803 return err; |
816 return err; |
804 } |
817 } |
805 |
818 |
806 // ----------------------------------------------------------------------------- |
819 // ----------------------------------------------------------------------------- |
807 // RVoIPAudioSession::OpenRingTonePlayer |
820 // RVoIPAudioSession::OpenRingTonePlayer |
845 // RVoIPAudioSession::PlayRingTone |
858 // RVoIPAudioSession::PlayRingTone |
846 // ----------------------------------------------------------------------------- |
859 // ----------------------------------------------------------------------------- |
847 // |
860 // |
848 EXPORT_C TInt RVoIPAudioSession::PlayRingTone() |
861 EXPORT_C TInt RVoIPAudioSession::PlayRingTone() |
849 { |
862 { |
850 TInt err = SendClientRequest(EVoIPPlayRingTone, TIpcArgs(TIpcArgs::ENothing)); |
863 TInt err = SendClientRequest(EVoIPPlayRingTone, TIpcArgs( |
|
864 TIpcArgs::ENothing)); |
851 return err; |
865 return err; |
852 } |
866 } |
853 |
867 |
854 // ----------------------------------------------------------------------------- |
868 // ----------------------------------------------------------------------------- |
855 // RVoIPAudioSession::PauseRingTone |
869 // RVoIPAudioSession::PauseRingTone |
856 // ----------------------------------------------------------------------------- |
870 // ----------------------------------------------------------------------------- |
857 // |
871 // |
858 EXPORT_C TInt RVoIPAudioSession::PauseRingTone() |
872 EXPORT_C TInt RVoIPAudioSession::PauseRingTone() |
859 { |
873 { |
860 TInt err = SendClientRequest(EVoIPPauseRingTone, TIpcArgs(TIpcArgs::ENothing)); |
874 TInt err = SendClientRequest(EVoIPPauseRingTone, TIpcArgs( |
|
875 TIpcArgs::ENothing)); |
861 return err; |
876 return err; |
862 } |
877 } |
863 |
878 |
864 // ----------------------------------------------------------------------------- |
879 // ----------------------------------------------------------------------------- |
865 // RVoIPAudioSession::ResumeRingTone |
880 // RVoIPAudioSession::ResumeRingTone |
866 // ----------------------------------------------------------------------------- |
881 // ----------------------------------------------------------------------------- |
867 // |
882 // |
868 EXPORT_C TInt RVoIPAudioSession::ResumeRingTone() |
883 EXPORT_C TInt RVoIPAudioSession::ResumeRingTone() |
869 { |
884 { |
870 TInt err = SendClientRequest(EVoIPResumeRingTone, TIpcArgs(TIpcArgs::ENothing)); |
885 TInt err = SendClientRequest(EVoIPResumeRingTone, TIpcArgs( |
|
886 TIpcArgs::ENothing)); |
871 return err; |
887 return err; |
872 } |
888 } |
873 |
889 |
874 // ----------------------------------------------------------------------------- |
890 // ----------------------------------------------------------------------------- |
875 // RVoIPAudioSession::StopRingTone |
891 // RVoIPAudioSession::StopRingTone |
876 // ----------------------------------------------------------------------------- |
892 // ----------------------------------------------------------------------------- |
877 // |
893 // |
878 EXPORT_C TInt RVoIPAudioSession::StopRingTone() |
894 EXPORT_C TInt RVoIPAudioSession::StopRingTone() |
879 { |
895 { |
880 TInt err = SendClientRequest(EVoIPStopRingTone, TIpcArgs(TIpcArgs::ENothing)); |
896 TInt err = SendClientRequest(EVoIPStopRingTone, TIpcArgs( |
|
897 TIpcArgs::ENothing)); |
881 return err; |
898 return err; |
882 } |
899 } |
883 |
900 |
884 // ----------------------------------------------------------------------------- |
901 // ----------------------------------------------------------------------------- |
885 // RVoIPAudioSession::CloseRingTonePlayer |
902 // RVoIPAudioSession::CloseRingTonePlayer |
918 // RVoIPAudioSession::DelayDown |
935 // RVoIPAudioSession::DelayDown |
919 // ----------------------------------------------------------------------------- |
936 // ----------------------------------------------------------------------------- |
920 // |
937 // |
921 EXPORT_C TInt RVoIPAudioSession::DelayDown() |
938 EXPORT_C TInt RVoIPAudioSession::DelayDown() |
922 { |
939 { |
923 TInt err = SendClientRequest(EVoIPJBDelayDown, TIpcArgs(TIpcArgs::ENothing)); |
940 TInt err = SendClientRequest(EVoIPJBDelayDown, TIpcArgs( |
|
941 TIpcArgs::ENothing)); |
924 return err; |
942 return err; |
925 } |
943 } |
926 |
944 |
927 // ----------------------------------------------------------------------------- |
945 // ----------------------------------------------------------------------------- |
928 // RVoIPAudioSession::DelayUp |
946 // RVoIPAudioSession::DelayUp |
963 } |
981 } |
964 |
982 |
965 CleanupStack::PopAndDestroy(buf); |
983 CleanupStack::PopAndDestroy(buf); |
966 } |
984 } |
967 |
985 |
968 |
|
969 // ----------------------------------------------------------------------------- |
986 // ----------------------------------------------------------------------------- |
970 // RVoIPAudioSession::SendClientRequest |
987 // RVoIPAudioSession::SendClientRequest |
971 // ----------------------------------------------------------------------------- |
988 // ----------------------------------------------------------------------------- |
972 // |
989 // |
973 TInt RVoIPAudioSession::SendClientRequest( |
990 TInt RVoIPAudioSession::SendClientRequest( |
974 TVoIPAudioClientServerRequest aRequest, const TIpcArgs& aArgs) const |
991 TVoIPAudioClientServerRequest aRequest, const TIpcArgs& aArgs) const |
975 { |
992 { |
976 TInt status = KErrBadHandle; |
993 TInt status = KErrBadHandle; |
977 if (Handle()) |
994 if (Handle()) |
978 { |
995 { |
979 // if (&aArgs == TIpcArgs::ENothing) |
|
980 status = SendReceive(aRequest, aArgs); |
996 status = SendReceive(aRequest, aArgs); |
981 } |
997 } |
982 return status; |
998 return status; |
983 } |
999 } |
984 |
1000 |