1 /* |
|
2 * Copyright (c) 2006 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 #ifndef MCESTREAMBUNDLE_H |
|
20 #define MCESTREAMBUNDLE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <mcedefs.h> |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMceMediaStream; |
|
30 class CMceSession; |
|
31 class CMceMediaSink; |
|
32 class MMceEndPointProxy; |
|
33 |
|
34 |
|
35 /** |
|
36 * Class for handling grouping of Mce streams (i.e. grouping of media lines). |
|
37 * |
|
38 * Can be used for example to synchronize audio and video streams. |
|
39 * |
|
40 * If streams are added to the bundle or removed from it after the bundle |
|
41 * has been added to the session, the session has to be updated with |
|
42 * CMceSEssion::UpdateL() function in order to complete the changes. |
|
43 * |
|
44 * @lib mceclient.lib |
|
45 */ |
|
46 class CMceStreamBundle: public CBase |
|
47 { |
|
48 public: // Bundle types |
|
49 |
|
50 enum TMceStreamBundleType |
|
51 { |
|
52 ELS, |
|
53 EFID |
|
54 }; |
|
55 |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 */ |
|
61 IMPORT_C static CMceStreamBundle* NewL( TMceStreamBundleType aType ); |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 */ |
|
66 IMPORT_C static CMceStreamBundle* NewLC( TMceStreamBundleType aType ); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 IMPORT_C ~CMceStreamBundle(); |
|
72 |
|
73 public: |
|
74 |
|
75 /** |
|
76 * Type of the bundle |
|
77 * @param aParent the parent |
|
78 */ |
|
79 IMPORT_C TMceStreamBundleType Type() const; |
|
80 |
|
81 /** |
|
82 * Adds stream to the bundle. |
|
83 * @param aStream, stream to be added |
|
84 */ |
|
85 IMPORT_C void AddStreamL( CMceMediaStream& aStream ); |
|
86 |
|
87 /** |
|
88 * Removes stream from the bundle. |
|
89 * @param aStream, stream to be removed |
|
90 */ |
|
91 IMPORT_C void RemoveStreamL( CMceMediaStream& aStream ); |
|
92 |
|
93 /** |
|
94 * Returns the streams belonging to the bundle. |
|
95 * @return streams of the bundle. |
|
96 */ |
|
97 IMPORT_C const RPointerArray< CMceMediaStream >& Streams(); |
|
98 |
|
99 public: |
|
100 |
|
101 /** |
|
102 * Initializes |
|
103 * @param aParent the parent |
|
104 */ |
|
105 void InitializeL( CMceSession& aParent ); |
|
106 |
|
107 |
|
108 private: //methods |
|
109 |
|
110 /** |
|
111 * C++ default constructor. |
|
112 */ |
|
113 CMceStreamBundle(); |
|
114 |
|
115 /** |
|
116 * second-phase constructor |
|
117 */ |
|
118 void ConstructL( TMceStreamBundleType aType ); |
|
119 |
|
120 void AddedSinkL( CMceMediaStream& aStream, |
|
121 CMceMediaSink*& aCurrentSink, |
|
122 MMceEndPointProxy*& aProxy ); |
|
123 |
|
124 |
|
125 protected: // NOT owned data |
|
126 |
|
127 /** |
|
128 * session |
|
129 */ |
|
130 CMceSession* iSession; |
|
131 |
|
132 public: // Stub data |
|
133 |
|
134 /** |
|
135 * Bundled streams, streams are not owned |
|
136 */ |
|
137 RPointerArray< CMceMediaStream > iStreams; |
|
138 |
|
139 RPointerArray< CMceMediaStream > iTempStreams; |
|
140 |
|
141 /** |
|
142 * type |
|
143 */ |
|
144 CMceStreamBundle::TMceStreamBundleType iBundleType; |
|
145 |
|
146 |
|
147 |
|
148 }; |
|
149 |
|
150 #endif |
|