Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef GETTIMESTAMPSCI_H
17 #define GETTIMESTAMPSCI_H
20 #include <mmf/common/mmfipc.h>
21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
22 #include <mmf/common/mmfipcserver.h>
24 #include <mmf/server/mmfdevsoundcustominterface.h>
25 #include <mmf/server/mmfdevsoundcustomcommands.h>
26 #include <mmf/server/devsoundstandardcustominterfaces.h>
27 #include <mmf/plugin/mmfdevsoundcustominterface.hrh>
34 enum TMMFDevSoundCIGetTimestampsCommands
36 EMMFDevSoundCIGetTimestampsEnable = 0,
37 EMMFDevSoundCIGetTimestampsForBuffer
48 * CMMFGetTimestampsMux
50 * implementation of the Get Timestamps status custom interface pair
52 class CMMFGetTimestampsMux : public CBase,
53 public MMMFDevSoundCustomInterfaceMuxPlugin,
54 public MMMFGetTimestamps
58 // from MMMFDevSoundCustomInterfaceMuxPlugin
60 Attempt to open the interface.
62 The UID of the interface to open.
63 @leave This method may leave with one of the system-wide error codes.
64 @return One of the system wide error codes
66 virtual TInt OpenInterface(TUid aInterfaceId);
69 Equivalent to destructor. Called to destroy plugin.
71 virtual void Release();
75 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
77 The Uid returned by REComSession::CreateImplementationL() or similar
79 virtual void PassDestructorKey(TUid aDestructorKey);
82 Complete construction.
83 Pass additional values from the construction phase, used subsequently by the plugin.
85 The custom interface utility used by the plugin to communicate with the remote
86 server side DeMux plugin
87 @leave This method may leave with one of the system-wide error codes.
89 virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceMuxUtility* aCustomUtility);
92 Return the custom interface
94 The UID of the required custom interface
95 @return The custom interface supported by this plugin
97 virtual TAny* CustomInterface(TUid aInterfaceId);
100 Instantiate a CI Mux class
101 @return The pointer to the new class, cast to the Mux plugin mixin
103 static MMMFDevSoundCustomInterfaceMuxPlugin* NewL();
105 // from MMMFGetTimestamps
107 @see MMMFGetTimestamps
109 virtual TInt MmgtSetRecordSystemTimestampsEnabled(TBool aEnable);
112 @see MMMFGetTimestamps
114 virtual TInt MmgtGetSystemTimestampForBuffer(const TTimeIntervalMicroSeconds& aBufferPosition,
115 TTime& aTimestamp) const;
118 CMMFGetTimestampsMux();
119 ~CMMFGetTimestampsMux();
124 MMMFDevSoundCustomInterfaceMuxUtility* iUtility;
134 * CMMFGetTimestampsDeMux - DeMux side of pair
137 class CMMFGetTimestampsDeMux : public CBase,
138 public MMMFDevSoundCustomInterfaceDeMuxPlugin
142 Instantiate a CMMFGetTimestampsDeMux class
143 @leave This method may leave with one of the system-wide error codes.
144 @return A pointer to the new class cast to the DeMux plugin mixin
146 static MMMFDevSoundCustomInterfaceDeMuxPlugin* NewL();
149 Attempt to open the interface.
151 The UID of the interface to open.
152 @return A handle to the remote plugin
154 virtual TInt OpenInterface(TUid aInterfaceId);
157 Equivalent to destructor. Called to destroy plugin.
159 virtual void Release();
163 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
164 @param aDestructorKey
165 The Uid returned by REComSession::CreateImplementationL() or similar
167 virtual void PassDestructorKey(TUid aDestructorKey);
170 Set the target of the custom interface call
172 The DevSound to call the custom interface on.
174 virtual void SetInterfaceTarget(MMMFDevSoundCustomInterfaceTarget* aTarget);
177 Complete construction.
179 The DeMux utility to use
180 @leave This method may leave with one of the system-wide error codes.
182 virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceDeMuxUtility* aUtility);
185 Refresh the current custom interface connections
186 @leave This method may leave with one of the system-wide error codes.
188 virtual void RefreshL();
190 // from MMMFDevSoundCustomInterfaceDeMuxPlugin
194 The UID of the requested interface
196 A package of data that can be supplied for initialisation
197 @leave This method may leave with one of the system-wide error codes.
198 @return The result of the operation
200 virtual TInt DoOpenSlaveL(TUid aInterface, const TDesC8& aPackageBuf);
205 The handle of the slave plugin
206 @leave This method may leave with one of the system-wide error codes.
208 virtual void DoCloseSlaveL(TInt aHandle);
210 // original RMessage is supplied so that remote demux plugin can extract necessary details
211 // using DeMux utility
214 Relay the synchronous custom command onto the slave
216 The IPC message to be sent to the slave
217 @leave This method may leave with one of the system-wide error codes.
218 @return The result of the operation
220 virtual TInt DoSendSlaveSyncCommandL(const RMmfIpcMessage& aMessage);
223 Relay the synchronous custom command onto the slave and obtain a result
225 The IPC message to be sent to the slave
226 @leave This method may leave with one of the system-wide error codes.
227 @return The result of the operation
229 virtual TInt DoSendSlaveSyncCommandResultL(const RMmfIpcMessage& aMessage);
232 Relay an asynchronous command onto the slave
234 The IPC message to be sent to the slave
235 @leave This method may leave with one of the system-wide error codes.
237 virtual void DoSendSlaveAsyncCommandL(const RMmfIpcMessage& aMessage);
240 Relay an asynchronous command onto the slave and obtain a result
242 The IPC message to be sent to the slave@param aMessage
243 @leave This method may leave with one of the system-wide error codes.
245 virtual void DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& aMessage);
248 ~CMMFGetTimestampsDeMux();
249 CMMFGetTimestampsDeMux();
251 // mirrors MMMFGetTimestamps method.
252 TInt DoMmgtSetRecordSystemTimestampsEnabled(TBool aEnable);
253 TInt DoMmgtGetSystemTimestampForBuffer(const TTimeIntervalMicroSeconds& aBufferPosition,
256 MMMFDevSoundCustomInterfaceDeMuxUtility* iUtility;
257 MMMFDevSoundCustomInterfaceTarget* iTarget;
259 MMMFGetTimestamps* iInterfaceGetTimestamps;