|
1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "mcestartinganswererstreams.h" |
|
22 #include "mcemediamanager.h" |
|
23 #include "mcemedianegotiated.h" |
|
24 #include "mcesdpsession.h" |
|
25 #include "mcecomsession.h" |
|
26 #include "mcemmlogs.h" |
|
27 |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // TMceStartingAnswererStreams::SetAsCurrentStateL |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 void TMceStartingAnswererStreams::SetAsCurrentStateL( CMceComSession& aSession ) |
|
34 { |
|
35 MCEMM_DEBUG( "TMceStartingAnswererStreams::SetAsCurrentStateL()" ) |
|
36 |
|
37 TMceStartingAnswererStreams* |
|
38 self = new (ELeave) TMceStartingAnswererStreams( aSession ); |
|
39 |
|
40 CleanupStack::PushL( self ); |
|
41 aSession.SetNegotiationStateL( self ); |
|
42 CleanupStack::Pop( self ); |
|
43 |
|
44 } |
|
45 |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // TMceStartingAnswererStreams::TMceStartingAnswererStreams |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 TMceStartingAnswererStreams::TMceStartingAnswererStreams ( |
|
52 CMceComSession& aSession ) |
|
53 : TMcePreparingStreams( aSession, |
|
54 EMceRoleAnswerer, |
|
55 TMceSrvStreamIterator::EAny ) |
|
56 { |
|
57 } |
|
58 |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // TMceStartingAnswererStreams::EntryL |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 void TMceStartingAnswererStreams::EntryL() |
|
65 { |
|
66 MCEMM_DEBUG( "TMceStartingAnswererStreams::EntryL()" ) |
|
67 |
|
68 // Do remote address update. |
|
69 // If old-school and new school holds are used together, remote address |
|
70 // was not updated to MCC. |
|
71 // When entering into a old-school + new school hold, remote address is set |
|
72 // as 0.0.0.0 to MCC and would not be updated if not done here. |
|
73 // Setting remote-address as 0.0.0.0 is now blocked also on mediamanager |
|
74 // level, but if remote-end updates it's media address during hold/unhold, |
|
75 // it needs to be taken into account here. |
|
76 StartStreamsL( ETrue ); |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // TMceStartingAnswererStreams::StreamsPreparedL |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 void TMceStartingAnswererStreams::StreamsPreparedL() |
|
84 { |
|
85 User::Leave( KErrGeneral ); |
|
86 } |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // TMceStartingAnswererStreams::StreamsStartedL |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 void TMceStartingAnswererStreams::StreamsStartedL() |
|
93 { |
|
94 |
|
95 //set next state, this state will become unusable |
|
96 TMceMediaNegotiated::SetAsCurrentStateL( iSession, iRole ); |
|
97 |
|
98 } |