|
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 __CMCETESTUIENGINESINK_H__ |
|
22 #define __CMCETESTUIENGINESINK_H__ |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include "MMCETestUIEngineCmdProvider.h" |
|
27 #include <e32base.h> |
|
28 #include <MCEMediaSink.h> |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CMCETestUIEngine; |
|
32 class CMceAudioStream; |
|
33 class CMCETestUIEngineSession; |
|
34 class CMceMediaSink; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 /** |
|
38 * |
|
39 * CMCETestUIEngineAudioStream provides a wrapper for CMCEAudioStream. |
|
40 * Class is not the traditional wrapper in a sense that it would |
|
41 * conform to interface provided by CMCESession. Instead class |
|
42 * implements interface MMCETestUIEngineCmdProvider to provide |
|
43 * same kind of functionality in controlled way on different levels |
|
44 * of abstraction. |
|
45 * |
|
46 */ |
|
47 class CMCETestUIEngineSink : public CBase, |
|
48 public MMCETestUIEngineCmdProvider |
|
49 { |
|
50 |
|
51 public: // public enumerations |
|
52 |
|
53 |
|
54 public: // Constructors and destructors |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 IMPORT_C virtual ~CMCETestUIEngineSink(); |
|
60 |
|
61 /** |
|
62 * Two-phased constructor. Not imported. |
|
63 */ |
|
64 static CMCETestUIEngineSink* NewL( |
|
65 CMCETestUIEngine& aEngine, |
|
66 CMceMediaSink& aSink ); |
|
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 /** |
|
83 * Gets the state of the stream |
|
84 * @return Textual representation of streams state |
|
85 */ |
|
86 IMPORT_C const TDesC16& State() const; |
|
87 |
|
88 IMPORT_C const TMceSinkType Type() const; |
|
89 |
|
90 public: // New functions, internal |
|
91 |
|
92 /** |
|
93 * Gets wrapped MCEAudioStream object |
|
94 * |
|
95 * @return wrapped MCEMCEAudioStream |
|
96 */ |
|
97 IMPORT_C CMceMediaSink& Sink(); |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 private: // private constructors |
|
103 |
|
104 /** |
|
105 * C++ default constructor. Not implemented. |
|
106 */ |
|
107 CMCETestUIEngineSink(); |
|
108 |
|
109 protected: |
|
110 |
|
111 /** |
|
112 * C++ first phase constructor. |
|
113 */ |
|
114 CMCETestUIEngineSink( |
|
115 CMCETestUIEngine& aEngine, |
|
116 CMceMediaSink& aSink ); |
|
117 |
|
118 /** |
|
119 * Symbian second-phase constructor |
|
120 */ |
|
121 void ConstructL(); |
|
122 |
|
123 protected: // owned data |
|
124 |
|
125 // Commands applicable to an audiostream. Owned. |
|
126 RPointerArray<TMCETestUIEngineCmdBase> iCommands; |
|
127 |
|
128 protected: // not owned data |
|
129 |
|
130 CMCETestUIEngine& iEngine; |
|
131 |
|
132 // Reference to wrapped MCEAudioStream |
|
133 CMceMediaSink& iSink; |
|
134 |
|
135 |
|
136 }; |
|
137 |
|
138 #endif |