|
1 /* |
|
2 * Copyright (c) 2004 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: This class provides the main API for the Advanced Audio Controller |
|
15 * Resource. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CADVANCEDAUDIORESOURCE_H |
|
22 #define CADVANCEDAUDIORESOURCE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <f32file.h> |
|
26 #include <barsc.h> |
|
27 #include <barsread.h> |
|
28 |
|
29 #include "AdvancedAudioResource.hrh" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class TMetadataEntry; |
|
33 class CMMFMetaDataEntry; |
|
34 class CMMFClip; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * This class provides Advanced Audio Controller properties. |
|
40 * |
|
41 * @lib AdvancedAudioController.lib |
|
42 * @since 3.0 |
|
43 */ |
|
44 class TAapProperties |
|
45 { |
|
46 public: |
|
47 TInt iSharedBufferMaxNum; // Max number of shared buffer |
|
48 TInt iSharedBufferMaxSize; // Max buffer size |
|
49 TInt iSamplingRate; // Default sampling rate |
|
50 TInt iStereoSupport; // Default channel number |
|
51 TBool iMetaDataSupport; // Meta Data support indicator |
|
52 }; |
|
53 |
|
54 /** |
|
55 * This class implements base class for all resource file handling classes. |
|
56 * |
|
57 * @lib AdvancedAudioController.lib |
|
58 * @since 3.0 |
|
59 */ |
|
60 class CAdvancedAudioResource : public CBase |
|
61 { |
|
62 public: // Constructors and destructor |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 IMPORT_C virtual ~CAdvancedAudioResource(); |
|
68 |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 IMPORT_C CAdvancedAudioResource(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * Returns the controller's properties for the current Codec. |
|
78 * @since 3.0 |
|
79 * @param - |
|
80 * @return AAP properties |
|
81 */ |
|
82 IMPORT_C const TAapProperties& PropertiesL(); |
|
83 |
|
84 /** |
|
85 * Returns the configuration parameters for the current Codec. |
|
86 * @since 3.0 |
|
87 * @param - |
|
88 * @return Configuration parameters |
|
89 */ |
|
90 IMPORT_C const RArray<TInt>& CodecConfigParametersL(); |
|
91 |
|
92 protected: |
|
93 |
|
94 /** |
|
95 * Reads the data from the resource file for the specified codec. |
|
96 * @since 3.0 |
|
97 * @param aResourceFileName - descriptor containing resource file name |
|
98 * @param aResourceId - one of the constants defined in this file. |
|
99 * @return - |
|
100 */ |
|
101 IMPORT_C virtual void ReadResourceFileL( const TDesC& aResourceFileName, TInt aResourceId ); |
|
102 |
|
103 /** |
|
104 * Reads the configuration parameters for the codec. |
|
105 * @since 3.0 |
|
106 * @param - |
|
107 * @return - |
|
108 */ |
|
109 IMPORT_C virtual void ReadCodecConfigParametersL() = 0; |
|
110 |
|
111 protected: // Data |
|
112 |
|
113 // File session |
|
114 RFs iFs; |
|
115 // Resource file |
|
116 RResourceFile iResourceFile; |
|
117 // Resource reader |
|
118 TResourceReader iResourceReader; |
|
119 // Buffer where resource is read |
|
120 HBufC8* iResourceBuf; |
|
121 // Used in case of LEAVE during read |
|
122 TBool iResourceOpen; |
|
123 |
|
124 // AAP properties |
|
125 TAapProperties iProperties; |
|
126 // Codec configuration parameters |
|
127 RArray<TInt> iCodecConfigParams; |
|
128 }; |
|
129 |
|
130 #endif // CADVANCEDAUDIORESOURCE_H |
|
131 |
|
132 // End of File |