os/mm/devsoundextensions/mmfcustominterfaces/ErrConcealmentIntfc/ErrorConcealmentIntfc/src/ErrorConcealmentIntfc.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsoundextensions/mmfcustominterfaces/ErrConcealmentIntfc/ErrorConcealmentIntfc/src/ErrorConcealmentIntfc.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,94 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:   Interface definition for error concealment interface.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +// INCLUDE FILES
    1.24 +#include "ErrorConcealmentIntfcProxy.h"
    1.25 +#include "ErrorConcealmentIntfc.h"
    1.26 +#include <mdaaudiooutputstream.h>
    1.27 +#include <sounddevice.h>
    1.28 +
    1.29 +
    1.30 +// EXTERNAL DATA STRUCTURES
    1.31 +
    1.32 +// EXTERNAL FUNCTION PROTOTYPES  
    1.33 +
    1.34 +// CONSTANTS
    1.35 +
    1.36 +// MACROS
    1.37 +
    1.38 +// LOCAL CONSTANTS AND MACROS
    1.39 +
    1.40 +// MODULE DATA STRUCTURES
    1.41 +
    1.42 +// LOCAL FUNCTION PROTOTYPES
    1.43 +
    1.44 +// FORWARD DECLARATIONS
    1.45 +
    1.46 +// ============================= LOCAL FUNCTIONS ===============================
    1.47 +
    1.48 +// ============================ MEMBER FUNCTIONS ===============================
    1.49 +
    1.50 +// -----------------------------------------------------------------------------
    1.51 +// CErrorConcealmentIntfc::NewL
    1.52 +// Creates the custom interface.
    1.53 +// Calls the custom interface method on the devsound passed in.
    1.54 +// Devsound will return the handle to the custom interface proxy.
    1.55 +// (other items were commented in a header).
    1.56 +// -----------------------------------------------------------------------------
    1.57 +//
    1.58 +EXPORT_C CErrorConcealmentIntfc* 
    1.59 +CErrorConcealmentIntfc::NewL(CMMFDevSound& aDevSound)
    1.60 +    {
    1.61 +    CErrorConcealmentIntfcProxy* errorConcealmentIntfcProxy;
    1.62 +    errorConcealmentIntfcProxy = 
    1.63 +        (CErrorConcealmentIntfcProxy*)aDevSound.CustomInterface(
    1.64 +                                                KUidErrorConcealmentIntfc);
    1.65 +    if (!errorConcealmentIntfcProxy)
    1.66 +        {
    1.67 +        User::Leave(KErrNotFound);
    1.68 +        }
    1.69 +    return errorConcealmentIntfcProxy;
    1.70 +    }
    1.71 +
    1.72 +// -----------------------------------------------------------------------------
    1.73 +// CErrorConcealmentIntfc::NewL
    1.74 +// Creates the custom interface.
    1.75 +// Calls the custom interface method on the CMdaAudioOutputStream passed in.
    1.76 +// The CMdaAudioOutputStream utility will return the handle to the custom 
    1.77 +// interface proxy.
    1.78 +// (other items were commented in a header).
    1.79 +// -----------------------------------------------------------------------------
    1.80 +//
    1.81 +EXPORT_C CErrorConcealmentIntfc* 
    1.82 +CErrorConcealmentIntfc::NewL(CMdaAudioOutputStream& aUtility)
    1.83 +    {
    1.84 +    CErrorConcealmentIntfcProxy* errorConcealmentIntfcProxy;
    1.85 +    errorConcealmentIntfcProxy = 
    1.86 +        (CErrorConcealmentIntfcProxy*)aUtility.CustomInterface(
    1.87 +                                               KUidErrorConcealmentIntfc);
    1.88 +    if (!errorConcealmentIntfcProxy)
    1.89 +        {
    1.90 +        User::Leave(KErrNotFound);
    1.91 +        }
    1.92 +    return errorConcealmentIntfcProxy;
    1.93 +    }
    1.94 +
    1.95 +// ========================== OTHER EXPORTED FUNCTIONS =========================
    1.96 +
    1.97 +//  End of File