22 #include <e32msgqueue.h> |
22 #include <e32msgqueue.h> |
23 #include <mmcccodecinformation.h> |
23 #include <mmcccodecinformation.h> |
24 #include "tmsclientserver.h" |
24 #include "tmsclientserver.h" |
25 #include "tmsshared.h" |
25 #include "tmsshared.h" |
26 #include "calladpt.h" |
26 #include "calladpt.h" |
|
27 #include "cpeaudiodtmftoneplayer.h" |
|
28 #include "dtmfnotifier.h" |
27 |
29 |
28 namespace TMS { |
30 namespace TMS { |
29 |
31 |
30 // FORWARD DECLARATIONS |
32 // FORWARD DECLARATIONS |
31 class TMSVoIPDownlink; |
33 class TMSIPDownlink; |
32 class TMSVoIPUplink; |
34 class TMSIPUplink; |
33 |
35 |
34 // CallIPAdpt class |
36 // TMSCallIPAdpt class |
35 class CallIPAdpt : public CallAdpt |
37 class TMSCallIPAdpt : public TMSCallAdpt, |
|
38 public TMSDTMFTonePlayerObserver |
36 { |
39 { |
37 public: |
40 public: |
38 // Constractor |
41 // Constractor |
39 static CallIPAdpt* NewL(); |
42 static TMSCallIPAdpt* NewL(); |
40 |
43 |
41 virtual ~CallIPAdpt(); |
44 virtual ~TMSCallIPAdpt(); |
42 virtual gint PostConstruct(); |
45 virtual gint PostConstruct(); |
43 |
46 |
44 virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType, |
47 virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType, |
45 gint& outStrmId); |
48 gint& outStrmId); |
46 virtual gint InitStreamL(TMSCallType callType, TMSStreamType strmType, |
49 virtual gint InitStreamL(TMSCallType callType, TMSStreamType strmType, |
94 virtual gint SetOutput(TMSAudioOutput output); |
97 virtual gint SetOutput(TMSAudioOutput output); |
95 virtual gint GetOutput(TMSAudioOutput& output); |
98 virtual gint GetOutput(TMSAudioOutput& output); |
96 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
99 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
97 virtual gint GetAvailableOutputsL(TInt& count, CBufFlat*& outputsbuffer); |
100 virtual gint GetAvailableOutputsL(TInt& count, CBufFlat*& outputsbuffer); |
98 |
101 |
|
102 virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring); |
|
103 virtual gint StopDTMF(TMSStreamType streamtype); |
|
104 virtual gint ContinueDTMF(TBool continuesending); |
|
105 |
99 gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype); |
106 gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype); |
100 gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype); |
107 gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype); |
101 gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype); |
108 gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype); |
102 gint GetG711CodecMode(gint& mode, const TMSStreamType strmtype); |
109 gint GetG711CodecMode(gint& mode, const TMSStreamType strmtype); |
103 gint FrameModeRqrdForEC(gboolean& frmodereq); |
110 gint FrameModeRqrdForEC(gboolean& frmodereq); |
113 void BufferFilledL(TUint dataSize); |
120 void BufferFilledL(TUint dataSize); |
114 void BufferEmptiedL(); |
121 void BufferEmptiedL(); |
115 gint GetDataXferChunkHndl(const TMSStreamType strmType, |
122 gint GetDataXferChunkHndl(const TMSStreamType strmType, |
116 const TUint32 key, RChunk& chunk); |
123 const TUint32 key, RChunk& chunk); |
117 |
124 |
|
125 //From DTMFTonePlayerObserver |
|
126 void DTMFInitCompleted(TInt error); |
|
127 void DTMFToneFinished(TInt error); |
|
128 |
118 private: |
129 private: |
119 void ConstructL(); |
130 void ConstructL(); |
120 CallIPAdpt(); |
131 TMSCallIPAdpt(); |
121 |
132 |
122 void NotifyClient(const gint strmId, const TInt aCommand, |
133 void NotifyClient(const gint strmId, const TInt aCommand, |
123 const TInt aStatus = KErrNone, const TInt64 aInt64 = TInt64(0)); |
134 const TInt aStatus = KErrNone, const TInt64 aInt64 = TInt64(0)); |
124 //void DetermineG711FrameRateL(); //G711 10/20ms |
135 //void DetermineG711FrameRateL(); //G711 10/20ms |
125 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
136 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
129 gboolean iUplinkInitialized; |
140 gboolean iUplinkInitialized; |
130 gint iUplinkStreamId; |
141 gint iUplinkStreamId; |
131 gboolean iDnlinkInitialized; |
142 gboolean iDnlinkInitialized; |
132 gint iDnlinkStreamId; |
143 gint iDnlinkStreamId; |
133 |
144 |
134 TMSVoIPDownlink* iVoIPDownlink; |
145 TMSIPDownlink* iIPDownlink; |
135 TMSVoIPUplink* iVoIPUplink; |
146 TMSIPUplink* iIPUplink; |
136 |
147 |
137 // Message queues for communication and data transfer back to the client |
148 // Message queues for communication and data transfer back to the client |
138 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
149 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
139 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
150 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
140 |
151 |