telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmdtmftsywithdispatcher.cpp
equal
deleted
inserted
replaced
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 /** |
18 /** |
19 * This file contains additional function definitions for the CMmDtmfTsy class |
19 * This file contains additional function definitions for the CMmDtmfTsy class |
20 * in CTSY for use when the CTSY is used with the CTSY Dispatcher. |
20 * in CTSY for use when the CTSY is used with the CTSY Dispatcher. |
21 */ |
21 */ |
22 |
22 |
|
23 |
|
24 #include "OstTraceDefinitions.h" |
|
25 #ifdef OST_TRACE_COMPILER_IN_USE |
|
26 #include "cmmdtmftsywithdispatcherTraces.h" |
|
27 #endif |
|
28 |
23 #include "cmmdtmftsy.h" |
29 #include "cmmdtmftsy.h" |
24 #include "cmmphonetsy.h" |
30 #include "cmmphonetsy.h" |
25 #include "cmmtsyreqhandlestore.h" |
31 #include "cmmtsyreqhandlestore.h" |
26 #include "cmmcalllist.h" |
32 #include "cmmcalllist.h" |
27 #include "cmmcalltsy.h" |
33 #include "cmmcalltsy.h" |
28 #include <ctsy/tflogger.h> |
|
29 |
34 |
30 /** |
35 /** |
31 * Starts sending a single DTMF digit. |
36 * Starts sending a single DTMF digit. |
32 * |
37 * |
33 * This version of StartDTMFToneL sends the call ID of the active call through |
38 * This version of StartDTMFToneL sends the call ID of the active call through |
38 * @param aTone The tone to send. |
43 * @param aTone The tone to send. |
39 * @return Return value to the ETel Server. |
44 * @return Return value to the ETel Server. |
40 */ |
45 */ |
41 TInt CMmDtmfTsy::StartDTMFToneL(const TTsyReqHandle aTsyReqHandle, TChar* aTone) |
46 TInt CMmDtmfTsy::StartDTMFToneL(const TTsyReqHandle aTsyReqHandle, TChar* aTone) |
42 { |
47 { |
43 TFLOGSTRING("TSY: CMmDtmfTsy::StartDTMFToneL"); |
48 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_STARTDTMFTONEL_1, "TSY: CMmDtmfTsy::StartDTMFToneL"); |
44 |
49 |
45 TInt ret = KErrServerBusy; |
50 TInt ret = KErrServerBusy; |
46 |
51 |
47 // Check if request handle already exists |
52 // Check if request handle already exists |
48 TTsyReqHandle startDtmftoneHandle = |
53 TTsyReqHandle startDtmftoneHandle = |
99 * @param aTsyReqHandle The TSY request handle. |
104 * @param aTsyReqHandle The TSY request handle. |
100 * @return Return value to the ETel Server. |
105 * @return Return value to the ETel Server. |
101 */ |
106 */ |
102 TInt CMmDtmfTsy::StopDTMFToneL(const TTsyReqHandle aTsyReqHandle) |
107 TInt CMmDtmfTsy::StopDTMFToneL(const TTsyReqHandle aTsyReqHandle) |
103 { |
108 { |
104 TFLOGSTRING("TSY: CMmDtmfTsy::StopDTMFToneL"); |
109 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_STOPDTMFTONEL_1, "TSY: CMmDtmfTsy::StopDTMFToneL"); |
105 |
110 |
106 TInt ret = KErrServerBusy; |
111 TInt ret = KErrServerBusy; |
107 |
112 |
108 // Check if request handle already exists |
113 // Check if request handle already exists |
109 TTsyReqHandle stopDtmftoneHandle = |
114 TTsyReqHandle stopDtmftoneHandle = |
154 * |
159 * |
155 * @param aResult Error code from LTSY. |
160 * @param aResult Error code from LTSY. |
156 */ |
161 */ |
157 void CMmDtmfTsy::CompleteStartDTMFTone(TInt aResult) |
162 void CMmDtmfTsy::CompleteStartDTMFTone(TInt aResult) |
158 { |
163 { |
159 TFLOGSTRING2("TSY: CMmDtmfTsy::CompleteStartDTMFTone aResult=%d", aResult); |
164 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_COMPLETESTARTDTMFTONE_1, "TSY: CMmDtmfTsy::CompleteStartDTMFTone aResult=%d", aResult); |
160 |
165 |
161 TTsyReqHandle reqHandle |
166 TTsyReqHandle reqHandle |
162 = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle( |
167 = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle( |
163 CMmPhoneTsy::EMultimodePhoneStartDTMFTone); |
168 CMmPhoneTsy::EMultimodePhoneStartDTMFTone); |
164 |
169 |
174 * |
179 * |
175 * @param aResult Error code from LTSY. |
180 * @param aResult Error code from LTSY. |
176 */ |
181 */ |
177 void CMmDtmfTsy::CompleteStopDTMFTone(TInt aResult) |
182 void CMmDtmfTsy::CompleteStopDTMFTone(TInt aResult) |
178 { |
183 { |
179 TFLOGSTRING2("TSY: CMmDtmfTsy::CompleteStopDTMFTone aResult=%d", aResult); |
184 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_COMPLETESTOPDTMFTONE_1, "TSY: CMmDtmfTsy::CompleteStopDTMFTone aResult=%d", aResult); |
180 |
185 |
181 TTsyReqHandle reqHandle |
186 TTsyReqHandle reqHandle |
182 = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle( |
187 = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle( |
183 CMmPhoneTsy::EMultimodePhoneStopDTMFTone); |
188 CMmPhoneTsy::EMultimodePhoneStopDTMFTone); |
184 |
189 |
195 * @param aTones |
200 * @param aTones |
196 * @return |
201 * @return |
197 */ |
202 */ |
198 TInt CMmDtmfTsy::SendDTMFTonesL(const TTsyReqHandle aTsyReqHandle, const TDesC* aTones) |
203 TInt CMmDtmfTsy::SendDTMFTonesL(const TTsyReqHandle aTsyReqHandle, const TDesC* aTones) |
199 { |
204 { |
200 TFLOGSTRING("TSY: CMmDtmfTsy::SendDTMFTonesL"); |
205 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_SENDDTMFTONESL_1, "TSY: CMmDtmfTsy::SendDTMFTonesL"); |
201 |
206 |
202 TTsyReqHandle sendDTMFTonesHandle = iMmPhone->iTsyReqHandleStore |
207 TTsyReqHandle sendDTMFTonesHandle = iMmPhone->iTsyReqHandleStore |
203 ->GetTsyReqHandle(CMmPhoneTsy::EMultimodePhoneSendDTMFTones); |
208 ->GetTsyReqHandle(CMmPhoneTsy::EMultimodePhoneSendDTMFTones); |
204 |
209 |
205 if (CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == sendDTMFTonesHandle) |
210 if (CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == sendDTMFTonesHandle) |
293 // (other items were commented in a header). |
298 // (other items were commented in a header). |
294 // --------------------------------------------------------------------------- |
299 // --------------------------------------------------------------------------- |
295 // |
300 // |
296 TInt CMmDtmfTsy::SendDTMFTonesCancelL() |
301 TInt CMmDtmfTsy::SendDTMFTonesCancelL() |
297 { |
302 { |
298 TFLOGSTRING("TSY: CMmDtmfTsy::SendDTMFTonesCancel"); |
303 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_SENDDTMFTONESCANCELL1_1, "TSY: CMmDtmfTsy::SendDTMFTonesCancel"); |
299 |
304 |
300 TTsyReqHandle sendDTMFTonesHandle = |
305 TTsyReqHandle sendDTMFTonesHandle = |
301 iMmPhone->iTsyReqHandleStore->GetTsyReqHandle( |
306 iMmPhone->iTsyReqHandleStore->GetTsyReqHandle( |
302 CMmPhoneTsy::EMultimodePhoneSendDTMFTones ); |
307 CMmPhoneTsy::EMultimodePhoneSendDTMFTones ); |
303 |
308 |