|
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: Header file for MetaDataWrite |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef METADATAWRITE_H |
|
20 #define METADATAWRITE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <mdaaudiosampleeditor.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * This class implements CMetaDataWrite |
|
30 * |
|
31 * @lib MetaDataWrite.lib |
|
32 * @since 3.0 |
|
33 */ |
|
34 class CMetaDataWrite : public CBase |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Two-phased constructor |
|
40 * @param aUtility - Reference to the CMdaAudioRecorderUtility |
|
41 * @since 3.0 |
|
42 * @return void |
|
43 */ |
|
44 IMPORT_C static CMetaDataWrite* NewL(CMdaAudioRecorderUtility& aUtility); |
|
45 |
|
46 /** |
|
47 * Enable delay write, this should be called everytime a new file is opened |
|
48 * @since 3.0 |
|
49 * @return TInt standard system error if any |
|
50 */ |
|
51 IMPORT_C TInt EnableDelayWrite(); |
|
52 |
|
53 /** |
|
54 * Commit meta data |
|
55 * @since 3.0 |
|
56 * @return TInt standard system error if any |
|
57 */ |
|
58 IMPORT_C TInt CommitMetaData(); |
|
59 |
|
60 private: |
|
61 |
|
62 /** |
|
63 * C++ default constructor |
|
64 * @param aUtility - Reference to the CMdaAudioRecorderUtility |
|
65 * @since 3.0 |
|
66 * @return void |
|
67 */ |
|
68 CMetaDataWrite(CMdaAudioRecorderUtility& aUtility); |
|
69 |
|
70 private: |
|
71 |
|
72 // reference of CMdaAudioRecorderUtility |
|
73 CMdaAudioRecorderUtility& iUtility; |
|
74 |
|
75 // destination package for messages |
|
76 TMMFMessageDestinationPckg iDestinationPckg; |
|
77 }; |
|
78 |
|
79 |
|
80 /** |
|
81 * This class implements MMetaDataWriteCustomCommandImplementor |
|
82 * |
|
83 * @lib n/a |
|
84 * @since 3.0 |
|
85 */ |
|
86 class MMetaDataWriteCustomCommandImplementor |
|
87 { |
|
88 public: |
|
89 |
|
90 /** |
|
91 * Implements request on MitmdcEnableDelayWrite |
|
92 * @since 3.0 |
|
93 * @return TInt standard system error if any |
|
94 */ |
|
95 virtual TInt MmdwcEnableDelayWrite() = 0; |
|
96 |
|
97 /** |
|
98 * Implements request on CommitMetaData |
|
99 * @since 3.0 |
|
100 * @return TInt standard system error if any |
|
101 */ |
|
102 virtual TInt MmdwcCommitMetaData() = 0; |
|
103 }; |
|
104 |
|
105 |
|
106 /** |
|
107 * This class implements CMetaDataWriteCustomCommandParser |
|
108 * |
|
109 * @lib MetaDataWrite.lib |
|
110 * @since 3.0 |
|
111 */ |
|
112 class CMetaDataWriteCustomCommandParser : public CMMFCustomCommandParserBase |
|
113 { |
|
114 public: |
|
115 |
|
116 /** |
|
117 * Two-phased constructor |
|
118 * @param aImplementor - Reference to the MMetaDataWriteCustomCommandImplementor |
|
119 * @since 3.0 |
|
120 * @return void |
|
121 */ |
|
122 IMPORT_C static CMetaDataWriteCustomCommandParser* NewL(MMetaDataWriteCustomCommandImplementor& aImplementor); |
|
123 |
|
124 /** |
|
125 * From CMMFCustomCommandParserBase |
|
126 * Decode and handle the message from the client |
|
127 * @param aMessage - The message to be serviced |
|
128 * @since 3.0 |
|
129 * @return void |
|
130 */ |
|
131 virtual void HandleRequest(TMMFMessage& aMessage); |
|
132 |
|
133 private: |
|
134 |
|
135 /** |
|
136 * C++ default constructor |
|
137 * @param aImplementor - a reference to the MMetaDataWriteCustomCommandImplementor |
|
138 * @since 3.0 |
|
139 * @return void |
|
140 */ |
|
141 CMetaDataWriteCustomCommandParser(MMetaDataWriteCustomCommandImplementor& aImplementor); |
|
142 |
|
143 private: |
|
144 |
|
145 MMetaDataWriteCustomCommandImplementor& iImplementor; |
|
146 }; |
|
147 |
|
148 #endif |
|
149 |
|
150 // End of file |