|
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: See class definition below. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CMCETESTUIENGINEMULTIMEDIAOBSERVER_H__ |
|
21 #define __CMCETESTUIENGINEMULTIMEDIAOBSERVER_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <mcesessionObserver.h> |
|
27 #include <mcetransactionobserver.h> |
|
28 #include <mceintransactionobserver.h> |
|
29 #include <MceInSessionObserver.h> |
|
30 #include <MceStreamObserver.h> |
|
31 #include <MceRtpObserver.h> |
|
32 #include <MceEventObserver.h> |
|
33 #include <MceInEventObserver.h> |
|
34 #include <MceReferObserver.h> |
|
35 #include <MceInReferObserver.h> |
|
36 #include <MceFCMsgObserver.h> |
|
37 #include <MceMediaStream.h> |
|
38 #include "MCEPoCOmaCsStateObserver.h" |
|
39 #include "MCEdtmfObserver.h" |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 class CMCETestUIEngine; |
|
43 class TMceTransactionDataContainer; |
|
44 class CMceMediaStream; |
|
45 class CMCERtpSource; |
|
46 |
|
47 // CLASS DEFINITION |
|
48 /** |
|
49 * CMCETestUIEngineMultimediaObserver observes all events defined in |
|
50 * multimedia API and either: |
|
51 * |
|
52 * 1. Passes these via CMCETetsUIEngine to user interface. |
|
53 * 2. Creates and executes one or more commands. |
|
54 * 3. Both. |
|
55 */ |
|
56 class CMCETestUIEngineMultimediaObserver |
|
57 : public CBase, |
|
58 public MMceSessionObserver, |
|
59 public MMceTransactionObserver, |
|
60 public MMceInTransactionObserver, |
|
61 public MMceInSessionObserver, |
|
62 public MMceStreamObserver, |
|
63 public MMceRtpObserver, |
|
64 public MMceEventObserver, |
|
65 public MMceInEventObserver, |
|
66 public MMceReferObserver, |
|
67 public MMceInReferObserver, |
|
68 public MMceFcMsgObserver, |
|
69 public MMcePoCOmaCSStateObserver, |
|
70 public MMceDtmfObserver |
|
71 { |
|
72 |
|
73 public: // Constructors and destructor |
|
74 |
|
75 /** |
|
76 * Static constructor. |
|
77 */ |
|
78 static CMCETestUIEngineMultimediaObserver* NewL( CMCETestUIEngine& aEngine ); |
|
79 |
|
80 /** |
|
81 * Destructor. |
|
82 */ |
|
83 ~CMCETestUIEngineMultimediaObserver(); |
|
84 |
|
85 private: |
|
86 |
|
87 /** |
|
88 * C++ first phase constructor. |
|
89 */ |
|
90 CMCETestUIEngineMultimediaObserver( CMCETestUIEngine& aEngine ); |
|
91 |
|
92 /** |
|
93 * C++ default constructor. Not implemented. |
|
94 */ |
|
95 CMCETestUIEngineMultimediaObserver(); |
|
96 |
|
97 /** |
|
98 * Symbian second-phase constructor |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 /** |
|
103 * Utility Function for Debugging, Prints info contained in container to console. |
|
104 */ |
|
105 |
|
106 void LogContainer( TMceTransactionDataContainer* aContainer, |
|
107 TMceTransactionId aTransactionId ) const; |
|
108 |
|
109 |
|
110 public: // from MMCEInSessionObserver |
|
111 |
|
112 void IncomingSession( |
|
113 CMceInSession* aSession, |
|
114 TMceTransactionDataContainer* aContainer ); |
|
115 |
|
116 void IncomingUpdate( |
|
117 CMceSession& aOrigSession, |
|
118 CMceInSession* aUpdatedSession, |
|
119 TMceTransactionDataContainer* aContainer ); |
|
120 |
|
121 public: // fron MMCESessionObserver |
|
122 |
|
123 void SessionStateChanged( |
|
124 CMceSession& aSession, |
|
125 TMceTransactionDataContainer* aContainer ); |
|
126 |
|
127 void SessionConnectionStateChanged( |
|
128 CMceSession& aSession, |
|
129 TBool aActive); |
|
130 |
|
131 void Failed( CMceSession& aSession, TInt aError ); |
|
132 |
|
133 void UpdateFailed( |
|
134 CMceSession& aSession, |
|
135 TMceTransactionDataContainer* aContainer ); |
|
136 |
|
137 |
|
138 public: // fron MMCETransactionObserver |
|
139 |
|
140 void TransactionResponse( |
|
141 CMceSession& aSession, |
|
142 TMceTransactionId aTransactionId, |
|
143 TMceTransactionDataContainer* aContainer ); |
|
144 |
|
145 void TransactionFailed( |
|
146 CMceSession& aSession, |
|
147 TMceTransactionId aTransactionId, |
|
148 TInt aError ); |
|
149 |
|
150 |
|
151 |
|
152 public: // fron MMCEInTransactionObserver |
|
153 |
|
154 |
|
155 void IncomingRequest( |
|
156 const TDesC8& aMethod, |
|
157 CMceSession& aSession, |
|
158 TMceTransactionId aTransactionId, |
|
159 TMceTransactionDataContainer* aContainer ); |
|
160 |
|
161 |
|
162 public: // from MMCEStreamObserver |
|
163 |
|
164 void StreamStateChanged( |
|
165 CMceMediaStream& aStream); |
|
166 |
|
167 void StreamStateChanged( |
|
168 CMceMediaStream& aStream, |
|
169 CMceMediaSink& aSink); |
|
170 |
|
171 void StreamStateChanged( |
|
172 CMceMediaStream& aStream, |
|
173 CMceMediaSource& aSource); |
|
174 |
|
175 public: // from MMCERtpObserver |
|
176 |
|
177 void SRReceived( |
|
178 CMceSession& aStream, |
|
179 CMceMediaStream& aSource); |
|
180 |
|
181 void RRReceived( |
|
182 CMceSession& aStream, |
|
183 CMceMediaStream& aSource); |
|
184 |
|
185 void InactivityTimeout( |
|
186 CMceMediaStream& aStream, |
|
187 CMceRtpSource& aSource); |
|
188 |
|
189 void Activity( |
|
190 CMceMediaStream& aStream, |
|
191 CMceRtpSource& aSource) ; |
|
192 |
|
193 void SsrcAdded( |
|
194 CMceMediaStream& aStream, |
|
195 CMceRtpSource& aSource, |
|
196 TUint aSsrc ) ; |
|
197 |
|
198 void SsrcRemoved( |
|
199 CMceMediaStream& aStream, |
|
200 CMceRtpSource& aSource, |
|
201 TUint aSsrc ); |
|
202 |
|
203 |
|
204 |
|
205 public: // from MMCEInEventObserver |
|
206 |
|
207 void IncomingEvent( |
|
208 CMceInEvent* aEvent, |
|
209 TMceTransactionDataContainer* aContainer ); |
|
210 |
|
211 |
|
212 public: // from MMCEEventObserver |
|
213 |
|
214 void EventStateChanged( |
|
215 CMceEvent& aEvent, |
|
216 TMceTransactionDataContainer* aContainer ); |
|
217 |
|
218 void NotifyReceived( |
|
219 CMceEvent& aEvent, |
|
220 TMceTransactionDataContainer* aContainer ); |
|
221 |
|
222 |
|
223 void EventConnectionStateChanged( |
|
224 CMceEvent& aEvent, |
|
225 TBool aActive ) ; |
|
226 |
|
227 void Failed(CMceEvent& aEvent, TInt aError ); |
|
228 |
|
229 public: // from MMCEReferObserver |
|
230 |
|
231 void ReferStateChanged( |
|
232 CMceRefer& aRefer, |
|
233 TMceTransactionDataContainer* aContainer ) ; |
|
234 |
|
235 void ReferConnectionStateChanged( |
|
236 CMceRefer& aRefer, |
|
237 TBool aActive ); |
|
238 |
|
239 void Failed(CMceRefer& aRefer, TInt aError ); |
|
240 |
|
241 public: // from MMCEInReferObserver |
|
242 |
|
243 void IncomingRefer( |
|
244 CMceInRefer* aRefer, |
|
245 const TDesC8& aReferTo, |
|
246 TMceTransactionDataContainer* aContainer ); |
|
247 |
|
248 public: // from MMCEFCMsgObserver |
|
249 |
|
250 void FCMsgReceived(CMceSession& aSession, |
|
251 HBufC8* aMessage); |
|
252 |
|
253 void FCMsgErrorOccurred(CMceSession& aSession, |
|
254 TInt aError); |
|
255 |
|
256 public: // from MMcePoCOmaCSStateObserver |
|
257 |
|
258 void CsStatusChangedL( TPoCOmaCsState aStatus ); |
|
259 |
|
260 public: // from MMcedtmfObserver |
|
261 |
|
262 void DtmfToneReceived( CMceSession& aSession, |
|
263 CMceAudioStream& aStream, |
|
264 const TChar& aTone ); |
|
265 |
|
266 void DtmfEventReceived( CMceSession& aSession, |
|
267 CMceAudioStream& aStream, |
|
268 CMceMediaSource& aSource, |
|
269 TMceDtmfEvent aEvent ); |
|
270 |
|
271 void DtmfErrorOccured( CMceSession& aSession, |
|
272 CMceAudioStream& aStream, |
|
273 CMceMediaSource& aSource, |
|
274 TInt aError ); |
|
275 |
|
276 |
|
277 private: // Not owned data |
|
278 |
|
279 CMCETestUIEngine& iEngine; |
|
280 |
|
281 |
|
282 }; |
|
283 |
|
284 #endif // __CMCETESTUIENGINEMULTIMEDIAOBSERVER_H__ |