|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef ADVANCEDAACENCODESETTINGSCI_H |
|
17 #define ADVANCEDAACENCODESETTINGSCI_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <mmf/common/mmfipc.h> |
|
21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
22 #include <mmf/common/mmfipcserver.h> |
|
23 #endif |
|
24 #include <mmf/server/mmfdevsoundcustominterface.h> |
|
25 #include <mmf/server/mmfdevsoundcustomcommands.h> |
|
26 #include <mmf/server/devsoundstandardcustominterfaces.h> |
|
27 #include <mmf/plugin/mmfdevsoundcustominterface.hrh> |
|
28 |
|
29 /** |
|
30 @internalComponent |
|
31 @prototype |
|
32 @file |
|
33 */ |
|
34 enum TMMFDevSoundCIAdvancedAACEncodeSettignsCommands |
|
35 { |
|
36 EMMFDevSoundCIAdvancedAACEncodeSettings = 0, |
|
37 EMMFDevSoundCIAdvancedAACEncodeGetSettings |
|
38 }; |
|
39 |
|
40 |
|
41 /** |
|
42 @internalComponent |
|
43 @prototype |
|
44 @file |
|
45 */ |
|
46 |
|
47 /** |
|
48 * CMMFAdvancedAACEncodeSettingsMux |
|
49 * |
|
50 * implementation of the Play back status custom interface pair |
|
51 */ |
|
52 class CMMFAdvancedAACEncodeSettingsMux : public CBase, |
|
53 public MMMFDevSoundCustomInterfaceMuxPlugin, |
|
54 public MMMFAdvancedAACEncodeSettings |
|
55 { |
|
56 public: |
|
57 |
|
58 // from MMMFDevSoundCustomInterfaceMuxPlugin |
|
59 /** |
|
60 Attempt to open the interface. |
|
61 @param aInterfaceId |
|
62 The UID of the interface to open. |
|
63 @return One of the system wide error codes |
|
64 */ |
|
65 virtual TInt OpenInterface(TUid aInterfaceId); |
|
66 |
|
67 /** |
|
68 Equivalent to destructor. Called to destroy plugin. |
|
69 */ |
|
70 virtual void Release(); |
|
71 /** |
|
72 Pass destructor key. |
|
73 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation() |
|
74 @param aDestructorKey |
|
75 The Uid returned by REComSession::CreateImplementationL() or similar |
|
76 */ |
|
77 virtual void PassDestructorKey(TUid aDestructorKey); |
|
78 |
|
79 /** |
|
80 Complete construction. |
|
81 Pass additional values from the construction phase, used subsequently by the plugin. |
|
82 @param aCustomUtility |
|
83 The custom interface utility used by the plugin to communicate with the remote |
|
84 server side DeMux plugin |
|
85 @leave This method may leave with one of the system-wide error codes. |
|
86 */ |
|
87 virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceMuxUtility* aCustomUtility); |
|
88 |
|
89 /** |
|
90 Return the custom interface |
|
91 @param aInterfaceId |
|
92 The UID of the required custom interface |
|
93 @return The custom interface supported by this plugin |
|
94 */ |
|
95 virtual TAny* CustomInterface(TUid aInterfaceId); |
|
96 |
|
97 /** |
|
98 Instantiate a CI Mux class |
|
99 @leave This method may leave with one of the system-wide error codes. |
|
100 @return The pointer to the new class, cast to the Mux plugin mixin |
|
101 */ |
|
102 static MMMFDevSoundCustomInterfaceMuxPlugin* NewL(); |
|
103 |
|
104 // from MMMFAdvancedAACEncodeSettings |
|
105 /** |
|
106 @see MMMFAdvancedAACEncodeSettings |
|
107 */ |
|
108 virtual TInt SetAACEncodeBitrateMode(TAACBitrateMode aBitrateMode); |
|
109 /** |
|
110 @see MMMFAdvancedAACEncodeSettings |
|
111 */ |
|
112 virtual TInt GetAACEncodeBitrateMode(TAACBitrateMode& aBitrateMode); |
|
113 |
|
114 protected: |
|
115 CMMFAdvancedAACEncodeSettingsMux(); |
|
116 ~CMMFAdvancedAACEncodeSettingsMux(); |
|
117 |
|
118 protected: |
|
119 TUid iDestructorKey; |
|
120 TInt iRemoteHandle; |
|
121 MMMFDevSoundCustomInterfaceMuxUtility* iUtility; |
|
122 }; |
|
123 |
|
124 /** |
|
125 @internalComponent |
|
126 @prototype |
|
127 @file |
|
128 */ |
|
129 |
|
130 /** |
|
131 * CMMFAdvancedAACEncodeSettingsDeMux DeMux side of pair |
|
132 */ |
|
133 |
|
134 class CMMFAdvancedAACEncodeSettingsDeMux : public CBase, |
|
135 public MMMFDevSoundCustomInterfaceDeMuxPlugin |
|
136 { |
|
137 public: |
|
138 /** |
|
139 Instantiate a CMMFAdvancedAACEncodeSettingsDeMux class |
|
140 @leave This method may leave with one of the system-wide error codes. |
|
141 @return A pointer to the new class cast to the DeMux plugin mixin |
|
142 */ |
|
143 static MMMFDevSoundCustomInterfaceDeMuxPlugin* NewL(); |
|
144 |
|
145 /** |
|
146 Attempt to open the interface. |
|
147 @param aInterfaceId |
|
148 The UID of the interface to open. |
|
149 @return A handle to the remote plugin |
|
150 */ |
|
151 virtual TInt OpenInterface(TUid aInterfaceId); |
|
152 |
|
153 /** |
|
154 Equivalent to destructor. Called to destroy plugin. |
|
155 */ |
|
156 virtual void Release(); |
|
157 /** |
|
158 Pass destructor key. |
|
159 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation() |
|
160 @param aDestructorKey |
|
161 The Uid returned by REComSession::CreateImplementationL() or similar |
|
162 */ |
|
163 virtual void PassDestructorKey(TUid aDestructorKey); |
|
164 |
|
165 /** |
|
166 Set the target of the custom interface call |
|
167 @param aTarget |
|
168 The DevSound to call the custom interface on. |
|
169 */ |
|
170 virtual void SetInterfaceTarget(MMMFDevSoundCustomInterfaceTarget* aTarget); |
|
171 |
|
172 /** |
|
173 Complete construction. |
|
174 @param aUtility |
|
175 The DeMux utility to use |
|
176 @leave This method may leave with one of the system-wide error codes. |
|
177 */ |
|
178 virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceDeMuxUtility* aUtility); |
|
179 |
|
180 /** |
|
181 Refresh the current custom interface connections |
|
182 @leave This method may leave with one of the system-wide error codes. |
|
183 */ |
|
184 virtual void RefreshL(); |
|
185 |
|
186 // from MMMFDevSoundCustomInterfaceDeMuxPlugin |
|
187 /** |
|
188 Open the slave |
|
189 @param aInterface |
|
190 The UID of the requested interface |
|
191 @param aPackageBuf |
|
192 A package of data that can be supplied for initialisation |
|
193 @leave This method may leave with one of the system-wide error codes. |
|
194 @return The result of the operation |
|
195 */ |
|
196 virtual TInt DoOpenSlaveL(TUid aInterface, const TDesC8& aPackageBuf); |
|
197 |
|
198 /** |
|
199 Close the slave |
|
200 @param aHandle |
|
201 The handle of the slave plugin |
|
202 @leave This method may leave with one of the system-wide error codes. |
|
203 */ |
|
204 virtual void DoCloseSlaveL(TInt aHandle); |
|
205 |
|
206 // original RMessage is supplied so that remote demux plugin can extract necessary details |
|
207 // using DeMux utility |
|
208 |
|
209 /** |
|
210 Relay the synchronous custom command onto the slave |
|
211 @param aMessage |
|
212 The IPC message to be sent to the slave |
|
213 @leave This method may leave with one of the system-wide error codes. |
|
214 @return The result of the operation |
|
215 */ |
|
216 virtual TInt DoSendSlaveSyncCommandL(const RMmfIpcMessage& aMessage); |
|
217 |
|
218 /** |
|
219 Relay the synchronous custom command onto the slave and obtain a result |
|
220 @param aMessage |
|
221 The IPC message to be sent to the slave |
|
222 @leave This method may leave with one of the system-wide error codes. |
|
223 @return The result of the operation |
|
224 */ |
|
225 virtual TInt DoSendSlaveSyncCommandResultL(const RMmfIpcMessage& aMessage); |
|
226 |
|
227 /** |
|
228 Relay an asynchronous command onto the slave |
|
229 @param aMessage |
|
230 The IPC message to be sent to the slave |
|
231 @leave This method may leave with one of the system-wide error codes. |
|
232 */ |
|
233 virtual void DoSendSlaveAsyncCommandL(const RMmfIpcMessage& aMessage); |
|
234 |
|
235 /** |
|
236 Relay an asynchronous command onto the slave and obtain a result |
|
237 @param aMessage |
|
238 The IPC message to be sent to the slave@param aMessage |
|
239 @leave This method may leave with one of the system-wide error codes. |
|
240 */ |
|
241 virtual void DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& aMessage); |
|
242 |
|
243 protected: |
|
244 ~CMMFAdvancedAACEncodeSettingsDeMux(); |
|
245 CMMFAdvancedAACEncodeSettingsDeMux(); |
|
246 |
|
247 // mirrors MMMFAdvancedAACEncodeSettings method. |
|
248 TInt DoSetAACEncodeBitrateMode(MMMFAdvancedAACEncodeSettings::TAACBitrateMode aBitrateMode); |
|
249 TInt DoGetAACEncodeBitrateMode(MMMFAdvancedAACEncodeSettings::TAACBitrateMode& aBitrateMode); |
|
250 |
|
251 protected: |
|
252 MMMFDevSoundCustomInterfaceDeMuxUtility* iUtility; |
|
253 MMMFDevSoundCustomInterfaceTarget* iTarget; |
|
254 TUid iDestructorKey; |
|
255 MMMFAdvancedAACEncodeSettings* iInterfaceAdvAACEncodeSettings; |
|
256 }; |
|
257 |
|
258 #endif |