38 class TMSAudioDtmfTonePlayer; |
39 class TMSAudioDtmfTonePlayer; |
39 class TMSDTMFProvider; |
40 class TMSDTMFProvider; |
40 class TMSDtmfNotifier; |
41 class TMSDtmfNotifier; |
41 |
42 |
42 /* |
43 /* |
43 * CallCSAdapt class |
44 * TMSCallCSAdpt class |
44 */ |
45 */ |
45 class TMSCallCSAdpt : public TMSCallAdpt, |
46 class TMSCallCSAdpt : public TMSCallAdpt, |
46 public TMSCSPDevSoundObserver, |
47 public TMSCSDevSoundObserver, |
47 public MTelephonyAudioRoutingObserver, |
48 public MTelephonyAudioRoutingObserver, |
48 public TMSDTMFTonePlayerObserver, |
49 public TMSDTMFTonePlayerObserver, |
49 public TMSDTMFObserver |
50 public TMSDTMFObserver |
50 { |
51 { |
51 public: |
52 public: |
52 TMSCallCSAdpt(); |
53 static TMSCallCSAdpt* NewL(); |
53 virtual ~TMSCallCSAdpt(); |
54 virtual ~TMSCallCSAdpt(); |
54 virtual gint PostConstruct(); |
55 virtual gint PostConstruct(); |
55 |
56 |
56 virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType, |
57 // From TMSStream |
57 gint& outStrmId); |
58 virtual gint CreateStream(const TMSCallType callType, |
58 virtual gint InitStream(TMSCallType callType, TMSStreamType strmType, |
59 const TMSStreamType strmType, gint& outStrmId); |
59 gint strmId, TMSFormatType frmtType, const RMessage2& message); |
60 virtual gint InitStream(const TMSCallType callType, |
60 virtual gint StartStream(TMSCallType callType, TMSStreamType strmType, |
61 const TMSStreamType strmType, const gint strmId, |
61 gint strmId); |
62 const TMSFormatType frmtType, const gint retryTime, |
62 virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType, |
63 const RMessage2& message); |
63 gint strmId); |
64 virtual gint StartStream(const TMSCallType callType, |
64 virtual gint StopStream(TMSCallType callType, TMSStreamType strmType, |
65 const TMSStreamType strmType, const gint strmId, |
65 gint strmId); |
66 const gint retrytime); |
66 virtual gint DeinitStream(TMSCallType callType, TMSStreamType strmType, |
67 virtual gint PauseStream(const TMSCallType callType, |
67 gint strmId); |
68 const TMSStreamType strmType, const gint strmId); |
68 virtual gint DeleteStream(TMSCallType callType, TMSStreamType strmType, |
69 virtual gint StopStream(const TMSCallType callType, |
69 gint strmId); |
70 const TMSStreamType strmType, const gint strmId); |
70 virtual gint DataXferBufferEmptied(TMSCallType callType, |
71 virtual gint DeinitStream(const TMSCallType callType, |
71 TMSStreamType strmType, gint strmId); |
72 const TMSStreamType strmType, const gint strmId); |
72 virtual gint DataXferBufferFilled(TMSCallType callType, |
73 virtual gint DeleteStream(const TMSCallType callType, |
73 TMSStreamType strmType, gint strmId, guint datasize); |
74 const TMSStreamType strmType, const gint strmId); |
|
75 virtual gint DataXferBufferEmptied(const TMSCallType callType, |
|
76 const TMSStreamType strmType, const gint strmId); |
|
77 virtual gint DataXferBufferFilled(const TMSCallType callType, |
|
78 const TMSStreamType strmType, const gint strmId, |
|
79 const guint datasize); |
74 virtual gint GetDataXferBufferHndl(const TMSCallType callType, |
80 virtual gint GetDataXferBufferHndl(const TMSCallType callType, |
75 const TMSStreamType strmType, const gint strmId, |
81 const TMSStreamType strmType, const gint strmId, |
76 const guint32 key, RChunk& chunk); |
82 const guint32 key, RChunk& chunk); |
77 |
83 |
78 // From TMS effects |
84 // From TMS effects |
104 virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng); |
110 virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng); |
105 virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc); |
111 virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc); |
106 virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); |
112 virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); |
107 |
113 |
108 // From TMS audio routing |
114 // From TMS audio routing |
109 virtual gint SetOutput(TMSAudioOutput output); |
115 virtual gint SetOutput(const TMSAudioOutput output); |
110 virtual gint GetOutput(TMSAudioOutput& output); |
116 virtual gint GetOutput(TMSAudioOutput& output); |
111 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
117 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
112 virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer); |
118 virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf); |
113 |
119 |
114 // From TMSDTMF |
120 // From TMSDTMF |
115 virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring); |
121 virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr); |
116 virtual gint StopDTMF(TMSStreamType streamtype); |
122 virtual gint StopDTMF(const TMSStreamType streamtype); |
117 virtual gint ContinueDTMF(TBool continuesending); |
123 virtual gint ContinueDTMF(const gboolean sending); |
118 |
124 |
119 //From TMSCSPDevSoundObserver |
125 //From TMSCSDevSoundObserver |
120 void DownlinkInitCompleted(TInt status); |
126 void DownlinkInitCompleted(gint status); |
121 void UplinkInitCompleted(TInt status); |
127 void UplinkInitCompleted(gint status); |
122 void UplinkActivatedSuccessfully(); |
128 void DownlinkActivationCompleted(gint status); |
123 void DownlinkActivatedSuccessfully(); |
129 void UplinkActivationCompleted(gint status); |
124 void UplinkActivationFailed(); |
|
125 void DownlinkActivationFailed(); |
|
126 |
130 |
127 //From DTMFTonePlayerObserver |
131 //From TMSDTMFTonePlayerObserver |
128 void DTMFInitCompleted(TInt error); |
132 void DTMFInitCompleted(gint status); |
129 void DTMFToneFinished(TInt error); |
133 void DTMFToneFinished(gint status); |
130 |
134 |
131 //From TMSDTMFObserver |
135 //From TMSDTMFObserver |
132 void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent aEvent, |
136 void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event, |
133 const TInt aError, const TChar aTone); |
137 const gint status, const TChar tone); |
134 |
138 |
135 private: |
139 private: |
|
140 TMSCallCSAdpt(); |
|
141 void ConstructL(); |
|
142 |
|
143 gint InitUplink(const gint retrytime); |
|
144 gint InitDownlink(const gint retrytime); |
136 void AvailableOutputsChanged( |
145 void AvailableOutputsChanged( |
137 CTelephonyAudioRouting& aTelephonyAudioRouting); |
146 CTelephonyAudioRouting& aTelephonyAudioRouting); |
138 void OutputChanged(CTelephonyAudioRouting& aTelephonyAudioRouting); |
147 void OutputChanged(CTelephonyAudioRouting& aTelephonyAudioRouting); |
139 void SetOutputComplete(CTelephonyAudioRouting& aTelephonyAudioRouting, |
148 void SetOutputComplete(CTelephonyAudioRouting& aTelephonyAudioRouting, |
140 gint aError); |
149 gint status); |
141 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
150 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
142 void NotifyClient(const gint strmId, const gint command, |
151 void NotifyClient(const gint strmId, const gint command, |
143 const gint status = KErrNone, const gint64 int64 = TInt64(0)); |
152 const gint status = KErrNone, const gint64 int64 = TInt64(0)); |
144 |
153 |
145 private: |
154 private: |
146 gint iNextStreamId; |
155 gint iNextStreamId; |
147 |
|
148 TMSCSUplink* iCSUplink; |
156 TMSCSUplink* iCSUplink; |
149 TMSCSDownlink* iCSDownlink; |
157 TMSCSDownlink* iCSDownlink; |
150 CTelephonyAudioRouting* iRouting; |
158 CTelephonyAudioRouting* iRouting; |
151 TMSTarSettings* iTarSettings; |
159 TMSTarSettings* iTarSettings; |
152 TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer; |
160 TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer; |
153 TMSDtmfNotifier* iDTMFNotifier; |
161 TMSDtmfNotifier* iDTMFNotifier; |
154 TMSDTMFProvider* iDTMFUplinkPlayer; |
162 TMSDTMFProvider* iDTMFUplinkPlayer; |
155 TMSStreamType iStrmtype; |
|
156 |
163 |
|
164 // Message queues for communication and data transfer back to the client |
157 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
165 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
158 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
166 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
159 TmsMsgBuf iMsgBuffer; |
167 TmsMsgBuf iMsgBuffer; |
160 |
168 |
161 gboolean iUplinkInitialized; |
169 gboolean iUplinkInitialized; |