phoneengine/audiohandling/src/cpeaudioroutingmonitor.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:28:42 +0200
changeset 21 92ab7f8d0eab
parent 0 5f000ab63145
child 22 6bb1b21d2484
permissions -rw-r--r--
Revision: 201007 Kit: 201011

/*
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  This module contains the implementation of CPEAudioRoutingMonitor class 
*                member functions
*
*/


// INCLUDES
#include <talogger.h>
#include "cpeaudioroutingmonitor.h"
#include "cpeaudiodata.h"

// EXTERNAL DATA STRUCTURES
// None.

// EXTERNAL FUNCTION PROTOTYPES  
// None.

// CONSTANTS
// None

// MACROS
// None.

// LOCAL CONSTANTS AND MACROS
// None.

// MODULE DATA STRUCTURES
// None.

// LOCAL FUNCTION PROTOTYPES
// None.

// ==================== LOCAL FUNCTIONS =====================================
//None.

// ================= MEMBER FUNCTIONS =======================================

// -----------------------------------------------------------------------------
// CPEAudioRoutingMonitor::CPEAudioRoutingMonitor
// C++ default constructor can NOT contain any code, that
// might leave.
// -----------------------------------------------------------------------------
//
CPEAudioRoutingMonitor::CPEAudioRoutingMonitor( 
    CPEAudioData& aOwner )
    : iOwner( aOwner )
    { 
    }

// -----------------------------------------------------------------------------
// CPEAudioRoutingMonitor::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CPEAudioRoutingMonitor* CPEAudioRoutingMonitor::NewL( 
    CPEAudioData& aOwner )
    {
    CPEAudioRoutingMonitor* self = 
        new ( ELeave ) CPEAudioRoutingMonitor( aOwner );
    
    return self;
    }

CPEAudioRoutingMonitor::~CPEAudioRoutingMonitor()
    {
    }

// -----------------------------------------------------------------------------
// CPEAudioRoutingMonitor::AvailableOutputsChanged
// AvailableOutput mode changed event received.
// -----------------------------------------------------------------------------
//
void CPEAudioRoutingMonitor::AvailableOutputsChanged( 
    CTelephonyAudioRouting& aTelephonyAudioRouting )
    {
    TEFLOGSTRING( KTAINT,
        "AUD CPEAudioRoutingMonitor::AvailableOutputsChanged" );
    iOwner.SendMessage( MEngineMonitor::EPEMessageAvailableAudioOutputsChanged, 
                        aTelephonyAudioRouting );
    }
        
// -----------------------------------------------------------------------------
// CPEAudioRoutingMonitor::OutputChanged
// Output mode changed event received.
// -----------------------------------------------------------------------------
//
void CPEAudioRoutingMonitor::OutputChanged( 
    CTelephonyAudioRouting& aTelephonyAudioRouting )
    {
    TEFLOGSTRING( KTAINT, "AUD CPEAudioRoutingMonitor::OutputChanged" );
    iOwner.SendMessage( MEngineMonitor::EPEMessageAudioOutputChanged, 
                        aTelephonyAudioRouting.Output() );
    }
        
// -----------------------------------------------------------------------------
// CPEAudioRoutingMonitor::SetOutputComplete
// OutputComplete mode changed event received.
// -----------------------------------------------------------------------------
//
void CPEAudioRoutingMonitor::SetOutputComplete( 
    CTelephonyAudioRouting& aTelephonyAudioRouting, 
    TInt aError )
    {
    TEFLOGSTRING2( KTAINT, 
        "AUD CPEAudioRoutingMonitor::SetOutputComplete, aError: %d",
        aError );
    if ( aError == KErrNone )
        {
        iOwner.SendMessage( MEngineMonitor::EPEMessageAudioOutputChanged, 
                            aTelephonyAudioRouting.Output() );
        }
    else
        {
        TEFLOGSTRING( KTAERROR,
            "AUD CPEAUDIOROUTINGMONITOR::SETOUTPUTCOMPLETE SETOUTPUTL FAILED" );
        }
    }

// ================= OTHER EXPORTED FUNCTIONS ===============================
//None

//  End of File