|
1 /* |
|
2 * |
|
3 * Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of the License "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Original Contributors: |
|
11 * Comarch S.A. - original contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef HSHFPREMOTEAUDIOVOLUMECONTROL_H |
|
20 #define HSHFPREMOTEAUDIOVOLUMECONTROL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "hfpfeaturecommons.h" |
|
25 |
|
26 class CHsHFPCommand; |
|
27 class CHsHFPSettings; |
|
28 |
|
29 /** |
|
30 * @brief Represents "Remote audio volume control" feature |
|
31 */ |
|
32 class CHsHFPRemoteAudioVolumeControl : public CBase, |
|
33 public MHsHFPProcedureCommons |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * |
|
40 * @param aObserver feature observer |
|
41 * |
|
42 * @return instance of class |
|
43 */ |
|
44 static CHsHFPRemoteAudioVolumeControl* NewL( |
|
45 MHsHFPFeatureProviderObserver* aObserver); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * |
|
50 * @param aObserver feature observer |
|
51 * |
|
52 * @return instance of class |
|
53 */ |
|
54 static CHsHFPRemoteAudioVolumeControl* NewLC( |
|
55 MHsHFPFeatureProviderObserver* aObserver); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CHsHFPRemoteAudioVolumeControl(); |
|
61 |
|
62 public: |
|
63 |
|
64 /** |
|
65 * Synchronizes volume levels in AG and HF |
|
66 * |
|
67 * @param aInputCmd input AT command |
|
68 * @param aOutputCmd response |
|
69 * |
|
70 * @return KErrNone if successful, otherwise one of the system-wide error |
|
71 * codes |
|
72 */ |
|
73 TInt VolumeLevelSynchronization(const CHsHFPCommand &aInputCmd, |
|
74 CHsHFPCommand &aOutputCmd); |
|
75 |
|
76 /** |
|
77 * Resets local setting after client disconnection |
|
78 */ |
|
79 void Reset(); |
|
80 |
|
81 public: |
|
82 //Method inherited from MHsHFPProcedureCommons |
|
83 TInt ProcessCommand(const CHsHFPCommand &aInputCmd, |
|
84 CHsHFPCommand &aOutputCmd); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * Constructor for performing 1st stage construction |
|
90 * |
|
91 * @param aObserver feature observer |
|
92 */ |
|
93 CHsHFPRemoteAudioVolumeControl(MHsHFPFeatureProviderObserver* aObserver); |
|
94 |
|
95 /** |
|
96 * Constructor for performing 2nd stage construction |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 private: |
|
101 /** Pointer to observer */ |
|
102 MHsHFPFeatureProviderObserver* iObserver; |
|
103 |
|
104 /** Denotes if volume level synchronization is finished */ |
|
105 TBool iVolumeLevelSynchronized; |
|
106 |
|
107 /** Denotes if OK command is expected */ |
|
108 TBool iWaitingForOK; |
|
109 |
|
110 /** Denotes if VGM command is expected */ |
|
111 TBool iWaitingForVgmOK; |
|
112 |
|
113 /** Profile setting */ |
|
114 CHsHFPSettings* iSettings; |
|
115 }; |
|
116 |
|
117 #endif // HSHFPREMOTEAUDIOVOLUMECONTROL_H |