|
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: Implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "CTcMCEReceived.h" |
|
21 #include <MceInSession.h> |
|
22 #include <MceInEvent.h> |
|
23 #include <MceInRefer.h> |
|
24 #include <MCETransactionDataContainer.h> |
|
25 |
|
26 CTcMCEReceived::CTcMCEReceived(): |
|
27 iReferTo(KNullDesC8) |
|
28 { |
|
29 } |
|
30 |
|
31 CTcMCEReceived::~CTcMCEReceived() |
|
32 { |
|
33 delete iHeaders; |
|
34 delete iContentType; |
|
35 delete iBody; |
|
36 delete iReasonPhrase; |
|
37 delete iFCMessage; |
|
38 delete iInEvent; |
|
39 delete iInSession; |
|
40 delete iInRefer; |
|
41 delete iMethod; |
|
42 } |
|
43 |
|
44 void CTcMCEReceived::SetSession( const CMceSession* aSession ) |
|
45 { |
|
46 iSession = aSession; |
|
47 } |
|
48 |
|
49 void CTcMCEReceived::SetMediaStream( const CMceMediaStream* aMediaStream ) |
|
50 { |
|
51 iMediaStream = aMediaStream; |
|
52 } |
|
53 |
|
54 void CTcMCEReceived::SetMediaSource( const CMceMediaSource* aMediaSource ) |
|
55 { |
|
56 iMediaSource = aMediaSource; |
|
57 } |
|
58 |
|
59 void CTcMCEReceived::SetMediaSink( const CMceMediaSink* aMediaSink ) |
|
60 { |
|
61 iMediaSink = aMediaSink; |
|
62 } |
|
63 |
|
64 void CTcMCEReceived::SetRtpSource( const CMceRtpSource* aRtpSource ) |
|
65 { |
|
66 iRtpSource = aRtpSource; |
|
67 } |
|
68 |
|
69 void CTcMCEReceived::SetInSession( CMceInSession* aInSession ) |
|
70 { |
|
71 iInSession = aInSession; |
|
72 } |
|
73 |
|
74 void CTcMCEReceived::SetIncomingUpdateSession( CMceSession& /*aOrigSession*/, |
|
75 CMceInSession* aInSession ) |
|
76 { |
|
77 if( iInSession) |
|
78 { |
|
79 delete iInSession; iInSession = NULL; |
|
80 } |
|
81 iInSession = aInSession; |
|
82 } |
|
83 |
|
84 void CTcMCEReceived::SetHeaders( CDesC8Array* aHeaders ) |
|
85 { |
|
86 delete iHeaders; |
|
87 iHeaders = aHeaders; |
|
88 } |
|
89 |
|
90 void CTcMCEReceived::SetContentType( HBufC8* aContentType ) |
|
91 { |
|
92 delete iContentType; |
|
93 iContentType = aContentType; |
|
94 } |
|
95 |
|
96 void CTcMCEReceived::SetBody( HBufC8* aBody ) |
|
97 { |
|
98 delete iBody; |
|
99 iBody = aBody; |
|
100 } |
|
101 |
|
102 void CTcMCEReceived::SetStatusCode( TInt32 aStatusCode ) |
|
103 { |
|
104 iStatusCode = aStatusCode; |
|
105 } |
|
106 |
|
107 void CTcMCEReceived::SetReasonPhrase( HBufC8* aReasonPhrase ) |
|
108 { |
|
109 delete iReasonPhrase; |
|
110 iReasonPhrase = aReasonPhrase; |
|
111 } |
|
112 |
|
113 void CTcMCEReceived::SetFCMessage( HBufC8* aFCMessage ) |
|
114 { |
|
115 delete iFCMessage; |
|
116 iFCMessage = aFCMessage; |
|
117 } |
|
118 |
|
119 void CTcMCEReceived::SetEvent( const CMceEvent* aEvent ) |
|
120 { |
|
121 iEvent = aEvent; |
|
122 } |
|
123 |
|
124 void CTcMCEReceived::SetInEvent( CMceInEvent* aInEvent ) |
|
125 { |
|
126 delete iInEvent; |
|
127 iInEvent = aInEvent; |
|
128 } |
|
129 |
|
130 void CTcMCEReceived::SetRefer( CMceRefer* aRefer ) |
|
131 { |
|
132 iRefer = aRefer; |
|
133 } |
|
134 |
|
135 void CTcMCEReceived::SetInRefer( CMceInRefer* aInRefer ) |
|
136 { |
|
137 delete iInRefer; |
|
138 iInRefer = aInRefer; |
|
139 } |
|
140 |
|
141 void CTcMCEReceived::SetReferTo( const TDesC8& aReferTo ) |
|
142 { |
|
143 iReferTo = aReferTo; |
|
144 } |
|
145 |
|
146 void CTcMCEReceived::SetError( TInt aError ) |
|
147 { |
|
148 iError = aError; |
|
149 } |
|
150 |
|
151 void CTcMCEReceived::SetMethodL( const TDesC8& aMethod ) |
|
152 { |
|
153 HBufC8* method = aMethod.AllocL(); |
|
154 delete iMethod; |
|
155 iMethod = method; |
|
156 } |
|
157 |
|
158 void CTcMCEReceived::SetTransactionId( TMceTransactionId aTransactionId ) |
|
159 { |
|
160 iTransactionId = aTransactionId; |
|
161 } |
|
162 |
|
163 void CTcMCEReceived::SetSessionState(CMceSession::TState aState ) |
|
164 { |
|
165 iSessionState = aState; |
|
166 } |
|
167 |
|
168 void CTcMCEReceived::SetEventState(CMceEvent::TState aState ) |
|
169 { |
|
170 iEventState = aState; |
|
171 } |
|
172 |
|
173 void CTcMCEReceived::SetReferState(CMceRefer::TState aState ) |
|
174 { |
|
175 iReferState = aState; |
|
176 } |
|
177 |
|
178 void CTcMCEReceived::SetStreamState(CMceMediaStream::TState aState ) |
|
179 { |
|
180 iStreamState = aState; |
|
181 } |
|
182 |
|
183 void CTcMCEReceived::SetTransactionData( |
|
184 TMceTransactionDataContainer* aContainer ) |
|
185 { |
|
186 if ( aContainer ) |
|
187 { |
|
188 SetStatusCode( aContainer->GetStatusCode() ); |
|
189 SetReasonPhrase( aContainer->GetReasonPhrase() ); |
|
190 SetHeaders( aContainer->GetHeaders() ); |
|
191 SetContentType( aContainer->GetContentType() ); |
|
192 SetBody( aContainer->GetContent() ); |
|
193 } |
|
194 } |