|
1 /* |
|
2 * Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: . |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAUDIOCONFIGHANDLER_H |
|
20 #define CAUDIOCONFIGHANDLER_H |
|
21 NONSHARABLE_CLASS( TAudioConfigHandler ) : public MPVAudioOutputControlObserver |
|
22 { |
|
23 public: |
|
24 /** |
|
25 * Constructor. |
|
26 */ |
|
27 TAudioConfigHandler( MVtProtocolHandler* aProtocolHandler); |
|
28 |
|
29 /** |
|
30 * Signals completion of the audio output control command. |
|
31 * @param aId The command id of the completed command. |
|
32 * @param aCmd The command type. |
|
33 * @param aContextData The context data passed in with the command. |
|
34 * @param aStatus The command completion status. |
|
35 **/ |
|
36 virtual void AudioOutputControlCommandComplete(TPVCommandId aId |
|
37 ,TPVAudioOutputControlCommand aCmd |
|
38 ,TAny *aContextData |
|
39 ,TInt aStatus); |
|
40 private: |
|
41 MVtProtocolHandler* iProtocolHandler; |
|
42 }; |
|
43 |
|
44 NONSHARABLE_CLASS( CAudioConfigCommand ) : public CBase, |
|
45 public MVtAudioConfigCommand |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Constructor. |
|
51 */ |
|
52 CAudioConfigCommand(MPVAudioOutputControl* aAudioCtrl); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CAudioConfigCommand(); |
|
58 |
|
59 /** |
|
60 * Method to set the playback volume to the specified value. |
|
61 * |
|
62 * This is a pure virtual function that each derived class must implement. |
|
63 * It is also an asynchronous function which will be answered with a callback. |
|
64 * |
|
65 * @param aNewVolume |
|
66 * An input parameter to hold the value for the requested playback volume. |
|
67 * |
|
68 * @returns TInt |
|
69 * Returns a command ID that can be used to identify a command completion result with corresponding request. |
|
70 */ |
|
71 virtual TInt SetAudioVolumeL(TInt aVolume); |
|
72 |
|
73 /** |
|
74 * Method to get the maximum valid value for the playback volume. |
|
75 * |
|
76 * This is a pure virtual function that each derived class must implement. |
|
77 * It is also an asynchronous function which will be answered with a callback. |
|
78 * |
|
79 * @param aMaxVolume |
|
80 * An output parameter to hold the value for the maximum valid playback volume. |
|
81 * Note that the parameter should not be used until the callback indicates that the |
|
82 * method has completed. |
|
83 * |
|
84 * @returns TInt |
|
85 * Returns a command ID that can be used to identify a command completion result with corresponding request. |
|
86 */ |
|
87 virtual TInt GetMaxAudioVolumeL(TInt& aMaxVolume); |
|
88 |
|
89 /** |
|
90 * This API allows the user to specify observers for the 324m interface. |
|
91 * |
|
92 * @param aHandler |
|
93 **/ |
|
94 virtual void SetObserverL(MVtProtocolHandler* aHandler); |
|
95 private: |
|
96 MPVAudioOutputControl* iAudioCtrl; |
|
97 TAudioConfigHandler* iAudioConfigHandler; |
|
98 }; |
|
99 #endif |
|
100 // End of File |