1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mmf/server/mmfdevsoundcustominterfacesupport.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,244 @@
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.11 +// which accompanies this distribution, and is available
1.12 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 +#ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H
1.23 +#define MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H
1.24 +
1.25 +const TUid KMmfUidDevSoundAudioResourceCustomInterface = {0x101FD9F3};
1.26 +const TUid KMmfUidDevSoundEmptyBuffersCustomInterface = {0x1027379c};
1.27 +const TUid KMmfUidDevSoundCancelInitializeCustomInterface = {0x102834D3};
1.28 +const TUid KMmfUidDevSoundAudioClientThreadInfoCustomInterface = {0x102834A7};
1.29 +
1.30 +/**
1.31 +@publishedAll
1.32 +@released
1.33 +
1.34 +Custom Interface providing support for AutoPauseResume Register, Cancel, GetResourceNotificationData and WillResumePlay.
1.35 +*/
1.36 +
1.37 +class MAutoPauseResumeSupport
1.38 + {
1.39 +public:
1.40 + /**
1.41 + Registers the event for notification when resource is avaliable.
1.42 +
1.43 + @param aEventType
1.44 + The event which the client is notified of.
1.45 +
1.46 + @param aNotificationRegistrationData
1.47 + Notification registration specific data, which has been reserved for future use.
1.48 +
1.49 + @return An error code indicating if the function call was successful. KErrNone on success, otherwise
1.50 + another of the system-wide error codes.
1.51 + */
1.52 + virtual TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData = KNullDesC8)=0;
1.53 +
1.54 + /**
1.55 + Cancels the registered notification event.
1.56 +
1.57 + @param aEventType
1.58 + The event to notify the client.
1.59 +
1.60 + @return An error code indicating if the function call was successful. KErrNone on success, otherwise
1.61 + another of the system-wide error codes.
1.62 + */
1.63 + virtual TInt CancelRegisterAsClient(TUid aEventType)=0;
1.64 + /**
1.65 + Gets the notification data for the event.
1.66 +
1.67 + @param aEventType
1.68 + The event which the client is notified of.
1.69 +
1.70 + @param aNotificationData
1.71 + The notification data for the client to resume playing. The actual data depends on the event type.
1.72 + Note that for the event type 'KMMFEventCategoryAudioResourceAvailable' the package buffer returned
1.73 + is TMMFTimeIntervalMicroSecondsPckg, but the contents should be converted to an integer and
1.74 + interpreted as the data returned is samples played, but not as a microsecond value.
1.75 +
1.76 + @return An error code indicating if the function call was successful. KErrNone on success, otherwise
1.77 + another of the system-wide error codes.
1.78 + */
1.79 + virtual TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData)=0;
1.80 + /**
1.81 + Waits for the client to resume the play even after the default timer expires.
1.82 +
1.83 + @return An error code indicating if the function call was successful. KErrNone on success, otherwise
1.84 + another of the system-wide error codes.
1.85 + */
1.86 + virtual TInt WillResumePlay()=0;
1.87 + };
1.88 +
1.89 +/**
1.90 +@publishedPartner
1.91 +@prototype
1.92 +
1.93 +Custom Interface class providing support for emptying the play buffers.
1.94 +*/
1.95 +class MMMFDevSoundEmptyBuffers
1.96 + {
1.97 +public:
1.98 +
1.99 + /**
1.100 + Empties the play buffers below DevSound without causing the codec to be deleted.
1.101 +
1.102 + @return An error code indicating if the function call was successful. KErrNone on success, KErrNotSupported
1.103 + if called in record mode, otherwise another of the system-wide error codes.
1.104 + */
1.105 + virtual TInt EmptyBuffers() = 0;
1.106 + };
1.107 +
1.108 +/**
1.109 +@publishedPartner
1.110 +@prototype
1.111 +
1.112 +Custom Interface class providing support for canceling initialization.
1.113 +*/
1.114 +class MMMFDevSoundCancelInitialize
1.115 + {
1.116 +public:
1.117 +
1.118 + /** Cancels the initialization process of a CMMFDevSound object
1.119 +
1.120 + @return An error code indicating if the function call was successful.
1.121 + KErrNone on success,
1.122 + KerrNotReady if this is called before InitializeL() call or after
1.123 + the object has been initialized,
1.124 + */
1.125 + virtual TInt CancelInitialize() = 0;
1.126 + };
1.127 +
1.128 +/**
1.129 +@internalComponent
1.130 +
1.131 +The class is a mixin and is intended to support for closing the Mux and Demux pair in a
1.132 +DevSound Custom Interface. The function encapsulated by this class is called whenever the
1.133 +MMMFDevSoundCustomInterfaceDeMuxPlugin::RefreshL method leaves.
1.134 +*/
1.135 +class MMMFDevSoundCustomInterfaceObserver
1.136 + {
1.137 +public:
1.138 +
1.139 + /**
1.140 + Closes the Mux and Demux pair of a DevSound Custom Interface.
1.141 + */
1.142 + virtual void CloseCustomInterface(TInt aIndex) = 0;
1.143 + };
1.144 +
1.145 +/**
1.146 +@publishedPartner
1.147 +@released
1.148 +
1.149 +Custom Interface class providing support for setting the client thread info for devsound.
1.150 +*/
1.151 +class MAudioClientThreadInfo
1.152 + {
1.153 +public:
1.154 + /**
1.155 + Set client thread info for devsound if plugin implementation requires this info
1.156 +
1.157 + @param aTid the required thread Id
1.158 + @return An error code indicating if the function call was successful.
1.159 +
1.160 + @capability MultimediaDD
1.161 + A process requires MultimediaDD capability to make this call.
1.162 + */
1.163 + virtual TInt SetClientThreadInfo(TThreadId aTid) = 0;
1.164 + };
1.165 +
1.166 +/*****************************************************************************/
1.167 +/**
1.168 +UID associated with the Custom interface MMMFDevSoundGetTimePlayed
1.169 +
1.170 +@publishedPartner
1.171 +@released
1.172 +*/
1.173 +const TUid KMmfUidDevSoundTimePlayedCustomInterface = {0x10285CE4};
1.174 +
1.175 +/**
1.176 +This class provides an interface to querying current play time from DevSound.
1.177 +
1.178 +@publishedPartner
1.179 +@released
1.180 +*/
1.181 +class MMMFDevSoundTimePlayed
1.182 + {
1.183 +public:
1.184 + /** Retrieves the current play time from the audio renderer.
1.185 + @param aTime
1.186 + A reference to TTimeIntervalMicroSeconds object which will be filled with the current play time by this function.
1.187 + @return An error code indicating if the function call was successful.
1.188 + KErrNone on success,
1.189 + KErrNotSupported if the underlying HwDevice does not support this custominterface
1.190 + */
1.191 + virtual TInt GetTimePlayed(TTimeIntervalMicroSeconds& aTime) = 0;
1.192 + };
1.193 +
1.194 +/*****************************************************************************/
1.195 +/**
1.196 +UID associated with the Custom interface MMMFDevSoundQueryIgnoresUnderflow
1.197 +
1.198 +@publishedPartner
1.199 +@released
1.200 +*/
1.201 +const TUid KMmfUidDevSoundQueryIgnoresUnderflowCustomInterface = {0x10285E7B};
1.202 +
1.203 +/**
1.204 +This class provides an interface for querying DevSound whether it ignores the underflow errors from the sound driver.
1.205 +@publishedPartner
1.206 +@released
1.207 +*/
1.208 +class MMMFDevSoundQueryIgnoresUnderflow
1.209 + {
1.210 +public:
1.211 + /** Queries the devsound whether it ignores the underflow errors from the sound driver
1.212 + @return ETrue if the devsound ignores all the underflow errors from the sound driver except for the last buffer. That means DevSound
1.213 + propagates the underflow error from sound driver to its clients only when client sets the last buffer flag on the CMMFBuffer type buffer.
1.214 + EFalse if devsound propagates the underflow errors from the sound driver in all the cases
1.215 + */
1.216 + virtual TBool QueryIgnoresUnderflow() = 0;
1.217 + };
1.218 +
1.219 +
1.220 +const TUid KMmfUidDevSoundTruePauseCustomInterface = {0x1028643E};
1.221 +
1.222 +/**
1.223 +This class provides an interface to be able to Resume from DevSound.
1.224 +@publishedPartner
1.225 +@release
1.226 +*/
1.227 +class MMMFDevSoundTruePause
1.228 + {
1.229 +public:
1.230 + /** Queries the devsound whether it supports True Pause or not
1.231 + This call is only valid when DevSound is initialized
1.232 + @return ETrue if the current DevSound configuration does support this feature
1.233 + EFalse otherwise
1.234 + */
1.235 + virtual TBool IsResumeSupported() = 0;
1.236 +
1.237 + /** Resume the playback, recording or tone playing that was paused
1.238 + @return An error code indicating if the function call was successful.
1.239 + KErrNone on success,
1.240 + KErrNotReady when is DevSound is not in pause
1.241 + KErrNotSupported if the DevSound configuration does support this feature
1.242 + */
1.243 + virtual TInt Resume() = 0;
1.244 + };
1.245 +
1.246 +
1.247 +#endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H