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 __MMFBTDEVSOUNDEVENTHANDLER_H
18 #define __MMFBTDEVSOUNDEVENTHANDLER_H
22 #include "MmfBtPolicyClientServer.h"
24 class CMMFDevSoundSessionXtnd;
26 class RMMFAudioPolicyProxy;
29 class TMMFAudioPolicyEvent
37 @param "aEventType" "A code to define the type of event."
38 @param "aErrorCode" "The error code associated with the event."
41 // TMMFAudioPolicyEvent(TAudioPolicyEventType aEventType, TInt aErrorCode) : iEventType(aEventType), iErrorCode(aErrorCode) {};
46 Provided so this class can be packaged in a TPckgBuf<>.
49 TMMFAudioPolicyEvent() : iEventType(EMMFAudioPolicyNoEvent), iErrorCode(KErrNone) {};
51 enum TAudioPolicyEventType
53 EMMFAudioPolicyNoEvent = 0,
54 EMMFAudioPolicySwitchToIdle,
55 EMMFAudioPolicyPriorityTooLow,
56 EMMFAudioPolicyResourceNotification
59 TAudioPolicyEventType iEventType;
61 TMMFAudioPolicyState iState;
65 typedef TPckgBuf<TMMFAudioPolicyEvent> TMMFAudioPolicyEventPckg;
67 class CMMFDevSoundEventHandler : public CActive
73 static CMMFDevSoundEventHandler* NewL(RMMFAudioPolicyProxy* aAudioPolicyProxy);
74 ~CMMFDevSoundEventHandler();
76 void CancelReceiveEvents();
78 TInt RunError(TInt aError);
80 void SetDevSoundInfo(CMMFDevSoundSessionXtnd* aDevSound);
84 CMMFDevSoundEventHandler(RMMFAudioPolicyProxy* aAudioPolicyProxy);
86 enum {EGranularity=8};
87 RMMFAudioPolicyProxy* iAudioPolicyProxy;
88 TMMFAudioPolicyEventPckg iAudioPolicyEventPckg;
89 TRequestStatus iRequestStatus;
91 CMMFDevSoundSessionXtnd* iDevSound;