btaudioadaptation_stub/src/btaudiostreaminputadaptation.cpp
changeset 0 0ce1b5ce9557
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Contains stub implementation of CBTAudioStreamInputAdaptation class, 
       
    15 *                which implements BT Audio Adaptation API. 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <e32std.h> 
       
    21 
       
    22 #include "btaudiostreaminputadaptation.h"
       
    23 #include "btaudioadaptationdebug.h"
       
    24 
       
    25 CBTAudioStreamInputAdaptation::CBTAudioStreamInputAdaptation(MBTAudioStreamObserver& /*aStreamObserver*/, MBTAudioErrorObserver& /*aErrorObserver*/) 
       
    26     {
       
    27     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::CBTAudioStreamInputAdaptation() ->")));
       
    28     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::CBTAudioStreamInputAdaptation() <-")));
       
    29     }
       
    30 
       
    31 void CBTAudioStreamInputAdaptation::ConstructL()
       
    32     {
       
    33     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::ConstructL() ->")));
       
    34     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::ConstructL() <-")));
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // Static factory method for the abstract base class. 
       
    39 // This just calls the factory method of the concrete implementation class. 
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 EXPORT_C CBTAudioStreamInputBase* CBTAudioStreamInputBase::NewL(MBTAudioStreamObserver& aStreamObserver, MBTAudioErrorObserver& aErrorObserver)
       
    43     {
       
    44     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioInput::NewL() ->")));
       
    45     CBTAudioStreamInputBase* audioInput = (CBTAudioStreamInputAdaptation::NewL(aStreamObserver, aErrorObserver)); 
       
    46     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioInput::NewL() <-")));
       
    47     return audioInput; 
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // Static factory method. 
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 CBTAudioStreamInputAdaptation* CBTAudioStreamInputAdaptation::NewL(MBTAudioStreamObserver& aStreamObserver, MBTAudioErrorObserver& aErrorObserver)
       
    55     {
       
    56     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::NewL() ->")));
       
    57     CBTAudioStreamInputAdaptation* self = new (ELeave) CBTAudioStreamInputAdaptation(aStreamObserver, aErrorObserver);
       
    58     CleanupStack::PushL(self); 
       
    59     self->ConstructL();
       
    60     CleanupStack::Pop(self);
       
    61     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::NewL() <-")));
       
    62     return self;
       
    63     }
       
    64 
       
    65 CBTAudioStreamInputAdaptation::~CBTAudioStreamInputAdaptation()
       
    66     {
       
    67     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::~CBTAudioStreamInputAdaptation() ->")));
       
    68     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::~CBTAudioStreamInputAdaptation() <-")));
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // From class CBTAudioStreamInputBase.
       
    73 // Returns KErrNotSupported always - this is the stub implementation. 
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 EXPORT_C TInt CBTAudioStreamInputAdaptation::Start()
       
    77     {
       
    78     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Start() ->")));
       
    79     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Start() <-")));
       
    80     return KErrNotSupported;
       
    81     }
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // From class CBTAudioStreamInputBase.
       
    85 // Returns a NULL pointer always - this is the stub implementation. 
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 EXPORT_C TAny* CBTAudioStreamInputAdaptation::EncoderInterface(TUid /*aInterfaceId*/)
       
    89     {
       
    90     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::EncoderInterface() ->")));
       
    91     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::EncoderInterface() <-")));
       
    92     return (TAny *) 0;
       
    93     }
       
    94 
       
    95 // ---------------------------------------------------------------------------
       
    96 // From class CBTAudioStreamInputBase.
       
    97 // Doesn't do anything - this is the stub implementation. 
       
    98 // ---------------------------------------------------------------------------
       
    99 //
       
   100 EXPORT_C void CBTAudioStreamInputAdaptation::BufferEmptied( const TDesC8& /*aBuffer*/ )
       
   101     {
       
   102     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::BufferEmptied() ->")));
       
   103     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::BufferEmptied() <-")));
       
   104     }
       
   105 
       
   106 // ---------------------------------------------------------------------------
       
   107 // From class CBTAudioStreamInputBase.
       
   108 // Doesn't do anything - this is the stub implementation. 
       
   109 // ---------------------------------------------------------------------------
       
   110 //
       
   111 EXPORT_C void CBTAudioStreamInputAdaptation::Stop()
       
   112     {
       
   113     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Stop() ->")));
       
   114     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Stop() <-")));
       
   115     }
       
   116 
       
   117 // ---------------------------------------------------------------------------
       
   118 // From class CBTAudioStreamInputBase.
       
   119 // Returns KErrNotSupported always - this is the stub implementation. 
       
   120 // ---------------------------------------------------------------------------
       
   121 //
       
   122 EXPORT_C TInt CBTAudioStreamInputAdaptation::SetFormat(TFourCC /*aDesiredFourCC*/)
       
   123     {
       
   124     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::SetFormat() ->")));
       
   125     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::SetFormat() <-")));
       
   126     return KErrNotSupported; 
       
   127     }
       
   128 
       
   129 // ---------------------------------------------------------------------------
       
   130 // From class CBTAudioStreamInputBase.
       
   131 // Returns KErrNotSupported always - this is the stub implementation. 
       
   132 // ---------------------------------------------------------------------------
       
   133 //
       
   134 EXPORT_C TInt CBTAudioStreamInputAdaptation::Connect() 
       
   135     {
       
   136     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Connect() ->")));
       
   137     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Connect() <-")));
       
   138     return KErrNotSupported; 
       
   139     }
       
   140 
       
   141 // ---------------------------------------------------------------------------
       
   142 // From class CBTAudioStreamInputBase.
       
   143 // Doesn't do anything - this is the stub implementation. 
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 EXPORT_C void CBTAudioStreamInputAdaptation::Disconnect()
       
   147     {
       
   148     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Disconnect() ->")));
       
   149     BT_AUDIO_ADAPTATION_TRACE_OPT( KPRINTFTRACE, FLOG(_L("[BTAudioAdaptation]\t CBTAudioStreamInputAdaptation::Disconnect() <-")));
       
   150     }