1 /* |
1 /* |
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: VOIP Audio Services |
14 * Description: VOIP Audio Services |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 #include <e32base.h> |
18 #include <e32base.h> |
20 #include <voipuplinkstream.h> |
19 #include <voipuplinkstream.h> |
21 #include <voipdownlinkstream.h> |
20 #include <voipdownlinkstream.h> |
22 #include "VoIPAudioSession.h" |
21 #include "VoIPAudioSession.h" |
23 #include "VoIPDtmfTonePlayerImpl.h" |
22 #include "VoIPDtmfTonePlayerImpl.h" |
24 |
23 |
25 |
|
26 // --------------------------------------------------------------------------- |
24 // --------------------------------------------------------------------------- |
27 // CDTMFTonePlayerImpl::NewL |
25 // CDTMFTonePlayerImpl::NewL |
28 // --------------------------------------------------------------------------- |
26 // --------------------------------------------------------------------------- |
29 // |
27 // |
30 CDTMFTonePlayerImpl* CDTMFTonePlayerImpl::NewL() |
28 CDTMFTonePlayerImpl* CDTMFTonePlayerImpl::NewL() |
139 // --------------------------------------------------------------------------- |
137 // --------------------------------------------------------------------------- |
140 // CDTMFTonePlayerImpl::AddVoIPAudioUplinkStream |
138 // CDTMFTonePlayerImpl::AddVoIPAudioUplinkStream |
141 // --------------------------------------------------------------------------- |
139 // --------------------------------------------------------------------------- |
142 // |
140 // |
143 TInt CDTMFTonePlayerImpl::AddVoIPAudioUplinkStream( |
141 TInt CDTMFTonePlayerImpl::AddVoIPAudioUplinkStream( |
144 CVoIPAudioUplinkStream& /*aStream*/, |
142 CVoIPAudioUplinkStream& /*aStream*/, RVoIPAudioSession* aSession) |
145 RVoIPAudioSession* aSession) |
|
146 { |
143 { |
147 TInt err = KErrNone; |
144 TInt err = KErrNone; |
148 iVoIPAudioSession = aSession; |
145 iVoIPAudioSession = aSession; |
149 |
146 |
150 if (!iVoIPAudioSession) |
147 if (!iVoIPAudioSession) |
162 // --------------------------------------------------------------------------- |
159 // --------------------------------------------------------------------------- |
163 // CDTMFTonePlayerImpl::RemoveVoIPAudioUplinkStream |
160 // CDTMFTonePlayerImpl::RemoveVoIPAudioUplinkStream |
164 // --------------------------------------------------------------------------- |
161 // --------------------------------------------------------------------------- |
165 // |
162 // |
166 TInt CDTMFTonePlayerImpl::RemoveVoIPAudioUplinkStream( |
163 TInt CDTMFTonePlayerImpl::RemoveVoIPAudioUplinkStream( |
167 CVoIPAudioUplinkStream& /*aStream*/) |
164 CVoIPAudioUplinkStream& /*aStream*/) |
168 { |
165 { |
169 iVoIPAudioSession = NULL; |
166 iVoIPAudioSession = NULL; |
170 return KErrNone; |
167 return KErrNone; |
171 } |
168 } |
172 |
169 |
173 // --------------------------------------------------------------------------- |
170 // --------------------------------------------------------------------------- |
174 // CDTMFTonePlayerImpl::AddVoIPAudioDownlinkStream |
171 // CDTMFTonePlayerImpl::AddVoIPAudioDownlinkStream |
175 // --------------------------------------------------------------------------- |
172 // --------------------------------------------------------------------------- |
176 // |
173 // |
177 TInt CDTMFTonePlayerImpl::AddVoIPAudioDownlinkStream( |
174 TInt CDTMFTonePlayerImpl::AddVoIPAudioDownlinkStream( |
178 CVoIPAudioDownlinkStream& /*aStream*/, |
175 CVoIPAudioDownlinkStream& /*aStream*/, RVoIPAudioSession* aSession) |
179 RVoIPAudioSession* aSession) |
|
180 { |
176 { |
181 TInt err = KErrNone; |
177 TInt err = KErrNone; |
182 iVoIPAudioSession = aSession; |
178 iVoIPAudioSession = aSession; |
183 |
179 |
184 if (!iVoIPAudioSession) |
180 if (!iVoIPAudioSession) |
196 // --------------------------------------------------------------------------- |
192 // --------------------------------------------------------------------------- |
197 // CDTMFTonePlayerImpl::RemoveVoIPAudioDownlinkStream |
193 // CDTMFTonePlayerImpl::RemoveVoIPAudioDownlinkStream |
198 // --------------------------------------------------------------------------- |
194 // --------------------------------------------------------------------------- |
199 // |
195 // |
200 TInt CDTMFTonePlayerImpl::RemoveVoIPAudioDownlinkStream( |
196 TInt CDTMFTonePlayerImpl::RemoveVoIPAudioDownlinkStream( |
201 CVoIPAudioDownlinkStream& /*aStream*/) |
197 CVoIPAudioDownlinkStream& /*aStream*/) |
202 { |
198 { |
203 iVoIPAudioSession = NULL; |
199 iVoIPAudioSession = NULL; |
204 return KErrNone; |
200 return KErrNone; |
205 } |
201 } |
206 |
202 |
216 if (iMsgComQueue.Handle() <= 0) |
212 if (iMsgComQueue.Handle() <= 0) |
217 { |
213 { |
218 if (iStreamType == EDownlink) |
214 if (iStreamType == EDownlink) |
219 { |
215 { |
220 err = iMsgComQueue.CreateGlobal(KDTMFToneComQueueDNL, |
216 err = iMsgComQueue.CreateGlobal(KDTMFToneComQueueDNL, |
221 KVoIPMsgComQSlots); |
217 KVoIPMsgComQSlots); |
222 } |
218 } |
223 else |
219 else |
224 { |
220 { |
225 err = iMsgComQueue.CreateGlobal(KDTMFToneComQueueUPL, |
221 err = iMsgComQueue.CreateGlobal(KDTMFToneComQueueUPL, |
226 KVoIPMsgComQSlots); |
222 KVoIPMsgComQSlots); |
227 } |
223 } |
228 |
224 |
229 User::LeaveIfError(err); |
225 User::LeaveIfError(err); |
230 } |
226 } |
231 |
227 |