mmserv/voipaudioservices/VoIPIntfc/src/VoIPDtmfTonePlayer.cpp
changeset 53 eabc8c503852
parent 0 71ca22bcf22a
equal deleted inserted replaced
48:a493a607b5bf 53:eabc8c503852
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description: VOIP Audio Service
    14  * Description: VOIP Audio Service
    15 *
    15  *
    16 */
    16  */
    17 
       
    18 
    17 
    19 #include <e32base.h>
    18 #include <e32base.h>
    20 #include <voipdtmftoneplayer.h>
    19 #include <voipdtmftoneplayer.h>
    21 #include "VoIPAudioSession.h"
    20 #include "VoIPAudioSession.h"
    22 #include "VoIPDownlinkStreamImpl.h"
    21 #include "VoIPDownlinkStreamImpl.h"
    23 #include "VoIPUplinkStreamImpl.h"
    22 #include "VoIPUplinkStreamImpl.h"
    24 #include "VoIPDtmfTonePlayerImpl.h"
    23 #include "VoIPDtmfTonePlayerImpl.h"
    25 
       
    26 
    24 
    27 // ---------------------------------------------------------------------------
    25 // ---------------------------------------------------------------------------
    28 // CDTMFTonePlayer::~CDTMFTonePlayer
    26 // CDTMFTonePlayer::~CDTMFTonePlayer
    29 // ---------------------------------------------------------------------------
    27 // ---------------------------------------------------------------------------
    30 //
    28 //
    91 // ---------------------------------------------------------------------------
    89 // ---------------------------------------------------------------------------
    92 // CDTMFTonePlayer::AddVoIPAudioUplinkStream
    90 // CDTMFTonePlayer::AddVoIPAudioUplinkStream
    93 // ---------------------------------------------------------------------------
    91 // ---------------------------------------------------------------------------
    94 //
    92 //
    95 EXPORT_C TInt CDTMFTonePlayer::AddVoIPAudioUplinkStream(
    93 EXPORT_C TInt CDTMFTonePlayer::AddVoIPAudioUplinkStream(
    96                                CVoIPAudioUplinkStream& aStream)
    94         CVoIPAudioUplinkStream& aStream)
    97     {
    95     {
    98     RVoIPAudioSession* session =
    96     TInt err = KErrArgument;
    99                        aStream.iVoIPAudioUplinkStreamImpl->GetSession();
    97     if (&aStream)
   100 
    98         {
   101     TInt err = iDTMFTonePlayerImpl->AddVoIPAudioUplinkStream(aStream, session);
    99         RVoIPAudioSession* session =
       
   100                 aStream.iVoIPAudioUplinkStreamImpl->GetSession();
       
   101         err = iDTMFTonePlayerImpl->AddVoIPAudioUplinkStream(aStream, session);
       
   102         }
   102     return err;
   103     return err;
   103     }
   104     }
   104 
   105 
   105 // ---------------------------------------------------------------------------
   106 // ---------------------------------------------------------------------------
   106 // CDTMFTonePlayer::RemoveVoIPAudioUplinkStream
   107 // CDTMFTonePlayer::RemoveVoIPAudioUplinkStream
   107 // ---------------------------------------------------------------------------
   108 // ---------------------------------------------------------------------------
   108 //
   109 //
   109 EXPORT_C TInt CDTMFTonePlayer::RemoveVoIPAudioUplinkStream(
   110 EXPORT_C TInt CDTMFTonePlayer::RemoveVoIPAudioUplinkStream(
   110                                CVoIPAudioUplinkStream& aStream)
   111         CVoIPAudioUplinkStream& aStream)
   111     {
   112     {
   112     TInt err = iDTMFTonePlayerImpl->RemoveVoIPAudioUplinkStream(aStream);
   113     TInt err = iDTMFTonePlayerImpl->RemoveVoIPAudioUplinkStream(aStream);
   113     return err;
   114     return err;
   114     }
   115     }
   115 
   116 
   116 // ---------------------------------------------------------------------------
   117 // ---------------------------------------------------------------------------
   117 // CDTMFTonePlayer::AddVoIPAudioDownlinkStream
   118 // CDTMFTonePlayer::AddVoIPAudioDownlinkStream
   118 // ---------------------------------------------------------------------------
   119 // ---------------------------------------------------------------------------
   119 //
   120 //
   120 EXPORT_C TInt CDTMFTonePlayer::AddVoIPAudioDownlinkStream(
   121 EXPORT_C TInt CDTMFTonePlayer::AddVoIPAudioDownlinkStream(
   121                                CVoIPAudioDownlinkStream& aStream)
   122         CVoIPAudioDownlinkStream& aStream)
   122     {
   123     {
   123     RVoIPAudioSession* session =
   124     TInt err = KErrArgument;
   124                        aStream.iVoIPAudioDownlinkStreamImpl->GetSession();
   125     if (&aStream)
   125 
   126         {
   126     TInt err = iDTMFTonePlayerImpl->AddVoIPAudioDownlinkStream(aStream,
   127         RVoIPAudioSession* session =
   127                                                                session);
   128                 aStream.iVoIPAudioDownlinkStreamImpl->GetSession();
       
   129         err = iDTMFTonePlayerImpl->AddVoIPAudioDownlinkStream(aStream, session);
       
   130         }
   128     return err;
   131     return err;
   129     }
   132     }
   130 
   133 
   131 // ---------------------------------------------------------------------------
   134 // ---------------------------------------------------------------------------
   132 // CDTMFTonePlayer::RemoveVoIPAudioDownlinkStream
   135 // CDTMFTonePlayer::RemoveVoIPAudioDownlinkStream
   133 // ---------------------------------------------------------------------------
   136 // ---------------------------------------------------------------------------
   134 //
   137 //
   135 EXPORT_C TInt CDTMFTonePlayer::RemoveVoIPAudioDownlinkStream(
   138 EXPORT_C TInt CDTMFTonePlayer::RemoveVoIPAudioDownlinkStream(
   136                                CVoIPAudioDownlinkStream& aStream)
   139         CVoIPAudioDownlinkStream& aStream)
   137     {
   140     {
   138     TInt err = iDTMFTonePlayerImpl->RemoveVoIPAudioDownlinkStream(aStream);
   141     TInt err = iDTMFTonePlayerImpl->RemoveVoIPAudioDownlinkStream(aStream);
   139     return err;
   142     return err;
   140     }
   143     }
   141 
   144 
   142 
       
   143 // End of file
   145 // End of file