33 * |
36 * |
34 * CMusEngSession encapsulates all common activities example using |
37 * CMusEngSession encapsulates all common activities example using |
35 * resources. |
38 * resources. |
36 * |
39 * |
37 * @lib musengine.lib |
40 * @lib musengine.lib |
|
41 * @since S60 v3.2 |
38 */ |
42 */ |
39 class CMusEngSession : public CBase |
43 class CMusEngSession : public CBase |
40 { |
44 { |
41 |
45 |
42 public: |
46 public: |
43 |
47 |
44 /** |
48 /** |
45 * Desctructor, finalize session |
49 * Desctructor, finalize session |
46 * |
50 * |
|
51 * @since S60 v3.2 |
47 */ |
52 */ |
48 ~CMusEngSession(); |
53 ~CMusEngSession(); |
49 |
54 |
|
55 |
|
56 public: // API FUNCTIONS |
|
57 |
|
58 /** |
|
59 * Returns currently assigned drawing area |
|
60 * |
|
61 * @since S60 v3.2 |
|
62 * @return TRect This session drawing area recttangle |
|
63 */ |
|
64 IMPORT_C TRect Rect() const; |
|
65 |
|
66 /** |
|
67 * Sets new drawing area |
|
68 * |
|
69 * @since S60 v3.2 |
|
70 * @param TRect This session new drawing area rectangle |
|
71 */ |
|
72 IMPORT_C void SetRectL( const TRect& aRect ); |
|
73 |
|
74 /** |
|
75 * Activates/deactivates loadspeaker |
|
76 * |
|
77 * @since S60 v3.2 |
|
78 * @param TBool Enable or disable loudspeaker |
|
79 * @param TBool Show activation dialog |
|
80 */ |
|
81 IMPORT_C void EnableLoudspeakerL( TBool aEnable, TBool aShowDialog ); |
|
82 |
|
83 /** |
|
84 * Checks is loudspeaker enabled or disabled. |
|
85 * |
|
86 * @since S60 v3.2 |
|
87 * @return TBool true if enabled |
|
88 */ |
|
89 IMPORT_C TBool IsLoudSpeakerEnabled() const; |
|
90 |
|
91 /** |
|
92 * Returns current volume level |
|
93 * |
|
94 * @since S60 v3.2 |
|
95 */ |
|
96 IMPORT_C TInt VolumeL() const; |
|
97 |
|
98 |
|
99 public: // VIRTUAL API FUNCTIONS |
|
100 |
|
101 /** |
|
102 * Increases volume level by one. |
|
103 * |
|
104 * @since S60 v3.2 |
|
105 */ |
|
106 IMPORT_C virtual void VolumeUpL(); |
|
107 |
|
108 /** |
|
109 * Decreases volume level by one |
|
110 * |
|
111 * @since S60 v3.2 |
|
112 */ |
|
113 IMPORT_C virtual void VolumeDownL(); |
|
114 |
|
115 /** |
|
116 * Enables or disables display. Call to this function is considered |
|
117 * as a permission or denial to draw to the display. |
|
118 * |
|
119 * @since S60 v3.2 |
|
120 */ |
|
121 IMPORT_C virtual void EnableDisplayL( TBool aEnable ) = 0; |
|
122 |
|
123 /** |
|
124 * Mutes current audio stream meaning that any audio is not played or |
|
125 * sent to network. |
|
126 * |
|
127 * @since S60 v3.2 |
|
128 */ |
|
129 IMPORT_C virtual void MuteL() = 0; |
|
130 |
|
131 /** |
|
132 * Unmute current audio stream meaning that all the audio is played |
|
133 * and if needed also sent to network. |
|
134 * |
|
135 * @since S60 v3.2 |
|
136 */ |
|
137 IMPORT_C virtual void UnmuteL() = 0; |
|
138 |
|
139 |
|
140 protected: // INTERNAL |
|
141 |
|
142 virtual void RectChangedL() = 0; |
50 |
143 |
51 |
144 |
52 protected: |
145 protected: |
53 |
146 |
54 /** |
147 /** |
55 * Constructor, private cannot be instantiate |
148 * Constructor, private cannot be instantiate |
56 * |
149 * |
57 * @param aRect reserved drawing area for this session |
150 * |
|
151 * @since S60 v3.2 |
|
152 * @param TRect reserved drawing area for this session |
58 */ |
153 */ |
59 CMusEngSession(); |
154 CMusEngSession( const TRect& aRect ); |
60 |
155 |
61 |
156 |
62 protected: |
157 protected: |
63 |
158 |
64 /** |
159 /** |
65 * second-phase constructor, called by those session specific |
160 * second-phase constructor, called by those session specific |
66 * constructors |
161 * constructors |
|
162 * |
|
163 * @since S60 v3.2 |
67 */ |
164 */ |
68 void ConstructL(); |
165 void ConstructL(); |
69 |
166 |
|
167 |
|
168 protected: // MEMBERS |
|
169 |
|
170 /** |
|
171 * Callback pointer to interface, not own |
|
172 * |
|
173 * @since S60 v3.2 |
|
174 */ |
|
175 MMusEngSessionObserver* iSessionObserver; |
|
176 |
|
177 |
|
178 public: // MEMBERS |
|
179 |
|
180 /** |
|
181 * Drawing area rect |
|
182 * |
|
183 * @since S60 v3.2 |
|
184 */ |
|
185 TRect iRect; |
|
186 |
|
187 /** |
|
188 * Telephone utilities |
|
189 * |
|
190 * @since S60 v3.2 |
|
191 */ |
|
192 //CMusEngTelephoneUtils* iTelephoneUtils; |
|
193 |
|
194 TInt iErrorCode; |
|
195 |
|
196 |
70 }; |
197 }; |
71 |
198 |
72 #endif //MUSENGSESSION_H |
199 #endif //MUSHENGSESSION_H |