phoneengine/audiohandling/src/cpeaudiofactory.cpp
author Pat Downey <patd@symbian.org>
Fri, 04 Jun 2010 10:19:18 +0100
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
permissions -rw-r--r--
Revert last code drop.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  This module contains the implementation of CPEAudioFactory class 
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*                member functions
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
*/
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
// INCLUDES
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#include "cpeaudiofactory.h"
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include "cpeaudiotoneutilityimpl.h"
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include <TelephonyAudioRouting.h>
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
// EXTERNAL DATA STRUCTURES
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
// None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
// EXTERNAL FUNCTION PROTOTYPES  
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
// None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
// CONSTANTS
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
// None
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
// MACROS
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
// None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
// LOCAL CONSTANTS AND MACROS
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
// None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
// MODULE DATA STRUCTURES
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
// None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
// LOCAL FUNCTION PROTOTYPES
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
// None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
// ==================== LOCAL FUNCTIONS =====================================
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
//None.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
// ================= MEMBER FUNCTIONS =======================================
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
// Static constructor
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
// 
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
EXPORT_C CPEAudioFactory* CPEAudioFactory::NewLC()
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
    {
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
    CPEAudioFactory* self = new( ELeave )CPEAudioFactory();
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
    CleanupStack::PushL( self );
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
    return self;
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
    }
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
// C++ constructor
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
//  
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
EXPORT_C CPEAudioFactory::CPEAudioFactory()
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
    {
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
    }
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
// CPEAudioFactory::CreateTelephonyAudioRoutingL
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
// creates CTelephonyAudioRouting instance.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
//   
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
EXPORT_C CTelephonyAudioRouting* CPEAudioFactory::CreateTelephonyAudioRoutingL( 
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
    MTelephonyAudioRoutingObserver& aAudioRoutingObserver )
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    {
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
    return CTelephonyAudioRouting::NewL( aAudioRoutingObserver );
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
    }
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
// CPEAudioFactory::CreateAudioToneUtilityL
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
// creates CPEAudioToneUtility instance.
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
// -----------------------------------------------------------------------------
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
// 
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
EXPORT_C CPEAudioToneUtility* CPEAudioFactory::CreateAudioToneUtilityL(
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
    MMdaAudioToneObserver& aToneObserver )
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
    {
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
    return CPEAudioToneUtilityImpl::NewL( aToneObserver );
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
    }
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
ba76fc04e6c2 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
//  End of File