|
1 /* |
|
2 * Copyright (c) 2008 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: Defines VoIP downlink stream APIs. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __VOIPDOWNLINKSTREAM_H |
|
20 #define __VOIPDOWNLINKSTREAM_H |
|
21 |
|
22 #include <voipaudiocommon.h> |
|
23 #include <voipdtmftoneplayer.h> |
|
24 |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CVoIPAudioDownlinkStream; |
|
28 class CVoIPAudioDownlinkStreamImpl; |
|
29 class CVoIPDataBuffer; |
|
30 class CVoIPFormatIntfc; |
|
31 |
|
32 /** |
|
33 * MVoIPDownlinkObserver class |
|
34 * |
|
35 * ?more_complete_description |
|
36 * |
|
37 * @lib VoIPAudioIntfc.dll |
|
38 * @since S60 v5.0 |
|
39 */ |
|
40 class MVoIPDownlinkObserver |
|
41 { |
|
42 public: |
|
43 static const TUint KOpenComplete = 1; |
|
44 static const TUint KDownlinkError = 2; |
|
45 static const TUint KDownlinkClosed = 3; |
|
46 static const TUint KAudioDeviceChanged = 4; |
|
47 |
|
48 public: |
|
49 /** |
|
50 * ?description |
|
51 * |
|
52 * @since S60 v5.0 |
|
53 * @param const CVoIPAudioDownlinkStream& |
|
54 * @param CVoIPDataBuffer* |
|
55 * @return void |
|
56 */ |
|
57 virtual void FillBuffer(const CVoIPAudioDownlinkStream& aSrc, |
|
58 CVoIPDataBuffer* aBuffer) = 0; |
|
59 /** |
|
60 * ?description |
|
61 * |
|
62 * @since S60 v5.0 |
|
63 * @param const CVoIPAudioDownlinkStream& |
|
64 * @param TInt - Event type |
|
65 * @param TInt - Status |
|
66 * @return void |
|
67 */ |
|
68 virtual void Event(const CVoIPAudioDownlinkStream& aSrc, |
|
69 TInt aEventType, |
|
70 TInt aError) = 0; |
|
71 }; |
|
72 |
|
73 |
|
74 /** |
|
75 * CVoIPAudioDownlinkStream class |
|
76 * |
|
77 * ?more_complete_description |
|
78 * |
|
79 * @lib VoIPAudioIntfc.dll |
|
80 * @since S60 v5.0 |
|
81 */ |
|
82 class CVoIPAudioDownlinkStream |
|
83 { |
|
84 public: |
|
85 /** |
|
86 * TVoIPOutputDevice |
|
87 * ?description |
|
88 * @since S60 v5.0 |
|
89 */ |
|
90 enum TVoIPOutputDevice |
|
91 { |
|
92 EHandset, |
|
93 ELoudSpeaker, |
|
94 ENoPreference |
|
95 }; |
|
96 |
|
97 public: |
|
98 /** |
|
99 * Destructor |
|
100 * |
|
101 * @since S60 v5.0 |
|
102 * @param none |
|
103 * @return none |
|
104 */ |
|
105 IMPORT_C virtual ~CVoIPAudioDownlinkStream(); |
|
106 |
|
107 /** |
|
108 * ?description |
|
109 * |
|
110 * @since S60 v5.0 |
|
111 * @param MVoIPDownlinkObserver& |
|
112 * @return TInt |
|
113 */ |
|
114 IMPORT_C TInt Open(MVoIPDownlinkObserver& aObserver); |
|
115 |
|
116 /** |
|
117 * ?description |
|
118 * |
|
119 * @since S60 v5.0 |
|
120 * @param TVersion& |
|
121 * @return TInt |
|
122 */ |
|
123 IMPORT_C TInt GetVersion(TVersion& aVersion); |
|
124 |
|
125 /** |
|
126 * ?description |
|
127 * |
|
128 * @since S60 v5.0 |
|
129 * @param TInt& |
|
130 * @return TInt |
|
131 */ |
|
132 IMPORT_C TInt GetMaxVolume(TInt& aVolume); |
|
133 |
|
134 /** |
|
135 * ?description |
|
136 * |
|
137 * @since S60 v5.0 |
|
138 * @param TInt |
|
139 * @return TInt |
|
140 */ |
|
141 IMPORT_C TInt SetVolume(TInt aVolume); |
|
142 |
|
143 /** |
|
144 * ?description |
|
145 * |
|
146 * @since S60 v5.0 |
|
147 * @param TInt& |
|
148 * @return TInt |
|
149 */ |
|
150 IMPORT_C TInt GetVolume(TInt& aVolume); |
|
151 |
|
152 /** |
|
153 * ?description |
|
154 * |
|
155 * @since S60 v5.0 |
|
156 * @param TVoIPCodecFormat |
|
157 * @param CVoIPFormatIntfc*& |
|
158 * @return TInt |
|
159 */ |
|
160 IMPORT_C TInt SetFormat(TVoIPCodecFormat aFormat, |
|
161 CVoIPFormatIntfc*& aIntfc); |
|
162 |
|
163 /** |
|
164 * ?description |
|
165 * |
|
166 * @since S60 v5.0 |
|
167 * @param TVoIPOutputDevice |
|
168 * @return TInt |
|
169 */ |
|
170 IMPORT_C TInt SetAudioDevice(TVoIPOutputDevice aDevice); |
|
171 |
|
172 /** |
|
173 * ?description |
|
174 * |
|
175 * @since S60 v5.0 |
|
176 * @param TVoIPOutputDevice& |
|
177 * @return TInt |
|
178 */ |
|
179 IMPORT_C TInt GetAudioDevice(TVoIPOutputDevice& aDevice); |
|
180 |
|
181 /** |
|
182 * ?description |
|
183 * |
|
184 * @since S60 v5.0 |
|
185 * @param none |
|
186 * @return TInt |
|
187 */ |
|
188 IMPORT_C TInt Start(); |
|
189 |
|
190 /** |
|
191 * ?description |
|
192 * |
|
193 * @since S60 v5.0 |
|
194 * @param none |
|
195 * @return TInt |
|
196 */ |
|
197 IMPORT_C TInt Stop(); |
|
198 |
|
199 /** |
|
200 * ?description |
|
201 * |
|
202 * @since S60 v5.0 |
|
203 * @param none |
|
204 * @return void |
|
205 */ |
|
206 IMPORT_C void Close(); |
|
207 |
|
208 /** |
|
209 * ?description |
|
210 * |
|
211 * @since S60 v5.0 |
|
212 * @param CVoIPDataBuffer* |
|
213 * @return TInt |
|
214 */ |
|
215 IMPORT_C TInt BufferFilled(CVoIPDataBuffer* aBuffer); |
|
216 |
|
217 protected: |
|
218 |
|
219 /** |
|
220 * Constructor |
|
221 * |
|
222 * @since S60 v5.0 |
|
223 * @param none |
|
224 * @return TInt |
|
225 */ |
|
226 CVoIPAudioDownlinkStream(); |
|
227 |
|
228 /** |
|
229 * Symbian constructor |
|
230 * |
|
231 * @since S60 v5.0 |
|
232 * @param none |
|
233 * @return TInt |
|
234 */ |
|
235 void ConstructL( |
|
236 CVoIPAudioDownlinkStreamImpl* aVoIPAudioDownlinkStreamImpl); |
|
237 |
|
238 private: |
|
239 /** |
|
240 * For internal use only |
|
241 */ |
|
242 friend class CDTMFTonePlayer; |
|
243 |
|
244 private: |
|
245 |
|
246 CVoIPAudioDownlinkStreamImpl* iVoIPAudioDownlinkStreamImpl; |
|
247 |
|
248 }; |
|
249 |
|
250 #endif //__VOIPDOWNLINKSTREAM_H |
|
251 |
|
252 |
|
253 // End of file |