|
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 #include "mcestreambundle.h" |
|
20 #include "mcesession.h" |
|
21 |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CMceStreamBundle::NewL |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 EXPORT_C CMceStreamBundle* CMceStreamBundle::NewL( TMceStreamBundleType aType ) |
|
30 { |
|
31 CMceStreamBundle* self = NewLC( aType ); |
|
32 CleanupStack::Pop( self ); |
|
33 return self; |
|
34 |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CMceStreamBundle::NewLC |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 EXPORT_C CMceStreamBundle* CMceStreamBundle::NewLC( TMceStreamBundleType aType ) |
|
42 { |
|
43 CMceStreamBundle* self = new (ELeave) CMceStreamBundle(); |
|
44 CleanupStack::PushL( self ); |
|
45 self->ConstructL( aType ); |
|
46 return self; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CMceStreamBundle::~CMceStreamBundle |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 EXPORT_C CMceStreamBundle::~CMceStreamBundle() |
|
54 { |
|
55 iStreams.Close(); |
|
56 iTempStreams.Close(); |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CMceStreamBundle::Type |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 EXPORT_C CMceStreamBundle::TMceStreamBundleType CMceStreamBundle::Type() const |
|
64 { |
|
65 return iBundleType; |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CMceStreamBundle::AddStreamL |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 EXPORT_C void CMceStreamBundle::AddStreamL( CMceMediaStream& aStream ) |
|
73 { |
|
74 iStreams.AppendL( &aStream ); |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // CMceStreamBundle::RemoveStreamL |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 EXPORT_C void CMceStreamBundle::RemoveStreamL( CMceMediaStream& aStream ) |
|
82 { |
|
83 TInt index = iStreams.Find( &aStream ); |
|
84 User::LeaveIfError( index ); |
|
85 iStreams.Remove( index ); |
|
86 } |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // CMceStreamBundle::Streams |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 EXPORT_C const RPointerArray< CMceMediaStream >& CMceStreamBundle::Streams() |
|
93 { |
|
94 return iStreams; |
|
95 } |
|
96 |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // CMceStreamBundle::InitializeL |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CMceStreamBundle::InitializeL( CMceSession& aParent ) |
|
103 { |
|
104 iSession = &aParent; |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // CMceStreamBundle::CMceStreamBundle |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 CMceStreamBundle::CMceStreamBundle() |
|
112 { |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // CMceStreamBundle::ConstructL |
|
117 // ----------------------------------------------------------------------------- |
|
118 // |
|
119 void CMceStreamBundle::ConstructL( CMceStreamBundle::TMceStreamBundleType aType ) |
|
120 { |
|
121 iBundleType = aType; |
|
122 |
|
123 } |
|
124 |