sl@0
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __MMF_AUDIOPOLICYREQUEST_H__
|
sl@0
|
17 |
#define __MMF_AUDIOPOLICYREQUEST_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32base.h>
|
sl@0
|
20 |
#include "MmfPolicyClientServer.h"
|
sl@0
|
21 |
|
sl@0
|
22 |
enum TPolicyResponse
|
sl@0
|
23 |
{
|
sl@0
|
24 |
EProceed, // resource is available for immediate use
|
sl@0
|
25 |
EDenied, // request is denied
|
sl@0
|
26 |
EStopThenProceed, // someone must be stopped to honor this request
|
sl@0
|
27 |
EResume,
|
sl@0
|
28 |
EMix
|
sl@0
|
29 |
};
|
sl@0
|
30 |
class CMMFAudioPolicyRequest; // declared here
|
sl@0
|
31 |
/******************************************************************************
|
sl@0
|
32 |
* Class Name: CMMFAudioPolicyRequest
|
sl@0
|
33 |
*
|
sl@0
|
34 |
* Description: This class carries request information from the client to the
|
sl@0
|
35 |
* server, upon making a request to proceed with a user's command.
|
sl@0
|
36 |
*
|
sl@0
|
37 |
******************************************************************************/
|
sl@0
|
38 |
|
sl@0
|
39 |
|
sl@0
|
40 |
NONSHARABLE_CLASS( CMMFAudioPolicyRequest ) : public CBase
|
sl@0
|
41 |
/**
|
sl@0
|
42 |
*@internalTechnology
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
{
|
sl@0
|
45 |
public:
|
sl@0
|
46 |
CMMFAudioPolicyRequest();
|
sl@0
|
47 |
~CMMFAudioPolicyRequest();
|
sl@0
|
48 |
|
sl@0
|
49 |
// Accessor methods:
|
sl@0
|
50 |
|
sl@0
|
51 |
inline void SetPrioritySettings(const TMMFAudioPolicyPrioritySettings& aPrioritySettings);
|
sl@0
|
52 |
|
sl@0
|
53 |
inline TInt Priority() const;
|
sl@0
|
54 |
inline void SetPriority(TInt aPriority);
|
sl@0
|
55 |
|
sl@0
|
56 |
inline TMMFAudioPolicyState State() const;
|
sl@0
|
57 |
inline void SetState(TMMFAudioPolicyState aState);
|
sl@0
|
58 |
|
sl@0
|
59 |
inline TMdaPriorityPreference Pref() const;
|
sl@0
|
60 |
inline void SetPref(TMdaPriorityPreference aPref);
|
sl@0
|
61 |
|
sl@0
|
62 |
inline TInt PolicySessionId() const;
|
sl@0
|
63 |
|
sl@0
|
64 |
inline TUid NotificationEvent() const;
|
sl@0
|
65 |
inline void SetNotificationEvent(TUid aNotificationEventUid);
|
sl@0
|
66 |
inline void ResetNotificationEvent(TUid aNotificationEventUid);
|
sl@0
|
67 |
inline void SetEventFlag(TBool aEventFlag);
|
sl@0
|
68 |
inline TBool IsEventNotified() const;
|
sl@0
|
69 |
|
sl@0
|
70 |
inline TBool SendEventPending() const;
|
sl@0
|
71 |
inline void SetSendEventPending(TBool aValue);
|
sl@0
|
72 |
|
sl@0
|
73 |
void SetRequestDataL(const TDesC8& aRequestData);
|
sl@0
|
74 |
inline const TDesC8& RequestData() const;
|
sl@0
|
75 |
|
sl@0
|
76 |
inline TBool Capabilities() const;
|
sl@0
|
77 |
inline void SetCapabilities(TBool aCaps);
|
sl@0
|
78 |
|
sl@0
|
79 |
private:
|
sl@0
|
80 |
|
sl@0
|
81 |
TInt iPriority;
|
sl@0
|
82 |
TMdaPriorityPreference iPref;
|
sl@0
|
83 |
TMMFAudioPolicyState iState;
|
sl@0
|
84 |
TInt iPolicySessionId;
|
sl@0
|
85 |
TMMFAudioPolicyPrioritySettings iPrioritySettings;
|
sl@0
|
86 |
TUid iNotificationEventUid;
|
sl@0
|
87 |
TBool iEventNotified;
|
sl@0
|
88 |
TBool iSendEventPending;
|
sl@0
|
89 |
HBufC8* iRequestData;
|
sl@0
|
90 |
TPtrC8 iReqDataPtr;
|
sl@0
|
91 |
|
sl@0
|
92 |
TBool iCapabilities;
|
sl@0
|
93 |
|
sl@0
|
94 |
friend class CMMFAudioPolicySession; // Allow this class to use SetSessionId()
|
sl@0
|
95 |
inline void SetPolicySessionId(TInt aPolicySessionId);
|
sl@0
|
96 |
};
|
sl@0
|
97 |
|
sl@0
|
98 |
#include "MmfAudioPolicyRequest.inl"
|
sl@0
|
99 |
|
sl@0
|
100 |
#endif //__MMF_AUDIOPOLICYREQUEST_H__
|