audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/telephonyaudioroutingmanagerstub.cpp
branchRCL_3
changeset 44 b5894bb67e73
parent 35 37b610eb7fe3
equal deleted inserted replaced
35:37b610eb7fe3 44:b5894bb67e73
     1 /*
       
     2 * Copyright (c) 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: Audio Stubs -  TelephonyAudioRoutingManagerStub class implementation.
       
    15 *				Starts the TelephonyAudioRoutingManager.
       
    16 *
       
    17 */
       
    18 
       
    19 #include <TelephonyAudioRoutingManager.h>
       
    20 
       
    21 #include "devsoundextensionstubs_common.h"
       
    22 #include "telephonyaudioroutingmanagerstub.h"
       
    23 
       
    24 CTelephonyAudioRoutingManagerStub::CTelephonyAudioRoutingManagerStub()
       
    25     {
       
    26     	// No Impl
       
    27     }
       
    28 
       
    29 CTelephonyAudioRoutingManagerStub::~CTelephonyAudioRoutingManagerStub()
       
    30     {
       
    31     DB_IN;
       
    32     iAudioOutput.Close();
       
    33     delete iTelephonyAudioRoutingMan;
       
    34     DB_OUT;
       
    35     }
       
    36 
       
    37 CTelephonyAudioRoutingManagerStub* CTelephonyAudioRoutingManagerStub::NewL()
       
    38     {
       
    39     DB_IN;
       
    40     CTelephonyAudioRoutingManagerStub* self = new (ELeave) CTelephonyAudioRoutingManagerStub;
       
    41     CleanupStack::PushL(self);
       
    42     self->ConstructL();
       
    43     CleanupStack::Pop(self);
       
    44     DB_OUT;
       
    45     return self;
       
    46     }
       
    47 
       
    48 void CTelephonyAudioRoutingManagerStub::ConstructL()
       
    49     {
       
    50     DB_IN;
       
    51     // Configure and launch Telephony Audio Routing Manager
       
    52     iAudioOutput.Reset();
       
    53     iAudioOutput.Append(CTelephonyAudioRouting::EHandset);
       
    54     iAudioOutput.Append(CTelephonyAudioRouting::ELoudspeaker);
       
    55 
       
    56     iTelephonyAudioRoutingMan = CTelephonyAudioRoutingManager::NewL(*this, iAudioOutput.Array());
       
    57 
       
    58     DB_CUSTOM0(_L("Telephony Audio Routing Manager created"));
       
    59     DB_OUT;
       
    60     }
       
    61 
       
    62 void CTelephonyAudioRoutingManagerStub::OutputChangeRequested (
       
    63     CTelephonyAudioRoutingManager& /*aTelephonyAudioRoutingManager*/,
       
    64     CTelephonyAudioRouting::TAudioOutput /*aOutput*/)
       
    65     {
       
    66     	// No Impl
       
    67     }