Update contrib.
1 // Copyright (c) 2001-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.
17 #ifndef __MMFDEVSOUNDEVENTHANDLER_H
18 #define __MMFDEVSOUNDEVENTHANDLER_H
22 #include "MmfPolicyClientServer.h"
24 class CMMFDevSoundSessionXtnd;
26 class RMMFAudioPolicyProxy;
29 class TMMFAudioPolicyEvent
36 Provided so this class can be packaged in a TPckgBuf<>.
39 TMMFAudioPolicyEvent() : iEventType(EMMFAudioPolicyNoEvent), iErrorCode(KErrNone) {};
41 enum TAudioPolicyEventType
43 EMMFAudioPolicyNoEvent = 0,
44 EMMFAudioPolicySwitchToIdle,
45 EMMFAudioPolicyPriorityTooLow,
46 EMMFAudioPolicyResourceNotification
49 TMMFAudioPolicyEvent(TAudioPolicyEventType aType, TInt aError, TMMFAudioPolicyState aState) :
50 iEventType(aType), iErrorCode(aError), iState(aState) {};
52 TAudioPolicyEventType iEventType;
54 TMMFAudioPolicyState iState;
58 typedef TPckgBuf<TMMFAudioPolicyEvent> TMMFAudioPolicyEventPckg;
60 class CMMFDevSoundEventHandler : public CActive
66 static CMMFDevSoundEventHandler* NewL(RMMFAudioPolicyProxy* aAudioPolicyProxy);
67 ~CMMFDevSoundEventHandler();
69 void CancelReceiveEvents();
71 TInt RunError(TInt aError);
73 void SetDevSoundInfo(CMMFDevSoundSessionXtnd* aDevSound);
77 CMMFDevSoundEventHandler(RMMFAudioPolicyProxy* aAudioPolicyProxy);
79 enum {EGranularity=8};
80 RMMFAudioPolicyProxy* iAudioPolicyProxy;
81 TMMFAudioPolicyEventPckg iAudioPolicyEventPckg;
82 TRequestStatus iRequestStatus;
84 CMMFDevSoundSessionXtnd* iDevSound;