sl@0: // Copyright (c) 2008-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: #ifndef A3FDEVSOUNDAUDIOPAUSERESUME_H sl@0: #define A3FDEVSOUNDAUDIOPAUSERESUME_H sl@0: sl@0: /** sl@0: * @publishedPartner sl@0: * @released sl@0: * @file sl@0: */ sl@0: sl@0: #include sl@0: sl@0: /** sl@0: * KUIdAudioResourceNotification – To get the interface of MAutoPauseResume from context. sl@0: */ sl@0: const TInt KUIdAudioResourceNotificationValue = 0x10285D3B; sl@0: const TUid KUIdAudioResourceNotification = {KUIdAudioResourceNotificationValue}; sl@0: sl@0: sl@0: /** sl@0: Defines the interface for observing auto pause and resume events sl@0: */ sl@0: class MA3FDevSoundAutoPauseResumeObserver sl@0: { sl@0: public: sl@0: /* sl@0: Notifies the DevSound Adaptor that the resource is available. sl@0: */ sl@0: virtual void NotifyResume() = 0; sl@0: }; sl@0: sl@0: /** sl@0: Interface providing support for AutoPauseResume Register, Cancel and WillResumePlay. sl@0: */ sl@0: class MA3FDevSoundAutoPauseResume sl@0: { sl@0: public: sl@0: /* sl@0: Registers the Event for Notification when resource is avaliable. sl@0: @param TUid aEventType The event which the client is notified of. sl@0: @param TDesC8 &aNotificationRegistrationData Notification registration specific data. sl@0: @param MA3FDevSoundAutoPauseResumeObserver* aObserverPtr An Observer to receive the notification. sl@0: @return An error code indicating if the registration was successful. KErrNone on success, otherwise another of the system-wide error codes. sl@0: */ sl@0: virtual TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData, MA3FDevSoundAutoPauseResumeObserver* aObserverPtr) = 0; sl@0: sl@0: /* sl@0: Cancels the registered notification event. sl@0: @param TUid aEventType The Event to notify the client. sl@0: @return An error code indicating if the cancel registration was successful. KErrNone on success, otherwise another of the system-wide error codes. sl@0: */ sl@0: virtual TInt CancelRegisterAsClient(TUid aEventType) = 0; sl@0: sl@0: /* sl@0: Waits for the client to resume the play even after the default timer expires. sl@0: @return An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes. sl@0: */ sl@0: virtual TInt WillResumePlay() = 0; sl@0: }; sl@0: sl@0: #endif //A3FDEVSOUNDAUDIOPAUSERESUME_H