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 "mcemediasource.h" |
|
20 #include "mcesession.h" |
|
21 #include "mcemanager.h" |
|
22 #include "mcestreamobserver.h" |
|
23 |
|
24 |
|
25 |
|
26 #define _FLAT_DATA static_cast<CMceComMediaSource*>( iFlatData ) |
|
27 #define FLAT_DATA( data ) _FLAT_DATA->data |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CMceMediaSource::~CMceMediaSource |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 EXPORT_C CMceMediaSource::~CMceMediaSource() |
|
37 { |
|
38 iStreams.Reset(); |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CMceMediaSource::Type |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 EXPORT_C TMceSourceType CMceMediaSource::Type() const |
|
46 { |
|
47 return iType; |
|
48 } |
|
49 |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // CMceMediaSource::IsEnabled |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 EXPORT_C TBool CMceMediaSource::IsEnabled() const |
|
56 { |
|
57 return iIsEnabled; |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // CMceMediaSource::ReferenceCount |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 TInt& CMceMediaSource::ReferenceCount() |
|
65 { |
|
66 return iReferenceCount; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CMceMediaSource::CMceMediaSource |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 CMceMediaSource::CMceMediaSource() |
|
74 :iIsEnabled( ETrue ) |
|
75 { |
|
76 } |
|
77 |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CMceMediaSource::InitializeL |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 void CMceMediaSource::InitializeL( CMceMediaStream& aParent ) |
|
84 { |
|
85 iStreams.AppendL( &aParent ); |
|
86 |
|
87 } |
|
88 |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CMceMediaSource::InitializeL |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 void CMceMediaSource::InitializeL( CMceManager* /*aManager*/ ) |
|
95 { |
|
96 // NOP |
|
97 } |
|
98 |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CMceMediaSource::DoEnableL |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 void CMceMediaSource::DoEnableL() |
|
105 { |
|
106 iIsEnabled = ETrue; |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CMceMediaSource::DoDisableL |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 void CMceMediaSource::DoDisableL() |
|
114 { |
|
115 |
|
116 iIsEnabled = EFalse; |
|
117 |
|
118 } |
|