mmserv/voipaudioservices/VoIPIntfc/src/VoIPUplinkStream.cpp
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  Uplink stream APIs.
       
    15  *
       
    16  */
       
    17 
       
    18 #include <voipuplinkstream.h>
       
    19 #include "VoIPUplinkStreamImpl.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // CVoIPAudioUplinkStream::~CVoIPAudioUplinkStream
       
    23 // ---------------------------------------------------------------------------
       
    24 //
       
    25 EXPORT_C CVoIPAudioUplinkStream::~CVoIPAudioUplinkStream()
       
    26     {
       
    27     }
       
    28 
       
    29 // ---------------------------------------------------------------------------
       
    30 // CVoIPAudioUplinkStream::CVoIPAudioUplinkStream
       
    31 // ---------------------------------------------------------------------------
       
    32 //
       
    33 CVoIPAudioUplinkStream::CVoIPAudioUplinkStream()
       
    34     {
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // CVoIPAudioUplinkStream::ConstructL
       
    39 // ---------------------------------------------------------------------------
       
    40 //
       
    41 void CVoIPAudioUplinkStream::ConstructL(
       
    42         CVoIPAudioUplinkStreamImpl* aVoIPAudioUplinkStreamImp)
       
    43     {
       
    44     iVoIPAudioUplinkStreamImpl = aVoIPAudioUplinkStreamImp;
       
    45     }
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // CVoIPAudioUplinkStream::Open
       
    49 // ---------------------------------------------------------------------------
       
    50 //
       
    51 EXPORT_C TInt CVoIPAudioUplinkStream::Open(MVoIPUplinkObserver& aObserver)
       
    52     {
       
    53     TInt err = iVoIPAudioUplinkStreamImpl->Open(aObserver);
       
    54     return err;
       
    55     }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // CVoIPAudioUplinkStream::GetVersion
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 EXPORT_C TInt CVoIPAudioUplinkStream::GetVersion(TVersion& aVersion)
       
    62     {
       
    63     TInt err = iVoIPAudioUplinkStreamImpl->GetVersion(aVersion);
       
    64     return err;
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // CVoIPAudioUplinkStream::GetMaxGain
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 EXPORT_C TInt CVoIPAudioUplinkStream::GetMaxGain(TInt& aGain)
       
    72     {
       
    73     TInt err = iVoIPAudioUplinkStreamImpl->GetMaxGain(aGain);
       
    74     return err;
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CVoIPAudioUplinkStream::SetGain
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C TInt CVoIPAudioUplinkStream::SetGain(TInt aGain)
       
    82     {
       
    83     TInt err = iVoIPAudioUplinkStreamImpl->SetGain(aGain);
       
    84     return err;
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CVoIPAudioUplinkStream::GetGain
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 EXPORT_C TInt CVoIPAudioUplinkStream::GetGain(TInt& aGain)
       
    92     {
       
    93     TInt err = iVoIPAudioUplinkStreamImpl->GetGain(aGain);
       
    94     return err;
       
    95     }
       
    96 
       
    97 // ---------------------------------------------------------------------------
       
    98 // CVoIPAudioUplinkStream::SetFormat
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 EXPORT_C TInt CVoIPAudioUplinkStream::SetFormat(TVoIPCodecFormat aFormat,
       
   102         CVoIPFormatIntfc*& aIntfc)
       
   103     {
       
   104     TRAPD(err, iVoIPAudioUplinkStreamImpl->SetFormatL(aFormat, aIntfc));
       
   105     return err;
       
   106     }
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 // CVoIPAudioUplinkStream::Start
       
   110 // ---------------------------------------------------------------------------
       
   111 //
       
   112 EXPORT_C TInt CVoIPAudioUplinkStream::Start()
       
   113     {
       
   114     TInt err = iVoIPAudioUplinkStreamImpl->Start();
       
   115     return err;
       
   116     }
       
   117 
       
   118 // ---------------------------------------------------------------------------
       
   119 // CVoIPAudioUplinkStream::
       
   120 // ---------------------------------------------------------------------------
       
   121 //
       
   122 EXPORT_C TInt CVoIPAudioUplinkStream::Stop()
       
   123     {
       
   124     TInt err = iVoIPAudioUplinkStreamImpl->Stop();
       
   125     return err;
       
   126     }
       
   127 
       
   128 // ---------------------------------------------------------------------------
       
   129 // CVoIPAudioUplinkStream::Close
       
   130 // ---------------------------------------------------------------------------
       
   131 //
       
   132 EXPORT_C void CVoIPAudioUplinkStream::Close()
       
   133     {
       
   134     iVoIPAudioUplinkStreamImpl->Close();
       
   135     }
       
   136 
       
   137 // ---------------------------------------------------------------------------
       
   138 // CVoIPAudioUplinkStream::BufferEmptied
       
   139 // ---------------------------------------------------------------------------
       
   140 //
       
   141 EXPORT_C TInt CVoIPAudioUplinkStream::BufferEmptied(CVoIPDataBuffer* aBuffer)
       
   142     {
       
   143     TInt err = iVoIPAudioUplinkStreamImpl->BufferEmptied(aBuffer);
       
   144     return err;
       
   145     }
       
   146 
       
   147 // End of file