|
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 __CMCETESTUIENGINEVIDEOSOURCE_H__ |
|
22 #define __CMCETESTUIENGINEVIDEOSOURCE_H__ |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include "MMCETestUIEngineCmdProvider.h" |
|
27 #include <e32base.h> |
|
28 #include <MceMediaSource.h> |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CMCETestUIEngine; |
|
32 class CMceVideoStream; |
|
33 class CMCETestUIEngineVideoStream; |
|
34 class CMCETestUIEngineSession; |
|
35 |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * |
|
40 * CMCETestUIEngineAudioStream provides a wrapper for CMCEAudioStream. |
|
41 * Class is not the traditional wrapper in a sense that it would |
|
42 * conform to interface provided by CMCESession. Instead class |
|
43 * implements interface MMCETestUIEngineCmdProvider to provide |
|
44 * same kind of functionality in controlled way on different levels |
|
45 * of abstraction. |
|
46 * |
|
47 */ |
|
48 class CMCETestUIEngineVideoSource : public CBase, |
|
49 public MMCETestUIEngineCmdProvider |
|
50 { |
|
51 |
|
52 public: // public enumerations |
|
53 |
|
54 public: // Constructors and destructors |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 IMPORT_C virtual ~CMCETestUIEngineVideoSource(); |
|
60 |
|
61 /** |
|
62 * Two-phased constructor. Not imported. |
|
63 */ |
|
64 static CMCETestUIEngineVideoSource* NewL( |
|
65 CMCETestUIEngine& aEngine, |
|
66 CMceMediaSource& aSource ); |
|
67 |
|
68 public: // From MMCETestUICommandProvider |
|
69 |
|
70 /** |
|
71 * Gets the commands applicaple to this session object. |
|
72 * |
|
73 * @return reference to array of commands |
|
74 */ |
|
75 IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& |
|
76 GetCommandsL(); |
|
77 |
|
78 public: // New functions |
|
79 |
|
80 |
|
81 /** |
|
82 * Gets the state of the stream |
|
83 * @return Textual representation of streams state |
|
84 */ |
|
85 IMPORT_C const TDesC16& State() const; |
|
86 |
|
87 // IMPORT_C const TMCESourceType Type() const; |
|
88 |
|
89 public: // New functions, internal |
|
90 |
|
91 /** |
|
92 * Gets wrapped MCEAudioStream object |
|
93 * |
|
94 * @return wrapped MCEMCEAudioStream |
|
95 */ |
|
96 |
|
97 IMPORT_C CMceMediaSource& Source(); |
|
98 /** |
|
99 * |
|
100 * Solves and sets the direction of session based on streams and |
|
101 * their properties. |
|
102 * |
|
103 * @return the newly set direction of session |
|
104 */ |
|
105 |
|
106 IMPORT_C TMceSourceType Type() const; |
|
107 |
|
108 private: // private constructors |
|
109 |
|
110 /** |
|
111 * C++ default constructor. Not implemented. |
|
112 */ |
|
113 CMCETestUIEngineVideoSource(); |
|
114 |
|
115 protected: |
|
116 |
|
117 /** |
|
118 * C++ first phase constructor. |
|
119 */ |
|
120 CMCETestUIEngineVideoSource( |
|
121 CMCETestUIEngine& aEngine, |
|
122 CMceMediaSource& aSource ); |
|
123 |
|
124 /** |
|
125 * Symbian second-phase constructor |
|
126 */ |
|
127 void ConstructL(); |
|
128 |
|
129 protected: // owned data |
|
130 |
|
131 // Commands applicable to an audiostream. Owned. |
|
132 RPointerArray<TMCETestUIEngineCmdBase> iCommands; |
|
133 |
|
134 protected: // not owned data |
|
135 |
|
136 CMCETestUIEngine& iEngine; |
|
137 |
|
138 // Reference to wrapped MCEAudioStream |
|
139 CMceMediaSource& iSource; |
|
140 |
|
141 |
|
142 |
|
143 }; |
|
144 |
|
145 #endif |