|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __MMFBTAUDIOPOLICYREQUEST_H__ |
|
17 #define __MMFBTAUDIOPOLICYREQUEST_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "MmfBtPolicyClientServer.h" |
|
21 |
|
22 enum TPolicyResponse |
|
23 { |
|
24 EProceed, |
|
25 EDenied, |
|
26 EStopThenProceed, |
|
27 EResume, |
|
28 EMix |
|
29 }; |
|
30 |
|
31 /****************************************************************************** |
|
32 * Class Name: CMMFAudioPolicyRequest |
|
33 * |
|
34 * Description: This class carries request information from the client to the |
|
35 * server, upon making a request to proceed with a user's command. |
|
36 * |
|
37 ******************************************************************************/ |
|
38 |
|
39 |
|
40 class CMMFAudioPolicyRequest : public CBase |
|
41 /** |
|
42 *@internalTechnology |
|
43 */ |
|
44 { |
|
45 public: |
|
46 inline CMMFAudioPolicyRequest(); |
|
47 ~CMMFAudioPolicyRequest(){}; |
|
48 |
|
49 // Accessor methods: |
|
50 |
|
51 inline void SetPrioritySettings(const TMMFAudioPolicyPrioritySettings& aPrioritySettings); |
|
52 |
|
53 inline TInt Priority(); |
|
54 inline void SetPriority(TInt aPriority); |
|
55 |
|
56 inline TMMFAudioPolicyState State(); |
|
57 inline void SetState(TMMFAudioPolicyState aState); |
|
58 |
|
59 inline TMdaPriorityPreference Pref(); |
|
60 inline void SetPref(TMdaPriorityPreference aPref); |
|
61 |
|
62 inline TInt PolicySessionId(); |
|
63 |
|
64 inline TBool DeviceInUse(); |
|
65 inline void SetDeviceInUse(TBool aDeviceInUse); |
|
66 |
|
67 inline TUid NotificationEvent() const; |
|
68 inline void SetNotificationEvent(TUid aNotificationEventUid); |
|
69 inline void ResetNotificationEvent(TUid aNotificationEventUid); |
|
70 inline void SetEventFlag(TBool aEventFlag); |
|
71 inline TBool IsEventNotified() const; |
|
72 |
|
73 inline TBool Capabilities(); |
|
74 inline void SetCapabilities(TBool aCaps); |
|
75 |
|
76 private: |
|
77 |
|
78 TInt iPriority; |
|
79 TMdaPriorityPreference iPref; |
|
80 TMMFAudioPolicyState iState; |
|
81 TInt iPolicySessionId; |
|
82 TMMFAudioPolicyPrioritySettings iPrioritySettings; |
|
83 TBool iDeviceInUse; |
|
84 TUid iNotificationEventUid; |
|
85 TBool iEventNotified; |
|
86 |
|
87 TBool iCapabilities; |
|
88 |
|
89 friend class CMMFAudioPolicySession; // Allow this class to use SetSessionId() |
|
90 inline void SetPolicySessionId(TInt aPolicySessionId); |
|
91 }; |
|
92 |
|
93 #include "MmfBtAudioPolicyRequest.inl" |
|
94 |
|
95 #endif //__MMFBTAUDIOPOLICYREQUEST_H__ |