telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmdtmftsywithdispatcher.cpp
branchRCL_3
changeset 66 07a122eea281
parent 65 630d2f34d719
equal deleted inserted replaced
65:630d2f34d719 66:07a122eea281
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2009 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 
       
    29 #include "cmmdtmftsy.h"
    23 #include "cmmdtmftsy.h"
    30 #include "cmmphonetsy.h"
    24 #include "cmmphonetsy.h"
    31 #include "cmmtsyreqhandlestore.h"
    25 #include "cmmtsyreqhandlestore.h"
    32 #include "cmmcalllist.h"
    26 #include "cmmcalllist.h"
    33 #include "cmmcalltsy.h"
    27 #include "cmmcalltsy.h"
       
    28 #include <ctsy/tflogger.h>
    34 
    29 
    35 /**
    30 /**
    36  * Starts sending a single DTMF digit.
    31  * Starts sending a single DTMF digit.
    37  *
    32  *
    38  * This version of StartDTMFToneL sends the call ID of the active call through
    33  * This version of StartDTMFToneL sends the call ID of the active call through
    43  * @param aTone The tone to send.
    38  * @param aTone The tone to send.
    44  * @return Return value to the ETel Server.
    39  * @return Return value to the ETel Server.
    45  */
    40  */
    46 TInt CMmDtmfTsy::StartDTMFToneL(const TTsyReqHandle aTsyReqHandle, TChar* aTone)
    41 TInt CMmDtmfTsy::StartDTMFToneL(const TTsyReqHandle aTsyReqHandle, TChar* aTone)
    47 	{
    42 	{
    48 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_STARTDTMFTONEL_1, "TSY: CMmDtmfTsy::StartDTMFToneL");
    43 	TFLOGSTRING("TSY: CMmDtmfTsy::StartDTMFToneL");
    49 
    44 
    50     TInt ret = KErrServerBusy;
    45     TInt ret = KErrServerBusy;
    51 
    46 
    52     // Check if request handle already exists
    47     // Check if request handle already exists
    53     TTsyReqHandle startDtmftoneHandle =
    48     TTsyReqHandle startDtmftoneHandle =
   104  * @param aTsyReqHandle The TSY request handle.
    99  * @param aTsyReqHandle The TSY request handle.
   105  * @return Return value to the ETel Server.
   100  * @return Return value to the ETel Server.
   106  */
   101  */
   107 TInt CMmDtmfTsy::StopDTMFToneL(const TTsyReqHandle aTsyReqHandle)
   102 TInt CMmDtmfTsy::StopDTMFToneL(const TTsyReqHandle aTsyReqHandle)
   108 	{
   103 	{
   109 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_STOPDTMFTONEL_1, "TSY: CMmDtmfTsy::StopDTMFToneL");
   104 	TFLOGSTRING("TSY: CMmDtmfTsy::StopDTMFToneL");
   110 
   105 
   111     TInt ret = KErrServerBusy;
   106     TInt ret = KErrServerBusy;
   112 
   107 
   113     // Check if request handle already exists
   108     // Check if request handle already exists
   114     TTsyReqHandle stopDtmftoneHandle =
   109     TTsyReqHandle stopDtmftoneHandle =
   159  *
   154  *
   160  * @param aResult Error code from LTSY.
   155  * @param aResult Error code from LTSY.
   161  */
   156  */
   162 void CMmDtmfTsy::CompleteStartDTMFTone(TInt aResult)
   157 void CMmDtmfTsy::CompleteStartDTMFTone(TInt aResult)
   163 	{
   158 	{
   164 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_COMPLETESTARTDTMFTONE_1, "TSY: CMmDtmfTsy::CompleteStartDTMFTone aResult=%d", aResult);
   159 	TFLOGSTRING2("TSY: CMmDtmfTsy::CompleteStartDTMFTone aResult=%d", aResult);
   165 
   160 
   166     TTsyReqHandle reqHandle
   161     TTsyReqHandle reqHandle
   167         = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
   162         = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
   168         		CMmPhoneTsy::EMultimodePhoneStartDTMFTone);
   163         		CMmPhoneTsy::EMultimodePhoneStartDTMFTone);
   169 
   164 
   179  *
   174  *
   180  * @param aResult Error code from LTSY.
   175  * @param aResult Error code from LTSY.
   181  */
   176  */
   182 void CMmDtmfTsy::CompleteStopDTMFTone(TInt aResult)
   177 void CMmDtmfTsy::CompleteStopDTMFTone(TInt aResult)
   183 	{
   178 	{
   184 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_COMPLETESTOPDTMFTONE_1, "TSY: CMmDtmfTsy::CompleteStopDTMFTone aResult=%d", aResult);
   179 	TFLOGSTRING2("TSY: CMmDtmfTsy::CompleteStopDTMFTone aResult=%d", aResult);
   185 
   180 
   186     TTsyReqHandle reqHandle
   181     TTsyReqHandle reqHandle
   187         = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
   182         = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
   188         		CMmPhoneTsy::EMultimodePhoneStopDTMFTone);
   183         		CMmPhoneTsy::EMultimodePhoneStopDTMFTone);
   189 
   184 
   200  * @param aTones
   195  * @param aTones
   201  * @return
   196  * @return
   202  */
   197  */
   203 TInt CMmDtmfTsy::SendDTMFTonesL(const TTsyReqHandle aTsyReqHandle, const TDesC* aTones)
   198 TInt CMmDtmfTsy::SendDTMFTonesL(const TTsyReqHandle aTsyReqHandle, const TDesC* aTones)
   204 	{
   199 	{
   205 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_SENDDTMFTONESL_1, "TSY: CMmDtmfTsy::SendDTMFTonesL");
   200 	TFLOGSTRING("TSY: CMmDtmfTsy::SendDTMFTonesL");
   206 
   201 
   207     TTsyReqHandle sendDTMFTonesHandle = iMmPhone->iTsyReqHandleStore
   202     TTsyReqHandle sendDTMFTonesHandle = iMmPhone->iTsyReqHandleStore
   208         ->GetTsyReqHandle(CMmPhoneTsy::EMultimodePhoneSendDTMFTones);
   203         ->GetTsyReqHandle(CMmPhoneTsy::EMultimodePhoneSendDTMFTones);
   209 
   204 
   210     if (CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == sendDTMFTonesHandle)
   205     if (CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == sendDTMFTonesHandle)
   298 // (other items were commented in a header).
   293 // (other items were commented in a header).
   299 // ---------------------------------------------------------------------------
   294 // ---------------------------------------------------------------------------
   300 //
   295 //
   301 TInt CMmDtmfTsy::SendDTMFTonesCancelL()
   296 TInt CMmDtmfTsy::SendDTMFTonesCancelL()
   302     {
   297     {
   303 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDTMFTSY_SENDDTMFTONESCANCELL1_1, "TSY: CMmDtmfTsy::SendDTMFTonesCancel");
   298 TFLOGSTRING("TSY: CMmDtmfTsy::SendDTMFTonesCancel");
   304 
   299 
   305     TTsyReqHandle sendDTMFTonesHandle =
   300     TTsyReqHandle sendDTMFTonesHandle =
   306         iMmPhone->iTsyReqHandleStore->GetTsyReqHandle(
   301         iMmPhone->iTsyReqHandleStore->GetTsyReqHandle(
   307             CMmPhoneTsy::EMultimodePhoneSendDTMFTones );
   302             CMmPhoneTsy::EMultimodePhoneSendDTMFTones );
   308 
   303