|
1 /* |
|
2 * Copyright (c) 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: This is the implementation of the CAudioOutput class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <mmf/server/sounddevice.h> |
|
24 #include <AudioOutput.h> |
|
25 |
|
26 class CAudioOutputImpl : public CAudioOutput |
|
27 { |
|
28 |
|
29 public : |
|
30 |
|
31 TAudioOutputPreference AudioOutput() |
|
32 { |
|
33 return iAudioOutput; |
|
34 } |
|
35 |
|
36 TAudioOutputPreference DefaultAudioOutput() |
|
37 { |
|
38 return ENoPreference; |
|
39 } |
|
40 |
|
41 void RegisterObserverL( MAudioOutputObserver& /*aObserver*/ ) |
|
42 { |
|
43 delete HBufC8::NewL( 10 ); |
|
44 } |
|
45 |
|
46 TBool SecureOutput() |
|
47 { |
|
48 return EFalse; |
|
49 } |
|
50 |
|
51 void SetAudioOutputL( TAudioOutputPreference aAudioOutput = ENoPreference ) |
|
52 { |
|
53 delete HBufC8::NewL( 10 ); |
|
54 iAudioOutput = aAudioOutput; |
|
55 } |
|
56 |
|
57 void SetSecureOutputL( TBool /*aSecure = EFalse*/ ) |
|
58 { |
|
59 delete HBufC8::NewL( 10 ); |
|
60 } |
|
61 |
|
62 void UnregisterObserver( MAudioOutputObserver& /*aObserver*/ ) |
|
63 { |
|
64 } |
|
65 |
|
66 CAudioOutputImpl(); |
|
67 |
|
68 private: |
|
69 |
|
70 TAudioOutputPreference iAudioOutput; |
|
71 |
|
72 }; |
|
73 |
|
74 CAudioOutputImpl::CAudioOutputImpl() : |
|
75 iAudioOutput( ENoPreference ) |
|
76 { |
|
77 } |
|
78 |
|
79 // Two-phased constructor. |
|
80 EXPORT_C CAudioOutput* CAudioOutput::NewL(CMdaAudioPlayerUtility& /*aUtility*/) |
|
81 { |
|
82 return new ( ELeave ) CAudioOutputImpl; |
|
83 } |
|
84 |
|
85 |
|
86 // Two-phased constructor. |
|
87 EXPORT_C CAudioOutput* CAudioOutput::NewL(CMdaAudioRecorderUtility& /*aUtility*/, TBool /*aRecordStream*/) |
|
88 { |
|
89 |
|
90 return new ( ELeave ) CAudioOutputImpl; |
|
91 } |
|
92 |
|
93 |
|
94 // Two-phased constructor. |
|
95 EXPORT_C CAudioOutput* CAudioOutput::NewL(CMdaAudioOutputStream& /*aUtility*/) |
|
96 { |
|
97 |
|
98 return new ( ELeave ) CAudioOutputImpl; |
|
99 } |
|
100 |
|
101 // Two-phased constructor. |
|
102 EXPORT_C CAudioOutput* CAudioOutput::NewL(CMdaAudioToneUtility& /*aUtility*/) |
|
103 { |
|
104 |
|
105 |
|
106 return new ( ELeave ) CAudioOutputImpl; |
|
107 } |
|
108 |
|
109 // Two-phased constructor. |
|
110 EXPORT_C CAudioOutput* CAudioOutput::NewL(CMMFDevSound& /*aDevSound*/) |
|
111 { |
|
112 |
|
113 |
|
114 return new ( ELeave ) CAudioOutputImpl; |
|
115 } |
|
116 |
|
117 // Two-phased constructor. |
|
118 EXPORT_C CAudioOutput* CAudioOutput::NewL(MCustomInterface& /*aUtility*/) |
|
119 { |
|
120 |
|
121 |
|
122 return new ( ELeave ) CAudioOutputImpl; |
|
123 } |
|
124 |
|
125 // Two-phased constructor. |
|
126 EXPORT_C CAudioOutput* CAudioOutput::NewL(MCustomCommand& /*aUtility*/) |
|
127 { |
|
128 |
|
129 return new ( ELeave ) CAudioOutputImpl; |
|
130 } |
|
131 |
|
132 // Two-phased constructor. |
|
133 EXPORT_C CAudioOutput* CAudioOutput::NewL(CMidiClientUtility& /*aUtility*/) |
|
134 { |
|
135 |
|
136 return new ( ELeave ) CAudioOutputImpl; |
|
137 } |
|
138 |
|
139 // Two-phased constructor. |
|
140 EXPORT_C CAudioOutput* CAudioOutput::NewL(CDrmPlayerUtility& /*aUtility*/) |
|
141 { |
|
142 |
|
143 return new ( ELeave ) CAudioOutputImpl; |
|
144 } |
|
145 |
|
146 EXPORT_C CAudioOutput* CAudioOutput::NewL(CVideoPlayerUtility& /*aUtility*/) |
|
147 { |
|
148 |
|
149 return new ( ELeave ) CAudioOutputImpl; |
|
150 } |
|
151 |
|
152 // End of file |
|
153 |