522 TRACE_PRN_FN_EXT; |
547 TRACE_PRN_FN_EXT; |
523 return status; |
548 return status; |
524 } |
549 } |
525 |
550 |
526 // ----------------------------------------------------------------------------- |
551 // ----------------------------------------------------------------------------- |
527 // CallIPAdpt::GetMaxVolume |
552 // TMSCallIPAdpt::GetMaxVolume |
528 // |
553 // |
529 // ----------------------------------------------------------------------------- |
554 // ----------------------------------------------------------------------------- |
530 // |
555 // |
531 gint CallIPAdpt::GetMaxVolume(guint& volume) |
556 gint TMSCallIPAdpt::GetMaxVolume(guint& volume) |
532 { |
557 { |
533 TRACE_PRN_FN_ENT; |
558 TRACE_PRN_FN_ENT; |
534 gint status(TMS_RESULT_INVALID_STATE); |
559 gint status(TMS_RESULT_INVALID_STATE); |
535 |
560 |
536 if (iDnlinkInitialized && iVoIPDownlink) |
561 if (iDnlinkInitialized && iIPDownlink) |
537 { |
562 { |
538 status = iVoIPDownlink->GetMaxVolume(volume); |
563 status = iIPDownlink->GetMaxVolume(volume); |
539 iMaxVolume = volume; |
564 iMaxVolume = volume; |
540 TRACE_PRN_N1(_L("TMS->CallIPAdpt: GetMaxVolume [%d]"), iMaxVolume); |
565 TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt: GetMaxVolume [%d]"), iMaxVolume); |
541 } |
566 } |
542 |
567 |
543 TRACE_PRN_FN_EXT; |
568 TRACE_PRN_FN_EXT; |
544 return status; |
569 return status; |
545 } |
570 } |
546 |
571 |
547 // ----------------------------------------------------------------------------- |
572 // ----------------------------------------------------------------------------- |
548 // CallIPAdpt::SetVolume |
573 // TMSCallIPAdpt::SetVolume |
549 // |
574 // |
550 // ----------------------------------------------------------------------------- |
575 // ----------------------------------------------------------------------------- |
551 // |
576 // |
552 gint CallIPAdpt::SetVolume(const guint volume) |
577 gint TMSCallIPAdpt::SetVolume(const guint volume) |
553 { |
578 { |
554 TRACE_PRN_FN_ENT; |
579 TRACE_PRN_FN_ENT; |
555 gint status(TMS_RESULT_INVALID_STATE); |
580 gint status(TMS_RESULT_INVALID_STATE); |
556 if (iDnlinkInitialized && iVoIPDownlink) |
581 if (iDnlinkInitialized && iIPDownlink) |
557 { |
582 { |
558 status = iVoIPDownlink->SetVolume(volume); |
583 status = iIPDownlink->SetVolume(volume); |
559 NotifyClient(iDnlinkStreamId, ECmdSetVolume, status); |
584 NotifyClient(iDnlinkStreamId, ECmdSetVolume, status); |
560 } |
585 } |
561 TRACE_PRN_FN_EXT; |
586 TRACE_PRN_FN_EXT; |
562 return status; |
587 return status; |
563 } |
588 } |
564 |
589 |
565 // ----------------------------------------------------------------------------- |
590 // ----------------------------------------------------------------------------- |
566 // CallIPAdpt::GetVolume |
591 // TMSCallIPAdpt::GetVolume |
567 // |
592 // |
568 // ----------------------------------------------------------------------------- |
593 // ----------------------------------------------------------------------------- |
569 // |
594 // |
570 gint CallIPAdpt::GetVolume(guint& volume) |
595 gint TMSCallIPAdpt::GetVolume(guint& volume) |
571 { |
596 { |
572 TRACE_PRN_FN_ENT; |
597 TRACE_PRN_FN_ENT; |
573 gint status(TMS_RESULT_INVALID_STATE); |
598 gint status(TMS_RESULT_INVALID_STATE); |
574 if (iDnlinkInitialized && iVoIPDownlink) |
599 if (iDnlinkInitialized && iIPDownlink) |
575 { |
600 { |
576 status = iVoIPDownlink->GetVolume(volume); |
601 status = iIPDownlink->GetVolume(volume); |
577 } |
602 } |
578 TRACE_PRN_FN_EXT; |
603 TRACE_PRN_FN_EXT; |
579 return status; |
604 return status; |
580 } |
605 } |
581 |
606 |
582 // ----------------------------------------------------------------------------- |
607 // ----------------------------------------------------------------------------- |
583 // CallIPAdpt::GetMaxGain |
608 // TMSCallIPAdpt::GetMaxGain |
584 // |
609 // |
585 // ----------------------------------------------------------------------------- |
610 // ----------------------------------------------------------------------------- |
586 // |
611 // |
587 gint CallIPAdpt::GetMaxGain(guint& gain) |
612 gint TMSCallIPAdpt::GetMaxGain(guint& gain) |
588 { |
613 { |
589 TRACE_PRN_FN_ENT; |
614 TRACE_PRN_FN_ENT; |
590 gint status(TMS_RESULT_INVALID_STATE); |
615 gint status(TMS_RESULT_INVALID_STATE); |
591 if (iUplinkInitialized && iVoIPUplink) |
616 if (iUplinkInitialized && iIPUplink) |
592 { |
617 { |
593 status = iVoIPUplink->GetMaxGain(gain); |
618 status = iIPUplink->GetMaxGain(gain); |
594 iMaxGain = gain; |
619 iMaxGain = gain; |
595 TRACE_PRN_N1(_L("TMS->CallIPAdpt::GetMaxGain [%d]"), iMaxGain); |
620 TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetMaxGain [%d]"), iMaxGain); |
596 } |
621 } |
597 TRACE_PRN_FN_EXT; |
622 TRACE_PRN_FN_EXT; |
598 return status; |
623 return status; |
599 } |
624 } |
600 |
625 |
601 // ----------------------------------------------------------------------------- |
626 // ----------------------------------------------------------------------------- |
602 // CallIPAdpt::SetGain |
627 // TMSCallIPAdpt::SetGain |
603 // |
628 // |
604 // ----------------------------------------------------------------------------- |
629 // ----------------------------------------------------------------------------- |
605 // |
630 // |
606 gint CallIPAdpt::SetGain(const guint gain) |
631 gint TMSCallIPAdpt::SetGain(const guint gain) |
607 { |
632 { |
608 TRACE_PRN_FN_ENT; |
633 TRACE_PRN_FN_ENT; |
609 gint status(TMS_RESULT_INVALID_STATE); |
634 gint status(TMS_RESULT_INVALID_STATE); |
610 if (iUplinkInitialized && iVoIPUplink) |
635 if (iUplinkInitialized && iIPUplink) |
611 { |
636 { |
612 status = iVoIPUplink->SetGain(gain); |
637 status = iIPUplink->SetGain(gain); |
613 NotifyClient(iUplinkStreamId, ECmdSetGain, status); |
638 NotifyClient(iUplinkStreamId, ECmdSetGain, status); |
614 } |
639 } |
615 TRACE_PRN_FN_EXT; |
640 TRACE_PRN_FN_EXT; |
616 return status; |
641 return status; |
617 } |
642 } |
618 |
643 |
619 // ----------------------------------------------------------------------------- |
644 // ----------------------------------------------------------------------------- |
620 // CallIPAdpt::GetGain |
645 // TMSCallIPAdpt::GetGain |
621 // |
646 // |
622 // ----------------------------------------------------------------------------- |
647 // ----------------------------------------------------------------------------- |
623 // |
648 // |
624 gint CallIPAdpt::GetGain(guint& gain) |
649 gint TMSCallIPAdpt::GetGain(guint& gain) |
625 { |
650 { |
626 TRACE_PRN_FN_ENT; |
651 TRACE_PRN_FN_ENT; |
627 gint status(TMS_RESULT_INVALID_STATE); |
652 gint status(TMS_RESULT_INVALID_STATE); |
628 if (iUplinkInitialized && iVoIPUplink) |
653 if (iUplinkInitialized && iIPUplink) |
629 { |
654 { |
630 status = iVoIPUplink->GetGain(gain); |
655 status = iIPUplink->GetGain(gain); |
631 } |
656 } |
632 TRACE_PRN_FN_EXT; |
657 TRACE_PRN_FN_EXT; |
633 return status; |
658 return status; |
634 } |
659 } |
635 |
660 |
636 // ----------------------------------------------------------------------------- |
661 // ----------------------------------------------------------------------------- |
637 // CallIPAdpt::GetGlobalMaxVolume |
662 // TMSCallIPAdpt::GetGlobalMaxVolume |
638 // |
663 // |
639 // ----------------------------------------------------------------------------- |
664 // ----------------------------------------------------------------------------- |
640 // |
665 // |
641 gint CallIPAdpt::GetGlobalMaxVolume(guint& volume) |
666 gint TMSCallIPAdpt::GetGlobalMaxVolume(guint& volume) |
642 { |
667 { |
643 TRACE_PRN_FN_ENT; |
668 TRACE_PRN_FN_ENT; |
644 gint status(TMS_RESULT_INVALID_STATE); |
669 gint status(TMS_RESULT_INVALID_STATE); |
645 if (iDnlinkInitialized && iVoIPDownlink) |
670 if (iDnlinkInitialized && iIPDownlink) |
646 { |
671 { |
647 status = iVoIPDownlink->GetMaxVolume(volume); |
672 status = iIPDownlink->GetMaxVolume(volume); |
648 iMaxVolume = volume; |
673 iMaxVolume = volume; |
649 TRACE_PRN_N1(_L("TMS->CallIPAdpt: GetMaxVolume [%d]"), iMaxVolume); |
674 TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt: GetMaxVolume [%d]"), iMaxVolume); |
650 } |
675 } |
651 TRACE_PRN_FN_EXT; |
676 TRACE_PRN_FN_EXT; |
652 return status; |
677 return status; |
653 } |
678 } |
654 |
679 |
655 // ----------------------------------------------------------------------------- |
680 // ----------------------------------------------------------------------------- |
656 // CallIPAdpt::SetGlobalVolume |
681 // TMSCallIPAdpt::SetGlobalVolume |
657 // |
682 // |
658 // ----------------------------------------------------------------------------- |
683 // ----------------------------------------------------------------------------- |
659 // |
684 // |
660 gint CallIPAdpt::SetGlobalVolume(const guint volume) |
685 gint TMSCallIPAdpt::SetGlobalVolume(const guint volume) |
661 { |
686 { |
662 TRACE_PRN_FN_ENT; |
687 TRACE_PRN_FN_ENT; |
663 gint status(TMS_RESULT_INVALID_STATE); |
688 gint status(TMS_RESULT_INVALID_STATE); |
664 if (iDnlinkInitialized && iVoIPDownlink) |
689 if (iDnlinkInitialized && iIPDownlink) |
665 { |
690 { |
666 status = iVoIPDownlink->SetVolume(volume); |
691 status = iIPDownlink->SetVolume(volume); |
667 } |
692 } |
668 TRACE_PRN_FN_EXT; |
693 TRACE_PRN_FN_EXT; |
669 return status; |
694 return status; |
670 } |
695 } |
671 |
696 |
672 // ----------------------------------------------------------------------------- |
697 // ----------------------------------------------------------------------------- |
673 // CallIPAdpt::GetGlobalVolume |
698 // TMSCallIPAdpt::GetGlobalVolume |
674 // |
699 // |
675 // ----------------------------------------------------------------------------- |
700 // ----------------------------------------------------------------------------- |
676 // |
701 // |
677 gint CallIPAdpt::GetGlobalVolume(guint& volume) |
702 gint TMSCallIPAdpt::GetGlobalVolume(guint& volume) |
678 { |
703 { |
679 TRACE_PRN_FN_ENT; |
704 TRACE_PRN_FN_ENT; |
680 gint status(TMS_RESULT_INVALID_STATE); |
705 gint status(TMS_RESULT_INVALID_STATE); |
681 if (iDnlinkInitialized && iVoIPDownlink) |
706 if (iDnlinkInitialized && iIPDownlink) |
682 { |
707 { |
683 status = iVoIPDownlink->GetVolume(volume); |
708 status = iIPDownlink->GetVolume(volume); |
684 } |
709 } |
685 TRACE_PRN_FN_EXT; |
710 TRACE_PRN_FN_EXT; |
686 return status; |
711 return status; |
687 } |
712 } |
688 |
713 |
689 // ----------------------------------------------------------------------------- |
714 // ----------------------------------------------------------------------------- |
690 // CallIPAdpt::GetGlobalMaxGain |
715 // TMSCallIPAdpt::GetGlobalMaxGain |
691 // |
716 // |
692 // ----------------------------------------------------------------------------- |
717 // ----------------------------------------------------------------------------- |
693 // |
718 // |
694 gint CallIPAdpt::GetGlobalMaxGain(guint& gain) |
719 gint TMSCallIPAdpt::GetGlobalMaxGain(guint& gain) |
695 { |
720 { |
696 TRACE_PRN_FN_ENT; |
721 TRACE_PRN_FN_ENT; |
697 gint status(TMS_RESULT_INVALID_STATE); |
722 gint status(TMS_RESULT_INVALID_STATE); |
698 if (iUplinkInitialized && iVoIPUplink) |
723 if (iUplinkInitialized && iIPUplink) |
699 { |
724 { |
700 status = iVoIPUplink->GetMaxGain(gain); |
725 status = iIPUplink->GetMaxGain(gain); |
701 iMaxGain = gain; |
726 iMaxGain = gain; |
702 TRACE_PRN_N1(_L("TMS->CallIPAdpt::GetMaxGain [%d]"), iMaxGain); |
727 TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetMaxGain [%d]"), iMaxGain); |
703 } |
728 } |
704 TRACE_PRN_FN_EXT; |
729 TRACE_PRN_FN_EXT; |
705 return status; |
730 return status; |
706 } |
731 } |
707 |
732 |
708 // ----------------------------------------------------------------------------- |
733 // ----------------------------------------------------------------------------- |
709 // CallIPAdpt::SetGlobalGain |
734 // TMSCallIPAdpt::SetGlobalGain |
710 // |
735 // |
711 // ----------------------------------------------------------------------------- |
736 // ----------------------------------------------------------------------------- |
712 // |
737 // |
713 gint CallIPAdpt::SetGlobalGain(const guint gain) |
738 gint TMSCallIPAdpt::SetGlobalGain(const guint gain) |
714 { |
739 { |
715 TRACE_PRN_FN_ENT; |
740 TRACE_PRN_FN_ENT; |
716 gint status(TMS_RESULT_INVALID_STATE); |
741 gint status(TMS_RESULT_INVALID_STATE); |
717 if (iUplinkInitialized && iVoIPUplink) |
742 if (iUplinkInitialized && iIPUplink) |
718 { |
743 { |
719 status = iVoIPUplink->SetGain(gain); |
744 status = iIPUplink->SetGain(gain); |
720 } |
745 } |
721 TRACE_PRN_FN_EXT; |
746 TRACE_PRN_FN_EXT; |
722 return status; |
747 return status; |
723 } |
748 } |
724 |
749 |
725 // ----------------------------------------------------------------------------- |
750 // ----------------------------------------------------------------------------- |
726 // CallIPAdpt::GetGlobalGain |
751 // TMSCallIPAdpt::GetGlobalGain |
727 // |
752 // |
728 // ----------------------------------------------------------------------------- |
753 // ----------------------------------------------------------------------------- |
729 // |
754 // |
730 gint CallIPAdpt::GetGlobalGain(guint& gain) |
755 gint TMSCallIPAdpt::GetGlobalGain(guint& gain) |
731 { |
756 { |
732 TRACE_PRN_FN_ENT; |
757 TRACE_PRN_FN_ENT; |
733 gint status(TMS_RESULT_INVALID_STATE); |
758 gint status(TMS_RESULT_INVALID_STATE); |
734 if (iUplinkInitialized && iVoIPUplink) |
759 if (iUplinkInitialized && iIPUplink) |
735 { |
760 { |
736 status = iVoIPUplink->GetGain(gain); |
761 status = iIPUplink->GetGain(gain); |
737 } |
762 } |
738 TRACE_PRN_FN_EXT; |
763 TRACE_PRN_FN_EXT; |
739 return status; |
764 return status; |
740 } |
765 } |
741 |
766 |
742 // ----------------------------------------------------------------------------- |
767 // ----------------------------------------------------------------------------- |
743 // CallIPAdpt::GetCodecMode |
768 // TMSCallIPAdpt::GetCodecMode |
744 // |
769 // |
745 // ----------------------------------------------------------------------------- |
770 // ----------------------------------------------------------------------------- |
746 // |
771 // |
747 gint CallIPAdpt::GetCodecMode(const TMSFormatType fmttype, |
772 gint TMSCallIPAdpt::GetCodecMode(const TMSFormatType fmttype, |
748 const TMSStreamType strmtype, gint& mode) |
773 const TMSStreamType strmtype, gint& mode) |
749 { |
774 { |
750 TRACE_PRN_FN_ENT; |
775 TRACE_PRN_FN_ENT; |
751 gint status(TMS_RESULT_SUCCESS); |
776 gint status(TMS_RESULT_SUCCESS); |
752 switch (fmttype) |
777 switch (fmttype) |
790 TRACE_PRN_FN_EXT; |
815 TRACE_PRN_FN_EXT; |
791 return status; |
816 return status; |
792 } |
817 } |
793 |
818 |
794 // ----------------------------------------------------------------------------- |
819 // ----------------------------------------------------------------------------- |
795 // CallIPAdpt::GetSupportedBitRatesCount |
820 // TMSCallIPAdpt::GetSupportedBitRatesCount |
796 // |
821 // |
797 // ----------------------------------------------------------------------------- |
822 // ----------------------------------------------------------------------------- |
798 // |
823 // |
799 gint CallIPAdpt::GetSupportedBitRatesCount(guint& count) |
824 gint TMSCallIPAdpt::GetSupportedBitRatesCount(guint& count) |
800 { |
825 { |
801 TRACE_PRN_FN_ENT; |
826 TRACE_PRN_FN_ENT; |
802 gint status(TMS_RESULT_INVALID_STATE); |
827 gint status(TMS_RESULT_INVALID_STATE); |
803 if (iVoIPUplink) |
828 if (iIPUplink) |
804 { |
829 { |
805 status = iVoIPUplink->GetSupportedBitrates(iArrBitrates); |
830 status = iIPUplink->GetSupportedBitrates(iArrBitrates); |
806 count = iArrBitrates.Count(); |
831 count = iArrBitrates.Count(); |
807 } |
832 } |
808 TRACE_PRN_FN_EXT; |
833 TRACE_PRN_FN_EXT; |
809 return status; |
834 return status; |
810 } |
835 } |
811 |
836 |
812 // ----------------------------------------------------------------------------- |
837 // ----------------------------------------------------------------------------- |
813 // CallIPAdpt::GetSupportedBitRates |
838 // TMSCallIPAdpt::GetSupportedBitRates |
814 // |
839 // |
815 // Bitrates are already returned from the codec as a result of call to |
840 // Bitrates are already returned from the codec as a result of call to |
816 // GetSupportedBitratesCount(). Just pack them into a descriptor and return |
841 // GetSupportedBitratesCount(). Just pack them into a descriptor and return |
817 // back to the client. |
842 // back to the client. |
818 // ----------------------------------------------------------------------------- |
843 // ----------------------------------------------------------------------------- |
819 // |
844 // |
820 gint CallIPAdpt::GetSupportedBitRates(CBufFlat*& brbuffer) |
845 gint TMSCallIPAdpt::GetSupportedBitRates(CBufFlat*& brbuffer) |
821 { |
846 { |
822 TRAPD(status, GetSupportedBitRatesL(brbuffer)); |
847 TRAPD(status, GetSupportedBitRatesL(brbuffer)); |
823 return status; |
848 return status; |
824 } |
849 } |
825 |
850 |
826 // ----------------------------------------------------------------------------- |
851 // ----------------------------------------------------------------------------- |
827 // CallIPAdpt::GetSupportedBitRatesL |
852 // TMSCallIPAdpt::GetSupportedBitRatesL |
828 // |
853 // |
829 // GetSupportedBitRates implementation which can leave. |
854 // GetSupportedBitRates implementation which can leave. |
830 // ----------------------------------------------------------------------------- |
855 // ----------------------------------------------------------------------------- |
831 // |
856 // |
832 void CallIPAdpt::GetSupportedBitRatesL(CBufFlat*& brbuffer) |
857 void TMSCallIPAdpt::GetSupportedBitRatesL(CBufFlat*& brbuffer) |
833 { |
858 { |
834 TRACE_PRN_FN_ENT; |
859 TRACE_PRN_FN_ENT; |
835 RBufWriteStream stream; |
860 RBufWriteStream stream; |
836 stream.Open(*brbuffer); |
861 stream.Open(*brbuffer); |
837 CleanupClosePushL(stream); |
862 CleanupClosePushL(stream); |
838 guint numOfItems = iArrBitrates.Count(); |
863 guint numOfItems = iArrBitrates.Count(); |
839 |
864 |
840 for (guint i = 0; i < numOfItems; i++) |
865 for (guint i = 0; i < numOfItems; i++) |
841 { |
866 { |
842 stream.WriteUint32L(iArrBitrates[i]); |
867 stream.WriteUint32L(iArrBitrates[i]); |
843 //TRACE_PRN_N1(_L("TMS->CallIPAdpt: BR: [%d]"), iArrBitrates[i]); |
868 //TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt: BR: [%d]"), iArrBitrates[i]); |
844 } |
869 } |
845 |
870 |
846 CleanupStack::PopAndDestroy(&stream); |
871 CleanupStack::PopAndDestroy(&stream); |
847 TRACE_PRN_FN_EXT; |
872 TRACE_PRN_FN_EXT; |
848 } |
873 } |
849 |
874 |
850 // ----------------------------------------------------------------------------- |
875 // ----------------------------------------------------------------------------- |
851 // CallIPAdpt::GetBitRate |
876 // TMSCallIPAdpt::GetBitRate |
852 // |
877 // |
853 // ----------------------------------------------------------------------------- |
878 // ----------------------------------------------------------------------------- |
854 // |
879 // |
855 gint CallIPAdpt::GetBitRate(guint& bitrate) |
880 gint TMSCallIPAdpt::GetBitRate(guint& bitrate) |
856 { |
881 { |
857 TRACE_PRN_FN_ENT; |
882 TRACE_PRN_FN_ENT; |
858 gint status(TMS_RESULT_INVALID_STATE); |
883 gint status(TMS_RESULT_INVALID_STATE); |
859 if (iVoIPUplink) |
884 if (iIPUplink) |
860 { |
885 { |
861 status = iVoIPUplink->GetBitrate(bitrate); |
886 status = iIPUplink->GetBitrate(bitrate); |
862 } |
887 } |
863 TRACE_PRN_FN_EXT; |
888 TRACE_PRN_FN_EXT; |
864 return status; |
889 return status; |
865 } |
890 } |
866 |
891 |
867 // ----------------------------------------------------------------------------- |
892 // ----------------------------------------------------------------------------- |
868 // CallIPAdpt::SetBitRate |
893 // TMSCallIPAdpt::SetBitRate |
869 // |
894 // |
870 // ----------------------------------------------------------------------------- |
895 // ----------------------------------------------------------------------------- |
871 // |
896 // |
872 gint CallIPAdpt::SetBitRate(const guint bitrate) |
897 gint TMSCallIPAdpt::SetBitRate(const guint bitrate) |
873 { |
898 { |
874 TRACE_PRN_FN_ENT; |
899 TRACE_PRN_FN_ENT; |
875 gint status(TMS_RESULT_INVALID_STATE); |
900 gint status(TMS_RESULT_INVALID_STATE); |
876 if (iVoIPUplink) |
901 if (iIPUplink) |
877 { |
902 { |
878 status = iVoIPUplink->SetBitrate(bitrate); |
903 status = iIPUplink->SetBitrate(bitrate); |
879 } |
904 } |
880 TRACE_PRN_FN_EXT; |
905 TRACE_PRN_FN_EXT; |
881 return status; |
906 return status; |
882 } |
907 } |
883 |
908 |
884 // ----------------------------------------------------------------------------- |
909 // ----------------------------------------------------------------------------- |
885 // CallIPAdpt::GetVAD |
910 // TMSCallIPAdpt::GetVAD |
886 // |
911 // |
887 // ----------------------------------------------------------------------------- |
912 // ----------------------------------------------------------------------------- |
888 // |
913 // |
889 gint CallIPAdpt::GetVAD(const TMSFormatType fmttype, gboolean& vad) |
914 gint TMSCallIPAdpt::GetVAD(const TMSFormatType fmttype, gboolean& vad) |
890 { |
915 { |
891 TRACE_PRN_FN_ENT; |
916 TRACE_PRN_FN_ENT; |
892 gint status(TMS_RESULT_INVALID_STATE); |
917 gint status(TMS_RESULT_INVALID_STATE); |
893 if (iVoIPUplink) |
918 if (iIPUplink) |
894 { |
919 { |
895 status = iVoIPUplink->GetVad(fmttype, vad); |
920 status = iIPUplink->GetVad(fmttype, vad); |
896 } |
921 } |
897 TRACE_PRN_FN_EXT; |
922 TRACE_PRN_FN_EXT; |
898 return status; |
923 return status; |
899 } |
924 } |
900 |
925 |
901 // ----------------------------------------------------------------------------- |
926 // ----------------------------------------------------------------------------- |
902 // CallIPAdpt::SetVAD |
927 // TMSCallIPAdpt::SetVAD |
903 // |
928 // |
904 // ----------------------------------------------------------------------------- |
929 // ----------------------------------------------------------------------------- |
905 // |
930 // |
906 gint CallIPAdpt::SetVAD(const TMSFormatType fmttype, const gboolean vad) |
931 gint TMSCallIPAdpt::SetVAD(const TMSFormatType fmttype, const gboolean vad) |
907 { |
932 { |
908 TRACE_PRN_FN_ENT; |
933 TRACE_PRN_FN_ENT; |
909 gint status(TMS_RESULT_INVALID_STATE); |
934 gint status(TMS_RESULT_INVALID_STATE); |
910 if (iVoIPUplink) |
935 if (iIPUplink) |
911 { |
936 { |
912 status = iVoIPUplink->SetVad(fmttype, vad); |
937 status = iIPUplink->SetVad(fmttype, vad); |
913 } |
938 } |
914 TRACE_PRN_FN_EXT; |
939 TRACE_PRN_FN_EXT; |
915 return status; |
940 return status; |
916 } |
941 } |
917 |
942 |
918 // ----------------------------------------------------------------------------- |
943 // ----------------------------------------------------------------------------- |
919 // CallIPAdpt::GetCNG |
944 // TMSCallIPAdpt::GetCNG |
920 // |
945 // |
921 // ----------------------------------------------------------------------------- |
946 // ----------------------------------------------------------------------------- |
922 // |
947 // |
923 gint CallIPAdpt::GetCNG(const TMSFormatType fmttype, gboolean& cng) |
948 gint TMSCallIPAdpt::GetCNG(const TMSFormatType fmttype, gboolean& cng) |
924 { |
949 { |
925 TRACE_PRN_FN_ENT; |
950 TRACE_PRN_FN_ENT; |
926 gint status(TMS_RESULT_INVALID_STATE); |
951 gint status(TMS_RESULT_INVALID_STATE); |
927 if (iVoIPDownlink) |
952 if (iIPDownlink) |
928 { |
953 { |
929 status = iVoIPDownlink->GetCng(fmttype, cng); |
954 status = iIPDownlink->GetCng(fmttype, cng); |
930 } |
955 } |
931 TRACE_PRN_FN_EXT; |
956 TRACE_PRN_FN_EXT; |
932 return status; |
957 return status; |
933 } |
958 } |
934 |
959 |
935 // ----------------------------------------------------------------------------- |
960 // ----------------------------------------------------------------------------- |
936 // CallIPAdpt::SetCNG |
961 // TMSCallIPAdpt::SetCNG |
937 // |
962 // |
938 // ----------------------------------------------------------------------------- |
963 // ----------------------------------------------------------------------------- |
939 // |
964 // |
940 gint CallIPAdpt::SetCNG(const TMSFormatType fmttype, const gboolean cng) |
965 gint TMSCallIPAdpt::SetCNG(const TMSFormatType fmttype, const gboolean cng) |
941 { |
966 { |
942 TRACE_PRN_FN_ENT; |
967 TRACE_PRN_FN_ENT; |
943 gint status(TMS_RESULT_INVALID_STATE); |
968 gint status(TMS_RESULT_INVALID_STATE); |
944 if (iVoIPDownlink) |
969 if (iIPDownlink) |
945 { |
970 { |
946 status = iVoIPDownlink->SetCng(fmttype, cng); |
971 status = iIPDownlink->SetCng(fmttype, cng); |
947 } |
972 } |
948 TRACE_PRN_FN_EXT; |
973 TRACE_PRN_FN_EXT; |
949 return status; |
974 return status; |
950 } |
975 } |
951 |
976 |
952 // ----------------------------------------------------------------------------- |
977 // ----------------------------------------------------------------------------- |
953 // CallIPAdpt::GetPlc |
978 // TMSCallIPAdpt::GetPlc |
954 // |
979 // |
955 // ----------------------------------------------------------------------------- |
980 // ----------------------------------------------------------------------------- |
956 // |
981 // |
957 gint CallIPAdpt::GetPlc(const TMSFormatType fmttype, gboolean& plc) |
982 gint TMSCallIPAdpt::GetPlc(const TMSFormatType fmttype, gboolean& plc) |
958 { |
983 { |
959 TRACE_PRN_FN_ENT; |
984 TRACE_PRN_FN_ENT; |
960 gint status(TMS_RESULT_INVALID_STATE); |
985 gint status(TMS_RESULT_INVALID_STATE); |
961 if (iVoIPDownlink) |
986 if (iIPDownlink) |
962 { |
987 { |
963 status = iVoIPDownlink->GetPlc(fmttype, plc); |
988 status = iIPDownlink->GetPlc(fmttype, plc); |
964 } |
989 } |
965 TRACE_PRN_FN_EXT; |
990 TRACE_PRN_FN_EXT; |
966 return status; |
991 return status; |
967 } |
992 } |
968 |
993 |
969 // ----------------------------------------------------------------------------- |
994 // ----------------------------------------------------------------------------- |
970 // CallIPAdpt::SetPlc |
995 // TMSCallIPAdpt::SetPlc |
971 // |
996 // |
972 // ----------------------------------------------------------------------------- |
997 // ----------------------------------------------------------------------------- |
973 // |
998 // |
974 gint CallIPAdpt::SetPlc(const TMSFormatType fmttype, const gboolean plc) |
999 gint TMSCallIPAdpt::SetPlc(const TMSFormatType fmttype, const gboolean plc) |
975 { |
1000 { |
976 TRACE_PRN_FN_ENT; |
1001 TRACE_PRN_FN_ENT; |
977 gint status(TMS_RESULT_INVALID_STATE); |
1002 gint status(TMS_RESULT_INVALID_STATE); |
978 if (iVoIPDownlink) |
1003 if (iIPDownlink) |
979 { |
1004 { |
980 status = iVoIPDownlink->SetPlc(fmttype, plc); |
1005 status = iIPDownlink->SetPlc(fmttype, plc); |
981 } |
1006 } |
982 TRACE_PRN_FN_EXT; |
1007 TRACE_PRN_FN_EXT; |
983 return status; |
1008 return status; |
984 } |
1009 } |
985 |
1010 |
986 // ----------------------------------------------------------------------------- |
1011 // ----------------------------------------------------------------------------- |
987 // CallIPAdpt::OpenDownlinkL |
1012 // TMSCallIPAdpt::OpenDownlinkL |
988 // Method for player initialization. |
1013 // Method for player initialization. |
989 // ----------------------------------------------------------------------------- |
1014 // ----------------------------------------------------------------------------- |
990 // |
1015 // |
991 gint CallIPAdpt::OpenDownlinkL(const RMessage2& aMessage) |
1016 gint TMSCallIPAdpt::OpenDownlinkL(const RMessage2& aMessage) |
992 { |
1017 { |
993 TRACE_PRN_FN_ENT; |
1018 TRACE_PRN_FN_ENT; |
994 gint status(TMS_RESULT_SUCCESS); |
1019 gint status(TMS_RESULT_SUCCESS); |
995 |
1020 |
996 // Ensure clients have MultimediaDD capability to use this priority/pref |
1021 // Clients must have MultimediaDD capability to use this priority/pref. |
997 // TODO: TMS must monitor for emergency call now |
1022 // TODO: Also, TMS will monitor for emergency call and if detected it |
998 iPriority.iPref = TMdaPriorityPreference(KAudioPrefVoipAudioDownlink); |
1023 // will deny access to audio resources. |
999 iPriority.iPriority = TMdaPriority(KAudioPriorityVoipAudioDownlink); |
1024 iPriority.iPref = KAudioPrefVoipAudioDownlink; |
1000 |
1025 iPriority.iPriority = KAudioPriorityVoipAudioDownlink; |
1001 if (!iVoIPDownlink) |
1026 |
1002 { |
1027 if (!iIPDownlink) |
1003 iVoIPDownlink = TMSVoIPDownlink::NewL(iDnFourCC, iPriority); |
1028 { |
1004 } |
1029 iIPDownlink = TMSIPDownlink::NewL(iDnFourCC, iPriority); |
1005 |
1030 } |
1006 if (iVoIPDownlink) |
1031 |
|
1032 if (iIPDownlink) |
1007 { |
1033 { |
1008 // Open message queue for handling server notifications to the client |
1034 // Open message queue for handling server notifications to the client |
1009 if (iMsgQueueDn.Handle() <= 0) |
1035 if (iMsgQueueDn.Handle() <= 0) |
1010 { |
1036 { |
1011 // Second argument in TMSCallProxy::InitStream |
1037 // Second argument in TMSCallProxy::InitStream |
1144 TRACE_PRN_FN_EXT; |
1170 TRACE_PRN_FN_EXT; |
1145 return status; |
1171 return status; |
1146 } |
1172 } |
1147 |
1173 |
1148 // ----------------------------------------------------------------------------- |
1174 // ----------------------------------------------------------------------------- |
1149 // CallIPAdpt::SetIlbcCodecMode |
1175 // TMSCallIPAdpt::SetIlbcCodecMode |
1150 // |
1176 // |
1151 // ----------------------------------------------------------------------------- |
1177 // ----------------------------------------------------------------------------- |
1152 // |
1178 // |
1153 gint CallIPAdpt::SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype) |
1179 gint TMSCallIPAdpt::SetIlbcCodecMode(const gint mode, |
|
1180 const TMSStreamType strmtype) |
1154 { |
1181 { |
1155 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1182 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1156 |
1183 |
1157 if (strmtype == TMS_STREAM_DOWNLINK) |
1184 if (strmtype == TMS_STREAM_DOWNLINK) |
1158 { |
1185 { |
1159 if (iDnlinkInitialized && iVoIPDownlink) |
1186 if (iDnlinkInitialized && iIPDownlink) |
1160 { |
1187 { |
1161 status = iVoIPDownlink->SetIlbcCodecMode(mode); |
1188 status = iIPDownlink->SetIlbcCodecMode(mode); |
1162 } |
1189 } |
1163 } |
1190 } |
1164 else if (strmtype == TMS_STREAM_UPLINK) |
1191 else if (strmtype == TMS_STREAM_UPLINK) |
1165 { |
1192 { |
1166 if (iUplinkInitialized && iVoIPUplink) |
1193 if (iUplinkInitialized && iIPUplink) |
1167 { |
1194 { |
1168 status = iVoIPUplink->SetIlbcCodecMode(mode); |
1195 status = iIPUplink->SetIlbcCodecMode(mode); |
1169 } |
1196 } |
1170 } |
1197 } |
1171 |
1198 |
1172 return status; |
1199 return status; |
1173 } |
1200 } |
1174 |
1201 |
1175 // ----------------------------------------------------------------------------- |
1202 // ----------------------------------------------------------------------------- |
1176 // CallIPAdpt::GetIlbcCodecMode |
1203 // TMSCallIPAdpt::GetIlbcCodecMode |
1177 // |
1204 // |
1178 // ----------------------------------------------------------------------------- |
1205 // ----------------------------------------------------------------------------- |
1179 // |
1206 // |
1180 gint CallIPAdpt::GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype) |
1207 gint TMSCallIPAdpt::GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype) |
1181 { |
1208 { |
1182 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1209 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1183 |
1210 |
1184 if (strmtype == TMS_STREAM_DOWNLINK) |
1211 if (strmtype == TMS_STREAM_DOWNLINK) |
1185 { |
1212 { |
1186 if (iDnlinkInitialized && iVoIPDownlink) |
1213 if (iDnlinkInitialized && iIPDownlink) |
1187 { |
1214 { |
1188 status = iVoIPDownlink->GetIlbcCodecMode(mode); |
1215 status = iIPDownlink->GetIlbcCodecMode(mode); |
1189 } |
1216 } |
1190 } |
1217 } |
1191 else if (strmtype == TMS_STREAM_UPLINK) |
1218 else if (strmtype == TMS_STREAM_UPLINK) |
1192 { |
1219 { |
1193 if (iUplinkInitialized && iVoIPUplink) |
1220 if (iUplinkInitialized && iIPUplink) |
1194 { |
1221 { |
1195 status = iVoIPUplink->GetIlbcCodecMode(mode); |
1222 status = iIPUplink->GetIlbcCodecMode(mode); |
1196 } |
1223 } |
1197 } |
1224 } |
1198 |
1225 |
1199 return status; |
1226 return status; |
1200 } |
1227 } |
1201 |
1228 |
1202 // ----------------------------------------------------------------------------- |
1229 // ----------------------------------------------------------------------------- |
1203 // CallIPAdpt::SetG711CodecMode |
1230 // TMSCallIPAdpt::SetG711CodecMode |
1204 // |
1231 // |
1205 // ----------------------------------------------------------------------------- |
1232 // ----------------------------------------------------------------------------- |
1206 // |
1233 // |
1207 gint CallIPAdpt::SetG711CodecMode(const gint mode, const TMSStreamType strmtype) |
1234 gint TMSCallIPAdpt::SetG711CodecMode(const gint mode, |
|
1235 const TMSStreamType strmtype) |
1208 { |
1236 { |
1209 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1237 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1210 |
1238 |
1211 if (strmtype == TMS_STREAM_DOWNLINK) |
1239 if (strmtype == TMS_STREAM_DOWNLINK) |
1212 { |
1240 { |
1213 if (iDnlinkInitialized && iVoIPDownlink) |
1241 if (iDnlinkInitialized && iIPDownlink) |
1214 { |
1242 { |
1215 status = iVoIPDownlink->SetG711CodecMode(mode); |
1243 status = iIPDownlink->SetG711CodecMode(mode); |
1216 } |
1244 } |
1217 } |
1245 } |
1218 else if (strmtype == TMS_STREAM_UPLINK) |
1246 else if (strmtype == TMS_STREAM_UPLINK) |
1219 { |
1247 { |
1220 if (iUplinkInitialized && iVoIPUplink) |
1248 if (iUplinkInitialized && iIPUplink) |
1221 { |
1249 { |
1222 status = iVoIPUplink->SetG711CodecMode(mode); |
1250 status = iIPUplink->SetG711CodecMode(mode); |
1223 } |
1251 } |
1224 } |
1252 } |
1225 |
1253 |
1226 return status; |
1254 return status; |
1227 } |
1255 } |
1228 |
1256 |
1229 // ----------------------------------------------------------------------------- |
1257 // ----------------------------------------------------------------------------- |
1230 // CallIPAdpt::GetG711CodecMode |
1258 // TMSCallIPAdpt::GetG711CodecMode |
1231 // |
1259 // |
1232 // ----------------------------------------------------------------------------- |
1260 // ----------------------------------------------------------------------------- |
1233 // |
1261 // |
1234 gint CallIPAdpt::GetG711CodecMode(gint& mode, const TMSStreamType strmtype) |
1262 gint TMSCallIPAdpt::GetG711CodecMode(gint& mode, const TMSStreamType strmtype) |
1235 { |
1263 { |
1236 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1264 gint status(TMS_RESULT_INVALID_ARGUMENT); |
1237 |
1265 |
1238 if (strmtype == TMS_STREAM_DOWNLINK) |
1266 if (strmtype == TMS_STREAM_DOWNLINK) |
1239 { |
1267 { |
1240 if (iDnlinkInitialized && iVoIPDownlink) |
1268 if (iDnlinkInitialized && iIPDownlink) |
1241 { |
1269 { |
1242 status = iVoIPDownlink->GetG711CodecMode(mode); |
1270 status = iIPDownlink->GetG711CodecMode(mode); |
1243 } |
1271 } |
1244 } |
1272 } |
1245 else if (strmtype == TMS_STREAM_UPLINK) |
1273 else if (strmtype == TMS_STREAM_UPLINK) |
1246 { |
1274 { |
1247 if (iUplinkInitialized && iVoIPUplink) |
1275 if (iUplinkInitialized && iIPUplink) |
1248 { |
1276 { |
1249 status = iVoIPUplink->GetG711CodecMode(mode); |
1277 status = iIPUplink->GetG711CodecMode(mode); |
1250 } |
1278 } |
1251 } |
1279 } |
1252 |
1280 |
1253 return status; |
1281 return status; |
1254 } |
1282 } |
1255 |
1283 |
1256 // ----------------------------------------------------------------------------- |
1284 // ----------------------------------------------------------------------------- |
1257 // CallIPAdpt::FrameModeRequiredForEC |
1285 // TMSCallIPAdpt::FrameModeRequiredForEC |
1258 // |
1286 // |
1259 // ----------------------------------------------------------------------------- |
1287 // ----------------------------------------------------------------------------- |
1260 // |
1288 // |
1261 gint CallIPAdpt::FrameModeRqrdForEC(gboolean& frmodereq) |
1289 gint TMSCallIPAdpt::FrameModeRqrdForEC(gboolean& frmodereq) |
1262 { |
1290 { |
1263 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1291 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1264 if (iVoIPDownlink) |
1292 if (iIPDownlink) |
1265 { |
1293 { |
1266 status = iVoIPDownlink->FrameModeRqrdForEC(frmodereq); |
1294 status = iIPDownlink->FrameModeRqrdForEC(frmodereq); |
1267 } |
1295 } |
1268 return status; |
1296 return status; |
1269 } |
1297 } |
1270 |
1298 |
1271 // ----------------------------------------------------------------------------- |
1299 // ----------------------------------------------------------------------------- |
1272 // CallIPAdpt::SetFrameMode |
1300 // TMSCallIPAdpt::SetFrameMode |
1273 // |
1301 // |
1274 // ----------------------------------------------------------------------------- |
1302 // ----------------------------------------------------------------------------- |
1275 // |
1303 // |
1276 gint CallIPAdpt::SetFrameMode(const gboolean frmode) |
1304 gint TMSCallIPAdpt::SetFrameMode(const gboolean frmode) |
1277 { |
1305 { |
1278 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1306 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1279 if (iVoIPDownlink) |
1307 if (iIPDownlink) |
1280 { |
1308 { |
1281 status = iVoIPDownlink->SetFrameMode(frmode); |
1309 status = iIPDownlink->SetFrameMode(frmode); |
1282 } |
1310 } |
1283 return status; |
1311 return status; |
1284 } |
1312 } |
1285 |
1313 |
1286 // ----------------------------------------------------------------------------- |
1314 // ----------------------------------------------------------------------------- |
1287 // CallIPAdpt::GetFrameMode |
1315 // TMSCallIPAdpt::GetFrameMode |
1288 // |
1316 // |
1289 // ----------------------------------------------------------------------------- |
1317 // ----------------------------------------------------------------------------- |
1290 // |
1318 // |
1291 gint CallIPAdpt::GetFrameMode(gboolean& frmode) |
1319 gint TMSCallIPAdpt::GetFrameMode(gboolean& frmode) |
1292 { |
1320 { |
1293 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1321 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1294 if (iVoIPDownlink) |
1322 if (iIPDownlink) |
1295 { |
1323 { |
1296 status = iVoIPDownlink->GetFrameMode(frmode); |
1324 status = iIPDownlink->GetFrameMode(frmode); |
1297 } |
1325 } |
1298 return status; |
1326 return status; |
1299 } |
1327 } |
1300 |
1328 |
1301 // ----------------------------------------------------------------------------- |
1329 // ----------------------------------------------------------------------------- |
1302 // CallIPAdpt::ConcealErrorForNextBuffer |
1330 // TMSCallIPAdpt::ConcealErrorForNextBuffer |
1303 // ----------------------------------------------------------------------------- |
1331 // ----------------------------------------------------------------------------- |
1304 // |
1332 // |
1305 gint CallIPAdpt::ConcealErrorForNextBuffer() |
1333 gint TMSCallIPAdpt::ConcealErrorForNextBuffer() |
1306 { |
1334 { |
1307 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1335 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1308 if (iVoIPDownlink) |
1336 if (iIPDownlink) |
1309 { |
1337 { |
1310 status = iVoIPDownlink->ConcealErrorForNextBuffer(); |
1338 status = iIPDownlink->ConcealErrorForNextBuffer(); |
1311 } |
1339 } |
1312 return status; |
1340 return status; |
1313 } |
1341 } |
1314 |
1342 |
1315 // ----------------------------------------------------------------------------- |
1343 // ----------------------------------------------------------------------------- |
1316 // CallIPAdpt::BadLsfNextBuffer |
1344 // TMSCallIPAdpt::BadLsfNextBuffer |
1317 // |
1345 // |
1318 // ----------------------------------------------------------------------------- |
1346 // ----------------------------------------------------------------------------- |
1319 // |
1347 // |
1320 gint CallIPAdpt::BadLsfNextBuffer() |
1348 gint TMSCallIPAdpt::BadLsfNextBuffer() |
1321 { |
1349 { |
1322 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1350 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1323 if (iVoIPDownlink) |
1351 if (iIPDownlink) |
1324 { |
1352 { |
1325 status = iVoIPDownlink->BadLsfNextBuffer(); |
1353 status = iIPDownlink->BadLsfNextBuffer(); |
1326 } |
1354 } |
1327 return status; |
1355 return status; |
1328 } |
1356 } |
1329 |
1357 |
1330 // ----------------------------------------------------------------------------- |
1358 // ----------------------------------------------------------------------------- |
1331 // CallIPAdpt::SetOutput |
1359 // TMSCallIPAdpt::SetOutput |
1332 // |
1360 // |
1333 // ----------------------------------------------------------------------------- |
1361 // ----------------------------------------------------------------------------- |
1334 // |
1362 // |
1335 gint CallIPAdpt::SetOutput(TMSAudioOutput output) |
1363 gint TMSCallIPAdpt::SetOutput(TMSAudioOutput output) |
1336 { |
1364 { |
1337 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1365 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1338 if (iDnlinkInitialized && iVoIPDownlink) |
1366 if (iDnlinkInitialized && iIPDownlink) |
1339 { |
1367 { |
1340 TRAP(status, iVoIPDownlink->SetAudioDeviceL(output)); |
1368 TRAP(status, iIPDownlink->SetAudioDeviceL(output)); |
1341 } |
1369 } |
1342 return status; |
1370 return status; |
1343 } |
1371 } |
1344 // ----------------------------------------------------------------------------- |
1372 // ----------------------------------------------------------------------------- |
1345 // CallIPAdpt::GetOutput |
1373 // TMSCallIPAdpt::GetOutput |
1346 // |
1374 // |
1347 // ----------------------------------------------------------------------------- |
1375 // ----------------------------------------------------------------------------- |
1348 // |
1376 // |
1349 gint CallIPAdpt::GetOutput(TMSAudioOutput& output) |
1377 gint TMSCallIPAdpt::GetOutput(TMSAudioOutput& output) |
1350 { |
1378 { |
1351 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1379 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
1352 if (iDnlinkInitialized && iVoIPDownlink) |
1380 if (iDnlinkInitialized && iIPDownlink) |
1353 { |
1381 { |
1354 TRAP(status, iVoIPDownlink->GetAudioDeviceL(output)); |
1382 TRAP(status, iIPDownlink->GetAudioDeviceL(output)); |
1355 } |
1383 } |
1356 return status; |
1384 return status; |
1357 } |
1385 } |
1358 // ----------------------------------------------------------------------------- |
1386 // ----------------------------------------------------------------------------- |
1359 // CallIPAdpt::GetPreviousOutput |
1387 // TMSCallIPAdpt::GetPreviousOutput |
1360 // |
1388 // |
1361 // ----------------------------------------------------------------------------- |
1389 // ----------------------------------------------------------------------------- |
1362 // |
1390 // |
1363 gint CallIPAdpt::GetPreviousOutput(TMSAudioOutput& /*output*/) |
1391 gint TMSCallIPAdpt::GetPreviousOutput(TMSAudioOutput& /*output*/) |
1364 { |
1392 { |
1365 return TMS_RESULT_FEATURE_NOT_SUPPORTED; |
1393 return TMS_RESULT_FEATURE_NOT_SUPPORTED; |
1366 } |
1394 } |
1367 |
1395 |
1368 // ----------------------------------------------------------------------------- |
1396 // ----------------------------------------------------------------------------- |
1369 // CallIPAdpt::GetAvailableOutputsL |
1397 // TMSCallIPAdpt::GetAvailableOutputsL |
1370 // |
1398 // |
1371 // ----------------------------------------------------------------------------- |
1399 // ----------------------------------------------------------------------------- |
1372 // |
1400 // |
1373 gint CallIPAdpt::GetAvailableOutputsL(gint& /*count*/, CBufFlat*& /*outputsbuffer*/) |
1401 gint TMSCallIPAdpt::GetAvailableOutputsL(gint& /*count*/, |
|
1402 CBufFlat*& /*outputsbuffer*/) |
1374 { |
1403 { |
1375 return TMS_RESULT_FEATURE_NOT_SUPPORTED; |
1404 return TMS_RESULT_FEATURE_NOT_SUPPORTED; |
1376 } |
1405 } |
1377 |
1406 |
1378 // ----------------------------------------------------------------------------- |
1407 // ----------------------------------------------------------------------------- |
1379 // CallIPAdpt::NotifyClient |
1408 // TMSCallIPAdpt::StartDTMF |
1380 // ----------------------------------------------------------------------------- |
1409 // |
1381 // |
1410 // ----------------------------------------------------------------------------- |
1382 void CallIPAdpt::NotifyClient(const gint strmId, const TInt aCommand, |
1411 // |
|
1412 gint TMSCallIPAdpt::StartDTMF(TMSStreamType strmtype, TDes& dtmfstring) |
|
1413 { |
|
1414 TRACE_PRN_FN_ENT; |
|
1415 TmsMsgBufPckg dtmfpckg; |
|
1416 if (strmtype == TMS_STREAM_DOWNLINK) |
|
1417 { |
|
1418 if (iDTMFDnlinkPlayer /*&& iDTMFDnlinkStatus*/) |
|
1419 { |
|
1420 iDTMFDnlinkPlayer->PlayDtmfTone(dtmfstring); |
|
1421 dtmfpckg().iStatus = TMS_RESULT_SUCCESS; |
|
1422 //TMS_EVENT_DTMF_TONE_STARTED |
|
1423 dtmfpckg().iRequest = ECmdDTMFOpenDnlinkComplete; |
|
1424 } |
|
1425 } |
|
1426 else if (strmtype == TMS_STREAM_UPLINK) |
|
1427 { |
|
1428 if (iDTMFUplinkPlayer /*&& iDTMFUplinkStatus*/) |
|
1429 { |
|
1430 iDTMFUplinkPlayer->PlayDtmfTone(dtmfstring); |
|
1431 dtmfpckg().iStatus = TMS_RESULT_SUCCESS; |
|
1432 //TMS_EVENT_DTMF_TONE_STARTED |
|
1433 dtmfpckg().iRequest = ECmdDTMFOpenUplinkComplete; |
|
1434 } |
|
1435 } |
|
1436 |
|
1437 if (iDTMFNotifier) |
|
1438 { |
|
1439 iDTMFNotifier->SetDtmf(dtmfpckg, TRUE); |
|
1440 } |
|
1441 TRACE_PRN_FN_EXT; |
|
1442 return TMS_RESULT_SUCCESS; |
|
1443 } |
|
1444 // ----------------------------------------------------------------------------- |
|
1445 // TMSCallIPAdpt::StopDTMF |
|
1446 // |
|
1447 // ----------------------------------------------------------------------------- |
|
1448 // |
|
1449 gint TMSCallIPAdpt::StopDTMF(TMSStreamType streamtype) |
|
1450 { |
|
1451 TRACE_PRN_FN_ENT; |
|
1452 |
|
1453 if (streamtype == TMS_STREAM_DOWNLINK) |
|
1454 { |
|
1455 iDTMFDnlinkPlayer->Cancel(); |
|
1456 } |
|
1457 else |
|
1458 { |
|
1459 iDTMFUplinkPlayer->Cancel(); |
|
1460 } |
|
1461 |
|
1462 TRACE_PRN_FN_EXT; |
|
1463 return TMS_RESULT_SUCCESS; |
|
1464 } |
|
1465 |
|
1466 // ----------------------------------------------------------------------------- |
|
1467 // TMSCallIPAdpt::ContinueDTMF |
|
1468 // |
|
1469 // ----------------------------------------------------------------------------- |
|
1470 // |
|
1471 gint TMSCallIPAdpt::ContinueDTMF(TBool /*continuesending*/) |
|
1472 { |
|
1473 TRACE_PRN_FN_ENT; |
|
1474 TRACE_PRN_FN_EXT; |
|
1475 return TMS_RESULT_FEATURE_NOT_SUPPORTED; |
|
1476 } |
|
1477 |
|
1478 //From DTMFTonePlayerObserver |
|
1479 // ----------------------------------------------------------------------------- |
|
1480 // TMSCallIPAdpt::DTMFInitCompleted |
|
1481 // |
|
1482 // ----------------------------------------------------------------------------- |
|
1483 // |
|
1484 void TMSCallIPAdpt::DTMFInitCompleted(TInt /*error*/) |
|
1485 { |
|
1486 //DTMF init status |
|
1487 TRACE_PRN_FN_ENT; |
|
1488 TRACE_PRN_FN_EXT; |
|
1489 } |
|
1490 |
|
1491 // ----------------------------------------------------------------------------- |
|
1492 // TMSCallIPAdpt::DTMFToneFinished |
|
1493 // |
|
1494 // ----------------------------------------------------------------------------- |
|
1495 // |
|
1496 void TMSCallIPAdpt::DTMFToneFinished(TInt error) |
|
1497 { |
|
1498 TRACE_PRN_FN_ENT; |
|
1499 TmsMsgBufPckg dtmfpckg; |
|
1500 |
|
1501 if(error == KErrUnderflow || error == KErrInUse) |
|
1502 { |
|
1503 error = TMS_RESULT_SUCCESS; |
|
1504 } |
|
1505 |
|
1506 dtmfpckg().iStatus = error; |
|
1507 //TMS_EVENT_DTMF_TONE_STOPPED |
|
1508 dtmfpckg().iRequest = ECmdDTMFTonePlayFinished; |
|
1509 if (iDTMFNotifier) |
|
1510 { |
|
1511 iDTMFNotifier->SetDtmf(dtmfpckg, TRUE); |
|
1512 } |
|
1513 TRACE_PRN_FN_EXT; |
|
1514 } |
|
1515 |
|
1516 // ----------------------------------------------------------------------------- |
|
1517 // TMSCallIPAdpt::NotifyClient |
|
1518 // ----------------------------------------------------------------------------- |
|
1519 // |
|
1520 void TMSCallIPAdpt::NotifyClient(const gint strmId, const TInt aCommand, |
1383 const TInt aStatus, const TInt64 /*aInt64*/) |
1521 const TInt aStatus, const TInt64 /*aInt64*/) |
1384 { |
1522 { |
1385 iMsgBuffer.iRequest = aCommand; |
1523 iMsgBuffer.iRequest = aCommand; |
1386 iMsgBuffer.iStatus = aStatus; |
1524 iMsgBuffer.iStatus = aStatus; |
1387 |
1525 |