|
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 #ifndef __CMCETESTUIENGINEAUDIOSTREAM_H__ |
|
22 #define __CMCETESTUIENGINEAUDIOSTREAM_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <MCEAudioCodec.h> |
|
26 #include <MCEMediaSource.h> |
|
27 #include <MCEMediaSink.h> |
|
28 |
|
29 #include "MMCETestUIEngineCmdProvider.h" |
|
30 #include "CMCETestUIEngineAudioStream.h" |
|
31 #include <e32base.h> |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 |
|
35 class CMCETestUIEngine; |
|
36 class CMceAudioStream; |
|
37 class CMCETestUIEngineSink; |
|
38 class CMCETestUIEngineSource; |
|
39 class CMCETestUIEngineCodec; |
|
40 |
|
41 |
|
42 // CLASS DECLARATION |
|
43 /** |
|
44 * |
|
45 * CMCETestUIEngineAudioStream provides a wrapper for CMCEAudioStream. |
|
46 * Class is not the traditional wrapper in a sense that it would |
|
47 * conform to interface provided by CMCESession. Instead class |
|
48 * implements interface MMCETestUIEngineCmdProvider to provide |
|
49 * same kind of functionality in controlled way on different levels |
|
50 * of abstraction. |
|
51 * |
|
52 */ |
|
53 class CMCETestUIEngineAudioStream : public CBase, |
|
54 public MMCETestUIEngineCmdProvider |
|
55 { |
|
56 |
|
57 public: // public enumerations |
|
58 |
|
59 enum TDirection |
|
60 { |
|
61 EUpLink = 0, |
|
62 EDownLink, |
|
63 ENotSpesified |
|
64 }; |
|
65 |
|
66 public: // Constructors and destructors |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 IMPORT_C virtual ~CMCETestUIEngineAudioStream(); |
|
72 |
|
73 /** |
|
74 * Two-phased constructor. Not imported. |
|
75 */ |
|
76 static CMCETestUIEngineAudioStream* NewL( |
|
77 CMCETestUIEngine& aEngine, |
|
78 CMceAudioStream& aAudioStream ); |
|
79 |
|
80 public: // From MMCETestUICommandProvider |
|
81 |
|
82 /** |
|
83 * Gets the commands applicaple to this session object. |
|
84 * |
|
85 * @return reference to array of commands |
|
86 */ |
|
87 IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& |
|
88 GetCommandsL(); |
|
89 |
|
90 public: // New functions |
|
91 |
|
92 /** |
|
93 * @return Textual representation of the state of the wrapped MCEStream |
|
94 */ |
|
95 IMPORT_C const TDesC16& StreamState() ; |
|
96 |
|
97 /** |
|
98 * @return Direction of the session |
|
99 */ |
|
100 IMPORT_C CMCETestUIEngineAudioStream::TDirection Direction() const; |
|
101 |
|
102 /** |
|
103 * @return Textual representation of session's direction |
|
104 */ |
|
105 IMPORT_C const TDesC16& TextualDirection() const; |
|
106 |
|
107 /** |
|
108 * Gets the state of the stream |
|
109 * @return Textual representation of streams state |
|
110 */ |
|
111 IMPORT_C const TDesC16& State() const; |
|
112 |
|
113 |
|
114 IMPORT_C const RPointerArray<CMCETestUIEngineSource>& SourcesL(); |
|
115 |
|
116 IMPORT_C const RPointerArray<CMCETestUIEngineSink>& SinksL(); |
|
117 |
|
118 IMPORT_C RPointerArray<CMCETestUIEngineCodec>& CodecsL(); |
|
119 |
|
120 IMPORT_C RPointerArray<CMCETestUIEngineCodec>& CurrentCodecs(); |
|
121 |
|
122 |
|
123 public: // New functions, internal |
|
124 |
|
125 /** |
|
126 * Gets wrapped MCEAudioStream object |
|
127 * |
|
128 * @return wrapped MCEMCEAudioStream |
|
129 */ |
|
130 CMceAudioStream& AudioStream(); |
|
131 |
|
132 /** |
|
133 * |
|
134 * Solves and sets the direction of session based on streams and |
|
135 * their properties. |
|
136 * |
|
137 * @return the newly set direction of session |
|
138 */ |
|
139 |
|
140 CMCETestUIEngineAudioStream::TDirection SolveDirection(); |
|
141 |
|
142 TInt iOneTimeRTCPFlag; |
|
143 |
|
144 |
|
145 private: // private constructors |
|
146 |
|
147 /** |
|
148 * C++ default constructor. Not implemented. |
|
149 */ |
|
150 CMCETestUIEngineAudioStream(); |
|
151 |
|
152 protected: |
|
153 |
|
154 /** |
|
155 * C++ first phase constructor. |
|
156 */ |
|
157 CMCETestUIEngineAudioStream( |
|
158 CMCETestUIEngine& aEngine, |
|
159 CMceAudioStream& aAudioStream ); |
|
160 |
|
161 /** |
|
162 * Symbian second-phase constructor |
|
163 */ |
|
164 void ConstructL(); |
|
165 |
|
166 protected: // owned data |
|
167 |
|
168 // Commands applicable to an audiostream. Owned. |
|
169 |
|
170 RPointerArray<TMCETestUIEngineCmdBase> iCommands; |
|
171 |
|
172 RPointerArray<CMCETestUIEngineSource> iSources; |
|
173 RPointerArray<CMCETestUIEngineSink> iSinks; |
|
174 RPointerArray<CMCETestUIEngineCodec> iCodecs; |
|
175 |
|
176 |
|
177 protected: // not owned data |
|
178 |
|
179 CMCETestUIEngine& iEngine; |
|
180 |
|
181 // Reference to wrapped MCEAudioStream |
|
182 CMceAudioStream& iAudioStream; |
|
183 |
|
184 // Indicator of direction |
|
185 CMCETestUIEngineAudioStream::TDirection iDirection; |
|
186 |
|
187 }; |
|
188 |
|
189 #endif |