|
1 /* |
|
2 * Copyright (c) 2004-2007 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: Provides DL Datapath for DL subthread |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MCCDLDATAPATH_H |
|
22 #define MCCDLDATAPATH_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "mccdatapathbase.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MMccResources; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Mcc DL Datapath |
|
34 * |
|
35 * @lib Mccsubthreads.dll |
|
36 * @since Series 60 3.0 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CMccDlDataPath ) : public CMccDataPathBase |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CMccDlDataPath* NewL( MAsyncEventHandler* aEventHandler, |
|
46 MMccResources* aMccResources, |
|
47 TMediaId aMediaId ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CMccDlDataPath(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /** |
|
57 * Negotiates the source and sink |
|
58 * @since Series 60 3.0 |
|
59 * @param aDataSource Source to be negotiated with |
|
60 * @return void |
|
61 */ |
|
62 void NegotiateL( MDataSource& aDataSource ); |
|
63 |
|
64 /** |
|
65 * Loads codec. |
|
66 */ |
|
67 void LoadL( MDataSource& aDataSource ); |
|
68 |
|
69 public: // Functions from baseclasses |
|
70 |
|
71 /** |
|
72 * From MDataSink |
|
73 */ |
|
74 void BufferFilledL(CMMFBuffer* aBuffer); |
|
75 |
|
76 /** |
|
77 * From MDataSource |
|
78 */ |
|
79 void BufferEmptiedL(CMMFBuffer* aBuffer); |
|
80 |
|
81 /** |
|
82 * From CMccDataPathBase |
|
83 */ |
|
84 void PrimeL( TUint32 aEndpointId ); |
|
85 |
|
86 /** |
|
87 * From CMccDataPathBase |
|
88 */ |
|
89 void PlayL( TUint32 aEndpointId ); |
|
90 |
|
91 /** |
|
92 * From CMccDataPathBase |
|
93 */ |
|
94 void PauseL( TUint32 aEndpointId ); |
|
95 |
|
96 /** |
|
97 * From CMccDataPathBase |
|
98 */ |
|
99 void StopL( TUint32 aEndpointId ); |
|
100 |
|
101 /** |
|
102 * From CMccDataPathBase |
|
103 */ |
|
104 void ResumeL( TUint32 aEndpointId ); |
|
105 |
|
106 /** |
|
107 * From CMccDataPathBase |
|
108 */ |
|
109 void FillSourceBufferL(); |
|
110 |
|
111 /** |
|
112 * From CMccDataPathBase |
|
113 */ |
|
114 void EmptySinkBufferL(); |
|
115 |
|
116 private: // Functions from baseclasses |
|
117 |
|
118 /** |
|
119 * From CMccDataPathBase |
|
120 */ |
|
121 void DoEndOfDataL(); |
|
122 |
|
123 private: // Constructors |
|
124 |
|
125 /** |
|
126 * C++ default constructor. |
|
127 */ |
|
128 CMccDlDataPath( MAsyncEventHandler* aEventHandler, |
|
129 MMccResources* aMccResources, |
|
130 TMediaId aMediaId ); |
|
131 |
|
132 /** |
|
133 * By default Symbian 2nd phase constructor is private. |
|
134 */ |
|
135 void ConstructL(); |
|
136 |
|
137 private: // New functions |
|
138 |
|
139 void ActivateSourceBuffer(); |
|
140 |
|
141 private: // Friend classes |
|
142 #ifdef TEST_EUNIT |
|
143 friend class UT_CMccDlDataPath; |
|
144 #endif |
|
145 }; |
|
146 |
|
147 #endif // MCCDLDATAPATH_H |
|
148 |
|
149 // End of File |