sl@0: sl@0: // MmfDevSoundCustomInterfaceSupport.h sl@0: sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: @file sl@0: */ sl@0: sl@0: #ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H sl@0: #define MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H sl@0: sl@0: const TUid KMmfUidDevSoundAudioResourceCustomInterface = {0x101FD9F3}; sl@0: const TUid KMmfUidDevSoundEmptyBuffersCustomInterface = {0x1027379c}; sl@0: const TUid KMmfUidDevSoundCancelInitializeCustomInterface = {0x102834D3}; sl@0: const TUid KMmfUidDevSoundAudioClientThreadInfoCustomInterface = {0x102834A7}; sl@0: sl@0: sl@0: /** sl@0: Custom Interface class providing support for emptying the play buffers. sl@0: */ sl@0: class MMMFDevSoundEmptyBuffers sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Empties the play buffers below DevSound without causing the codec to be deleted. sl@0: sl@0: @return An error code indicating if the function call was successful. KErrNone on success, KErrNotSupported sl@0: if called in record mode, otherwise another of the system-wide error codes. sl@0: */ sl@0: virtual TInt EmptyBuffers() = 0; sl@0: }; sl@0: sl@0: /** sl@0: Custom Interface class providing support for canceling initialization. sl@0: */ sl@0: class MMMFDevSoundCancelInitialize sl@0: { sl@0: public: sl@0: sl@0: /** Cancels the initialization process of a CMMFDevSound object sl@0: sl@0: @return An error code indicating if the function call was successful. sl@0: KErrNone on success, sl@0: KerrNotReady if this is called before InitializeL() call or after sl@0: the object has been initialized, sl@0: */ sl@0: virtual TInt CancelInitialize() = 0; sl@0: }; sl@0: sl@0: /** sl@0: Custom Interface class providing support for setting the client thread info for devsound. sl@0: */ sl@0: class MAudioClientThreadInfo sl@0: { sl@0: public: sl@0: /** sl@0: Set client thread info for devsound if plugin implementation requires this info sl@0: sl@0: @param aTid the required thread Id sl@0: @return An error code indicating if the function call was successful. sl@0: sl@0: @capability MultimediaDD sl@0: A process requires MultimediaDD capability to make this call. sl@0: */ sl@0: virtual TInt SetClientThreadInfo(TThreadId aTid) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: UID associated with the Custom interface MMMFDevSoundGetTimePlayed sl@0: */ sl@0: const TUid KMmfUidDevSoundTimePlayedCustomInterface = {0x10285CE4}; sl@0: sl@0: /** sl@0: This class provides an interface to querying current play time from DevSound. sl@0: */ sl@0: class MMMFDevSoundTimePlayed sl@0: { sl@0: public: sl@0: /** Retrieves the current play time from the audio renderer. sl@0: @param aTime sl@0: A reference to TTimeIntervalMicroSeconds object which will be filled with the current play time by this function. sl@0: @return An error code indicating if the function call was successful. sl@0: KErrNone on success, sl@0: KErrNotSupported if the underlying HwDevice does not support this custominterface sl@0: */ sl@0: virtual TInt GetTimePlayed(TTimeIntervalMicroSeconds& aTime) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: UID associated with the Custom interface MMMFDevSoundQueryIgnoresUnderflow sl@0: */ sl@0: const TUid KMmfUidDevSoundQueryIgnoresUnderflowCustomInterface = {0x10285E7B}; sl@0: sl@0: /** sl@0: This class provides an interface for querying DevSound whether it ignores the underflow errors from the sound driver. sl@0: */ sl@0: class MMMFDevSoundQueryIgnoresUnderflow sl@0: { sl@0: public: sl@0: /** Queries the devsound whether it ignores the underflow errors from the sound driver sl@0: @return ETrue if the devsound ignores all the underflow errors from the sound driver except for the last buffer. That means DevSound sl@0: propagates the underflow error from sound driver to its clients only when client sets the last buffer flag on the CMMFBuffer type buffer. sl@0: EFalse if devsound propagates the underflow errors from the sound driver in all the cases sl@0: */ sl@0: virtual TBool QueryIgnoresUnderflow() = 0; sl@0: }; sl@0: sl@0: sl@0: const TUid KMmfUidDevSoundTruePauseCustomInterface = {0x1028643E}; sl@0: sl@0: /** sl@0: This class provides an interface to be able to Resume from DevSound. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMMFDevSoundTruePause sl@0: { sl@0: public: sl@0: /** Queries the devsound whether it supports True Pause or not sl@0: This call is only valid when DevSound is initialized sl@0: @return ETrue if the current DevSound configuration does support this feature sl@0: EFalse otherwise sl@0: */ sl@0: virtual TBool IsResumeSupported() = 0; sl@0: sl@0: /** Resume the playback, recording or tone playing that was paused sl@0: @return An error code indicating if the function call was successful. sl@0: KErrNone on success, sl@0: KErrNotReady when is DevSound is not in pause sl@0: KErrNotSupported if the DevSound configuration does support this feature sl@0: */ sl@0: virtual TInt Resume() = 0; sl@0: }; sl@0: sl@0: sl@0: #endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H