sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description: Interface definition for error concealment interface.
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
// INCLUDE FILES
|
sl@0
|
21 |
#include "ErrorConcealmentIntfcProxy.h"
|
sl@0
|
22 |
#include "ErrorConcealmentIntfc.h"
|
sl@0
|
23 |
#include <mdaaudiooutputstream.h>
|
sl@0
|
24 |
#include <sounddevice.h>
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
// EXTERNAL DATA STRUCTURES
|
sl@0
|
28 |
|
sl@0
|
29 |
// EXTERNAL FUNCTION PROTOTYPES
|
sl@0
|
30 |
|
sl@0
|
31 |
// CONSTANTS
|
sl@0
|
32 |
|
sl@0
|
33 |
// MACROS
|
sl@0
|
34 |
|
sl@0
|
35 |
// LOCAL CONSTANTS AND MACROS
|
sl@0
|
36 |
|
sl@0
|
37 |
// MODULE DATA STRUCTURES
|
sl@0
|
38 |
|
sl@0
|
39 |
// LOCAL FUNCTION PROTOTYPES
|
sl@0
|
40 |
|
sl@0
|
41 |
// FORWARD DECLARATIONS
|
sl@0
|
42 |
|
sl@0
|
43 |
// ============================= LOCAL FUNCTIONS ===============================
|
sl@0
|
44 |
|
sl@0
|
45 |
// ============================ MEMBER FUNCTIONS ===============================
|
sl@0
|
46 |
|
sl@0
|
47 |
// -----------------------------------------------------------------------------
|
sl@0
|
48 |
// CErrorConcealmentIntfc::NewL
|
sl@0
|
49 |
// Creates the custom interface.
|
sl@0
|
50 |
// Calls the custom interface method on the devsound passed in.
|
sl@0
|
51 |
// Devsound will return the handle to the custom interface proxy.
|
sl@0
|
52 |
// (other items were commented in a header).
|
sl@0
|
53 |
// -----------------------------------------------------------------------------
|
sl@0
|
54 |
//
|
sl@0
|
55 |
EXPORT_C CErrorConcealmentIntfc*
|
sl@0
|
56 |
CErrorConcealmentIntfc::NewL(CMMFDevSound& aDevSound)
|
sl@0
|
57 |
{
|
sl@0
|
58 |
CErrorConcealmentIntfcProxy* errorConcealmentIntfcProxy;
|
sl@0
|
59 |
errorConcealmentIntfcProxy =
|
sl@0
|
60 |
(CErrorConcealmentIntfcProxy*)aDevSound.CustomInterface(
|
sl@0
|
61 |
KUidErrorConcealmentIntfc);
|
sl@0
|
62 |
if (!errorConcealmentIntfcProxy)
|
sl@0
|
63 |
{
|
sl@0
|
64 |
User::Leave(KErrNotFound);
|
sl@0
|
65 |
}
|
sl@0
|
66 |
return errorConcealmentIntfcProxy;
|
sl@0
|
67 |
}
|
sl@0
|
68 |
|
sl@0
|
69 |
// -----------------------------------------------------------------------------
|
sl@0
|
70 |
// CErrorConcealmentIntfc::NewL
|
sl@0
|
71 |
// Creates the custom interface.
|
sl@0
|
72 |
// Calls the custom interface method on the CMdaAudioOutputStream passed in.
|
sl@0
|
73 |
// The CMdaAudioOutputStream utility will return the handle to the custom
|
sl@0
|
74 |
// interface proxy.
|
sl@0
|
75 |
// (other items were commented in a header).
|
sl@0
|
76 |
// -----------------------------------------------------------------------------
|
sl@0
|
77 |
//
|
sl@0
|
78 |
EXPORT_C CErrorConcealmentIntfc*
|
sl@0
|
79 |
CErrorConcealmentIntfc::NewL(CMdaAudioOutputStream& aUtility)
|
sl@0
|
80 |
{
|
sl@0
|
81 |
CErrorConcealmentIntfcProxy* errorConcealmentIntfcProxy;
|
sl@0
|
82 |
errorConcealmentIntfcProxy =
|
sl@0
|
83 |
(CErrorConcealmentIntfcProxy*)aUtility.CustomInterface(
|
sl@0
|
84 |
KUidErrorConcealmentIntfc);
|
sl@0
|
85 |
if (!errorConcealmentIntfcProxy)
|
sl@0
|
86 |
{
|
sl@0
|
87 |
User::Leave(KErrNotFound);
|
sl@0
|
88 |
}
|
sl@0
|
89 |
return errorConcealmentIntfcProxy;
|
sl@0
|
90 |
}
|
sl@0
|
91 |
|
sl@0
|
92 |
// ========================== OTHER EXPORTED FUNCTIONS =========================
|
sl@0
|
93 |
|
sl@0
|
94 |
// End of File
|