|
1 /* |
|
2 * Copyright (c) 2005 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: Group for panning controls |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAMMSPANCONTROLGROUP_H |
|
20 #define CAMMSPANCONTROLGROUP_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "cammscontrolgroup.h" |
|
25 |
|
26 // CONSTANTS |
|
27 _LIT(KAMMSPanControlClassName, ".amms.control.PanControl"); |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CAMMSPanControl; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Group for panning controls |
|
36 * |
|
37 * @since 3.0 |
|
38 */ |
|
39 NONSHARABLE_CLASS(CAMMSPanControlGroup): public CAMMSControlGroup |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CAMMSPanControlGroup* NewLC(); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CAMMSPanControlGroup(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Gets the current panning set. |
|
57 * |
|
58 * @return The current panning. |
|
59 */ |
|
60 TInt Pan(); |
|
61 |
|
62 /** |
|
63 * Sets the panning using a linear point scale with values between -100 |
|
64 * and 100. 0 represents panning for both channels, -100 full panning to |
|
65 * the left and 100 full panning to the right. If the given panning |
|
66 * value is less than -100 or greater than 100, the panning will be set |
|
67 * to -100 or 100, respectively. |
|
68 * |
|
69 * @param aPan The new panning to be set. |
|
70 * @param aSetPan Returned pan that has been set. |
|
71 */ |
|
72 void SetPanL(TInt aPan, TInt& aSetPan); |
|
73 |
|
74 private: // New functions |
|
75 /** |
|
76 * Gets control. Ownership is not tranferred. |
|
77 * |
|
78 * @param aIndex Control index. |
|
79 */ |
|
80 CAMMSPanControl* TypeSafeControl(TInt aIndex) const; |
|
81 |
|
82 public: // Functions from base classes |
|
83 /** |
|
84 * Returns class name that identifies this control group. |
|
85 * |
|
86 * @return Control group name. |
|
87 */ |
|
88 const TDesC16& ClassName(); |
|
89 |
|
90 protected: |
|
91 /* |
|
92 * Called by when a new player is added |
|
93 * |
|
94 * @param aPlayer The player being added |
|
95 * @param aControl The player's control relevant to this group |
|
96 */ |
|
97 void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl); |
|
98 |
|
99 private: |
|
100 /** |
|
101 * C++ default constructor. |
|
102 */ |
|
103 CAMMSPanControlGroup(); |
|
104 |
|
105 private: //Data |
|
106 |
|
107 // the actual volume for this control group |
|
108 TInt iPan; |
|
109 }; |
|
110 |
|
111 #endif // CAMMSPANCONTROLGROUP_H |