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