os/mm/devsoundextensions/mmfcustominterfaces/ErrConcealmentIntfc/ErrorConcealmentIntfc/src/ErrorConcealmentIntfc.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2002-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:   Interface definition for error concealment interface.
    15 *
    16 */
    17 
    18 
    19 
    20 // INCLUDE FILES
    21 #include "ErrorConcealmentIntfcProxy.h"
    22 #include "ErrorConcealmentIntfc.h"
    23 #include <mdaaudiooutputstream.h>
    24 #include <sounddevice.h>
    25 
    26 
    27 // EXTERNAL DATA STRUCTURES
    28 
    29 // EXTERNAL FUNCTION PROTOTYPES  
    30 
    31 // CONSTANTS
    32 
    33 // MACROS
    34 
    35 // LOCAL CONSTANTS AND MACROS
    36 
    37 // MODULE DATA STRUCTURES
    38 
    39 // LOCAL FUNCTION PROTOTYPES
    40 
    41 // FORWARD DECLARATIONS
    42 
    43 // ============================= LOCAL FUNCTIONS ===============================
    44 
    45 // ============================ MEMBER FUNCTIONS ===============================
    46 
    47 // -----------------------------------------------------------------------------
    48 // CErrorConcealmentIntfc::NewL
    49 // Creates the custom interface.
    50 // Calls the custom interface method on the devsound passed in.
    51 // Devsound will return the handle to the custom interface proxy.
    52 // (other items were commented in a header).
    53 // -----------------------------------------------------------------------------
    54 //
    55 EXPORT_C CErrorConcealmentIntfc* 
    56 CErrorConcealmentIntfc::NewL(CMMFDevSound& aDevSound)
    57     {
    58     CErrorConcealmentIntfcProxy* errorConcealmentIntfcProxy;
    59     errorConcealmentIntfcProxy = 
    60         (CErrorConcealmentIntfcProxy*)aDevSound.CustomInterface(
    61                                                 KUidErrorConcealmentIntfc);
    62     if (!errorConcealmentIntfcProxy)
    63         {
    64         User::Leave(KErrNotFound);
    65         }
    66     return errorConcealmentIntfcProxy;
    67     }
    68 
    69 // -----------------------------------------------------------------------------
    70 // CErrorConcealmentIntfc::NewL
    71 // Creates the custom interface.
    72 // Calls the custom interface method on the CMdaAudioOutputStream passed in.
    73 // The CMdaAudioOutputStream utility will return the handle to the custom 
    74 // interface proxy.
    75 // (other items were commented in a header).
    76 // -----------------------------------------------------------------------------
    77 //
    78 EXPORT_C CErrorConcealmentIntfc* 
    79 CErrorConcealmentIntfc::NewL(CMdaAudioOutputStream& aUtility)
    80     {
    81     CErrorConcealmentIntfcProxy* errorConcealmentIntfcProxy;
    82     errorConcealmentIntfcProxy = 
    83         (CErrorConcealmentIntfcProxy*)aUtility.CustomInterface(
    84                                                KUidErrorConcealmentIntfc);
    85     if (!errorConcealmentIntfcProxy)
    86         {
    87         User::Leave(KErrNotFound);
    88         }
    89     return errorConcealmentIntfcProxy;
    90     }
    91 
    92 // ========================== OTHER EXPORTED FUNCTIONS =========================
    93 
    94 //  End of File