os/mm/devsound/devsoundapi/inc/mmfdevsoundcustominterfacesupportclasses.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/devsoundapi/inc/mmfdevsoundcustominterfacesupportclasses.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,155 @@
     1.4 +
     1.5 +// MmfDevSoundCustomInterfaceSupport.h
     1.6 +
     1.7 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.8 +// All rights reserved.
     1.9 +// This component and the accompanying materials are made available
    1.10 +// under the terms of "Eclipse Public License v1.0"
    1.11 +// which accompanies this distribution, and is available
    1.12 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.13 +//
    1.14 +// Initial Contributors:
    1.15 +// Nokia Corporation - initial contribution.
    1.16 +//
    1.17 +// Contributors:
    1.18 +//
    1.19 +// Description:
    1.20 +//
    1.21 +
    1.22 +/**
    1.23 + @publishedPartner
    1.24 + @released
    1.25 + @file
    1.26 +*/
    1.27 +
    1.28 +#ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H
    1.29 +#define MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H
    1.30 +
    1.31 +const TUid KMmfUidDevSoundAudioResourceCustomInterface = {0x101FD9F3};
    1.32 +const TUid KMmfUidDevSoundEmptyBuffersCustomInterface = {0x1027379c};
    1.33 +const TUid KMmfUidDevSoundCancelInitializeCustomInterface = {0x102834D3};
    1.34 +const TUid KMmfUidDevSoundAudioClientThreadInfoCustomInterface = {0x102834A7};
    1.35 +
    1.36 +
    1.37 +/**
    1.38 +Custom Interface class providing support for emptying the play buffers.
    1.39 +*/
    1.40 +class MMMFDevSoundEmptyBuffers
    1.41 +	{	
    1.42 +public:
    1.43 +	
    1.44 +	/**
    1.45 +	Empties the play buffers below DevSound without causing the codec to be deleted.
    1.46 +
    1.47 +	@return An error code indicating if the function call was successful. KErrNone on success, KErrNotSupported 
    1.48 +			if called in record mode, otherwise another of the system-wide error codes.
    1.49 +	*/
    1.50 +	virtual TInt EmptyBuffers() = 0;
    1.51 +	};	
    1.52 +
    1.53 +/**
    1.54 +Custom Interface class providing support for canceling initialization.
    1.55 +*/
    1.56 +class MMMFDevSoundCancelInitialize
    1.57 +	{	
    1.58 +public:
    1.59 +	
    1.60 +	/** Cancels the initialization process of a CMMFDevSound object
    1.61 +
    1.62 +	@return An error code indicating if the function call was successful. 
    1.63 +			KErrNone on success,
    1.64 +			KerrNotReady if this is called before InitializeL() call or after      
    1.65 +			the object has been initialized, 
    1.66 +	*/
    1.67 +	virtual TInt CancelInitialize() = 0;
    1.68 +	};	
    1.69 +
    1.70 +/**
    1.71 +Custom Interface class providing support for setting the client thread info for devsound.
    1.72 +*/
    1.73 +class MAudioClientThreadInfo
    1.74 +	{	
    1.75 +public:
    1.76 +	/**
    1.77 +	Set client thread info for devsound if plugin implementation requires this info
    1.78 +	
    1.79 +	@param  aTid the required thread Id
    1.80 +	@return An error code indicating if the function call was successful.
    1.81 +
    1.82 +	@capability MultimediaDD
    1.83 +		A process requires MultimediaDD capability to make this call. 
    1.84 +	*/
    1.85 +	virtual TInt SetClientThreadInfo(TThreadId aTid) = 0;
    1.86 +	};	
    1.87 +
    1.88 +/*****************************************************************************/
    1.89 +/**
    1.90 +UID associated with the Custom interface MMMFDevSoundGetTimePlayed
    1.91 +*/
    1.92 +const TUid KMmfUidDevSoundTimePlayedCustomInterface = {0x10285CE4};
    1.93 +
    1.94 +/**
    1.95 +This class provides an interface to querying current play time from DevSound.
    1.96 +*/	
    1.97 +class MMMFDevSoundTimePlayed
    1.98 +	{
    1.99 +public:
   1.100 +	/** Retrieves the current play time from the audio renderer.
   1.101 +	@param  aTime
   1.102 +	        A reference to TTimeIntervalMicroSeconds object which will be filled with the current play time by this function.
   1.103 +	@return An error code indicating if the function call was successful. 
   1.104 +			KErrNone on success,
   1.105 +			KErrNotSupported if the underlying HwDevice does not support this custominterface
   1.106 +	*/
   1.107 +	virtual TInt GetTimePlayed(TTimeIntervalMicroSeconds& aTime) = 0;
   1.108 +	};
   1.109 +
   1.110 +/*****************************************************************************/
   1.111 +/**
   1.112 +UID associated with the Custom interface MMMFDevSoundQueryIgnoresUnderflow
   1.113 +*/
   1.114 +const TUid KMmfUidDevSoundQueryIgnoresUnderflowCustomInterface = {0x10285E7B};
   1.115 +
   1.116 +/**
   1.117 +This class provides an interface for querying DevSound whether it ignores the underflow errors from the sound driver.
   1.118 +*/	
   1.119 +class MMMFDevSoundQueryIgnoresUnderflow
   1.120 +	{
   1.121 +public:
   1.122 +	/** Queries the devsound whether it ignores the underflow errors from the sound driver
   1.123 +	@return ETrue 	if the devsound ignores all the underflow errors from the sound driver except for the last buffer. That means DevSound
   1.124 +					propagates the underflow error from sound driver to its clients only when client sets the last buffer flag on the CMMFBuffer type buffer.
   1.125 +			EFalse 	if devsound propagates the underflow errors from the sound driver in all the cases
   1.126 +	*/
   1.127 +	virtual TBool QueryIgnoresUnderflow() = 0;
   1.128 +	};
   1.129 +
   1.130 +
   1.131 +const TUid KMmfUidDevSoundTruePauseCustomInterface = {0x1028643E};
   1.132 +
   1.133 +/**
   1.134 +This class provides an interface to be able to Resume from DevSound.
   1.135 +@publishedPartner
   1.136 +@released
   1.137 +*/	
   1.138 +class MMMFDevSoundTruePause
   1.139 +	{
   1.140 +public:
   1.141 +	/** Queries the devsound whether it supports True Pause or not
   1.142 +	This call is only valid when DevSound is initialized
   1.143 +	@return ETrue if the current DevSound configuration does support this feature
   1.144 +			EFalse otherwise
   1.145 +	*/
   1.146 +	virtual TBool IsResumeSupported() = 0;
   1.147 +
   1.148 +	/** Resume the playback, recording or tone playing that was paused
   1.149 +	@return An error code indicating if the function call was successful. 
   1.150 +			KErrNone on success,
   1.151 +			KErrNotReady when is DevSound is not in pause
   1.152 +			KErrNotSupported if the DevSound configuration does support this feature
   1.153 +	*/
   1.154 +	virtual TInt Resume() = 0;
   1.155 +	};
   1.156 +
   1.157 +
   1.158 +#endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H