|
1 /* |
|
2 * Copyright (c) 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: ?Description |
|
15 * Version : %version: 19 % << Don't touch! Updated by Synergy at check-out. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MUSSETTINGS_INL |
|
21 #define MUSSETTINGS_INL |
|
22 |
|
23 #include "mussettings.h" |
|
24 #include "mussettingskeys.h" |
|
25 #include "muslogger.h" |
|
26 #include "mussipprofileutils.h" |
|
27 |
|
28 #include <centralrepository.h> |
|
29 |
|
30 const TInt32 KMusDisableAVC = 0x0fffffff; |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 inline TInt MultimediaSharingSettings::GetPropertyValueL( TUint32 aKey ) |
|
37 { |
|
38 TInt value( KErrNotFound ); |
|
39 |
|
40 CRepository* repository = CRepository::NewLC( |
|
41 MusSettingsKeys::KRepositoryUid ); |
|
42 |
|
43 User::LeaveIfError(repository->Get( aKey, value )); |
|
44 |
|
45 CleanupStack::PopAndDestroy( repository ); |
|
46 |
|
47 return value; |
|
48 } |
|
49 |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 inline void MultimediaSharingSettings::SetPropertyValueL( TUint32 aKey, |
|
56 TInt aValue ) |
|
57 { |
|
58 CRepository* repository = CRepository::NewLC( |
|
59 MusSettingsKeys::KRepositoryUid ); |
|
60 |
|
61 User::LeaveIfError(repository->Set( aKey, aValue )); |
|
62 |
|
63 CleanupStack::PopAndDestroy( repository ); |
|
64 } |
|
65 |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 inline HBufC16* MultimediaSharingSettings::GetPropertyValueLC( TUint32 aKey ) |
|
72 { |
|
73 TBuf16<NCentralRepositoryConstants::KMaxUnicodeStringLength> value; |
|
74 |
|
75 CRepository* repository = CRepository::NewLC( |
|
76 MusSettingsKeys::KRepositoryUid ); |
|
77 |
|
78 User::LeaveIfError( repository->Get( aKey, value ) ); |
|
79 |
|
80 CleanupStack::PopAndDestroy( repository ); |
|
81 |
|
82 return value.AllocLC(); |
|
83 } |
|
84 |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 inline void MultimediaSharingSettings::SetPropertyValueL( |
|
91 TUint32 aKey, |
|
92 const TDesC16& aValue ) |
|
93 { |
|
94 CRepository* repository = CRepository::NewLC( |
|
95 MusSettingsKeys::KRepositoryUid ); |
|
96 |
|
97 User::LeaveIfError(repository->Set( aKey, aValue )); |
|
98 |
|
99 CleanupStack::PopAndDestroy( repository ); |
|
100 } |
|
101 |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 inline MusSettingsKeys::TActivation |
|
108 MultimediaSharingSettings::ActivationSettingL() |
|
109 { |
|
110 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::ActivationSettingL()" ) |
|
111 TInt value = GetPropertyValueL( MusSettingsKeys::KActivation ); |
|
112 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::ActivationSettingL( %d )", |
|
113 value ) |
|
114 return ( MusSettingsKeys::TActivation ) value; |
|
115 } |
|
116 |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 inline void MultimediaSharingSettings::SetActivationSettingL( |
|
123 MusSettingsKeys::TActivation aActivationSetting ) |
|
124 { |
|
125 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetActivationSettingL( %d )", |
|
126 ( TInt ) aActivationSetting ) |
|
127 SetPropertyValueL( MusSettingsKeys::KActivation, aActivationSetting ); |
|
128 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetActivationSettingL()" ) |
|
129 } |
|
130 |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 inline MusSettingsKeys::TOperatorVariant |
|
137 MultimediaSharingSettings::OperatorVariantSettingL() |
|
138 { |
|
139 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::OperatorVariantSettingL()" ) |
|
140 TInt value = GetPropertyValueL( MusSettingsKeys::KOperatorVariant ); |
|
141 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::OperatorVariantSettingL( %d )", |
|
142 value ) |
|
143 return ( MusSettingsKeys::TOperatorVariant ) value; |
|
144 } |
|
145 |
|
146 |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 inline void MultimediaSharingSettings::SetOperatorVariantSettingL( |
|
152 MusSettingsKeys::TOperatorVariant aVariantSetting ) |
|
153 { |
|
154 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetOperatorVariantSettingL( %d )", |
|
155 ( TInt ) aVariantSetting ) |
|
156 SetPropertyValueL( MusSettingsKeys::KOperatorVariant, ( TInt ) aVariantSetting ); |
|
157 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetOperatorVariantSettingL()" ) |
|
158 } |
|
159 |
|
160 |
|
161 // ----------------------------------------------------------------------------- |
|
162 // |
|
163 // ----------------------------------------------------------------------------- |
|
164 // |
|
165 inline MusSettingsKeys::TAuditoryNotification |
|
166 MultimediaSharingSettings::AuditoryNotificationSettingL() |
|
167 { |
|
168 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::AuditoryNotificationSettingL()" ) |
|
169 TInt value = GetPropertyValueL( MusSettingsKeys::KAuditoryNotification ); |
|
170 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::AuditoryNotificationSettingL( %d )", |
|
171 value ) |
|
172 return ( MusSettingsKeys::TAuditoryNotification ) value; |
|
173 } |
|
174 |
|
175 |
|
176 // ----------------------------------------------------------------------------- |
|
177 // |
|
178 // ----------------------------------------------------------------------------- |
|
179 // |
|
180 inline void MultimediaSharingSettings::SetAuditoryNotificationSettingL( |
|
181 MusSettingsKeys::TAuditoryNotification aNotificationSetting ) |
|
182 { |
|
183 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetAuditoryNotificationSettingL( %d )", |
|
184 ( TInt ) aNotificationSetting ) |
|
185 SetPropertyValueL( MusSettingsKeys::KAuditoryNotification, ( TInt ) aNotificationSetting ); |
|
186 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetAuditoryNotificationSettingL()" ) |
|
187 } |
|
188 |
|
189 |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 // ----------------------------------------------------------------------------- |
|
193 // |
|
194 inline MusSettingsKeys::TEdgeDtmSupport |
|
195 MultimediaSharingSettings::EdgeDtmSupportSettingL() |
|
196 { |
|
197 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::EdgeDtmSupportSettingL()" ) |
|
198 TInt value = GetPropertyValueL( MusSettingsKeys::KEdgeDtmSupport ); |
|
199 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::EdgeDtmSupportSettingL( %d )", |
|
200 value ) |
|
201 return ( MusSettingsKeys::TEdgeDtmSupport ) value; |
|
202 } |
|
203 |
|
204 |
|
205 // ----------------------------------------------------------------------------- |
|
206 // |
|
207 // ----------------------------------------------------------------------------- |
|
208 // |
|
209 inline void MultimediaSharingSettings::SetEdgeDtmSupportSettingL( |
|
210 MusSettingsKeys::TEdgeDtmSupport aSetting ) |
|
211 { |
|
212 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetEdgeDtmSupportSettingL( %d )", |
|
213 ( TInt ) aSetting ) |
|
214 SetPropertyValueL( MusSettingsKeys::KEdgeDtmSupport, ( TInt ) aSetting ); |
|
215 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetEdgeDtmSupportSettingL()" ) |
|
216 |
|
217 } |
|
218 |
|
219 |
|
220 // ----------------------------------------------------------------------------- |
|
221 // |
|
222 // ----------------------------------------------------------------------------- |
|
223 // |
|
224 inline MusSettingsKeys::TForceInternetSignaling |
|
225 MultimediaSharingSettings::ForceInternetSignalingSettingL() |
|
226 { |
|
227 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::ForceInternetSignalingSettingL()" ) |
|
228 TInt value = GetPropertyValueL( MusSettingsKeys::KForceInternetSignaling ); |
|
229 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::ForceInternetSignalingSettingL( %d )", |
|
230 value ) |
|
231 return ( MusSettingsKeys::TForceInternetSignaling ) value; |
|
232 } |
|
233 |
|
234 |
|
235 // ----------------------------------------------------------------------------- |
|
236 // |
|
237 // ----------------------------------------------------------------------------- |
|
238 // |
|
239 inline void MultimediaSharingSettings::SetForceInternetSignalingSettingL( |
|
240 MusSettingsKeys::TForceInternetSignaling aSetting ) |
|
241 { |
|
242 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetSessionSetupMethodSettingL( %d )", |
|
243 ( TInt ) aSetting ) |
|
244 SetPropertyValueL( MusSettingsKeys::KForceInternetSignaling, ( TInt ) aSetting ); |
|
245 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetSessionSetupMethodSettingL()" ) |
|
246 |
|
247 } |
|
248 |
|
249 |
|
250 // ----------------------------------------------------------------------------- |
|
251 // |
|
252 // ----------------------------------------------------------------------------- |
|
253 // |
|
254 inline MusSettingsKeys::TAutoRecord |
|
255 MultimediaSharingSettings::AutoRecordSettingL() |
|
256 { |
|
257 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::AutoRecordSettingL()" ) |
|
258 TInt value = GetPropertyValueL( MusSettingsKeys::KAutoRecord ); |
|
259 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::AutoRecordSettingL( %d )", |
|
260 value ) |
|
261 return ( MusSettingsKeys::TAutoRecord ) value; |
|
262 } |
|
263 |
|
264 |
|
265 // ----------------------------------------------------------------------------- |
|
266 // |
|
267 // ----------------------------------------------------------------------------- |
|
268 // |
|
269 inline void MultimediaSharingSettings::SetAutoRecordSettingL( |
|
270 MusSettingsKeys::TAutoRecord aSetting ) |
|
271 { |
|
272 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetActivationSettingL( %d )", |
|
273 ( TInt ) aSetting ) |
|
274 SetPropertyValueL( MusSettingsKeys::KAutoRecord, ( TInt ) aSetting ); |
|
275 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetActivationSettingL()" ) |
|
276 |
|
277 } |
|
278 |
|
279 |
|
280 // ----------------------------------------------------------------------------- |
|
281 // |
|
282 // ----------------------------------------------------------------------------- |
|
283 // |
|
284 inline TInt MultimediaSharingSettings::VideoLocationSettingL() |
|
285 { |
|
286 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::VideoLocationSettingL()" ) |
|
287 TInt value = GetPropertyValueL( MusSettingsKeys::KVideoLocation ); |
|
288 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::VideoLocationSettingL( %d )", |
|
289 value ) |
|
290 return value; |
|
291 } |
|
292 |
|
293 |
|
294 // ----------------------------------------------------------------------------- |
|
295 // |
|
296 // ----------------------------------------------------------------------------- |
|
297 // |
|
298 inline void MultimediaSharingSettings::SetVideoLocationSettingL( |
|
299 TInt aSetting ) |
|
300 { |
|
301 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetVideoLocationSettingL( %d )", |
|
302 ( TInt ) aSetting ) |
|
303 SetPropertyValueL( MusSettingsKeys::KVideoLocation, ( TInt ) aSetting ); |
|
304 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetVideoLocationSettingL()" ) |
|
305 |
|
306 } |
|
307 |
|
308 |
|
309 // ----------------------------------------------------------------------------- |
|
310 // |
|
311 // ----------------------------------------------------------------------------- |
|
312 // |
|
313 inline TInt MultimediaSharingSettings::SipProfileSettingL() |
|
314 { |
|
315 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::SipProfileSettingL()" ) |
|
316 TInt value = GetPropertyValueL( MusSettingsKeys::KSipProfileId ); |
|
317 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::SipProfileSettingL( %d )", |
|
318 value ) |
|
319 return value; |
|
320 } |
|
321 |
|
322 |
|
323 // ----------------------------------------------------------------------------- |
|
324 // |
|
325 // ----------------------------------------------------------------------------- |
|
326 // |
|
327 inline void MultimediaSharingSettings::SetSipProfileSettingL( TInt aSetting ) |
|
328 { |
|
329 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetSipProfileSettingL( %d )", |
|
330 ( TInt ) aSetting ) |
|
331 |
|
332 TInt oldProfileId = GetPropertyValueL( MusSettingsKeys::KSipProfileId ); |
|
333 |
|
334 if( oldProfileId != KErrNotFound && oldProfileId != KErrNone ) |
|
335 { |
|
336 MusSipProfileUtils::RemoveContactHeaderL( oldProfileId ); |
|
337 } |
|
338 |
|
339 SetPropertyValueL( MusSettingsKeys::KSipProfileId, ( TInt ) aSetting ); |
|
340 |
|
341 MusSipProfileUtils::InsertContactHeaderL( aSetting ); |
|
342 |
|
343 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetSipProfileSettingL()" ) |
|
344 } |
|
345 |
|
346 |
|
347 // ----------------------------------------------------------------------------- |
|
348 // |
|
349 // ----------------------------------------------------------------------------- |
|
350 // |
|
351 inline MusSettingsKeys::TUiOrientation |
|
352 MultimediaSharingSettings::UiOrientationSettingL() |
|
353 { |
|
354 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::UiOrientationSettingL()" ) |
|
355 TInt value = GetPropertyValueL( MusSettingsKeys::KUiOrientation ); |
|
356 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::UiOrientationSettingL( %d )", |
|
357 value ) |
|
358 return ( MusSettingsKeys::TUiOrientation ) value; |
|
359 } |
|
360 |
|
361 |
|
362 // ----------------------------------------------------------------------------- |
|
363 // |
|
364 // ----------------------------------------------------------------------------- |
|
365 // |
|
366 inline void MultimediaSharingSettings::SetUiOrientationSettingL( |
|
367 MusSettingsKeys::TUiOrientation aOrientationSetting ) |
|
368 { |
|
369 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetActivationSettingL( %d )", |
|
370 ( TInt ) aOrientationSetting ) |
|
371 SetPropertyValueL( MusSettingsKeys::KUiOrientation, |
|
372 ( TInt ) aOrientationSetting ); |
|
373 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetActivationSettingL()" ) |
|
374 } |
|
375 |
|
376 |
|
377 // ----------------------------------------------------------------------------- |
|
378 // |
|
379 // ----------------------------------------------------------------------------- |
|
380 // |
|
381 inline MusSettingsKeys::TCapabilityQuery |
|
382 MultimediaSharingSettings::CapabilityQuerySettingL() |
|
383 { |
|
384 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::CapabilityQuerySettingL()" ) |
|
385 TInt value = GetPropertyValueL( MusSettingsKeys::KCapabilityQuery ); |
|
386 MUS_LOG1( "mus: [MUSSET] <- MultimediaSharingSettings::CapabilityQuerySettingL( %d )", |
|
387 value ) |
|
388 return ( MusSettingsKeys::TCapabilityQuery ) value; |
|
389 } |
|
390 |
|
391 |
|
392 // ----------------------------------------------------------------------------- |
|
393 // |
|
394 // ----------------------------------------------------------------------------- |
|
395 // |
|
396 inline void MultimediaSharingSettings::SetCapabilityQuerySettingL( |
|
397 MusSettingsKeys::TCapabilityQuery aOrientationSetting ) |
|
398 { |
|
399 MUS_LOG1( "mus: [MUSSET] -> MultimediaSharingSettings::SetActivationSettingL( %d )", |
|
400 ( TInt ) aOrientationSetting ) |
|
401 SetPropertyValueL( MusSettingsKeys::KCapabilityQuery, |
|
402 ( TInt ) aOrientationSetting ); |
|
403 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetActivationSettingL()" ) |
|
404 } |
|
405 |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // |
|
409 // ----------------------------------------------------------------------------- |
|
410 // |
|
411 inline void MultimediaSharingSettings::ResourceAvailability( |
|
412 MusSettingsKeys::TAvailability &aCamera, |
|
413 MusSettingsKeys::TAvailability &aKeypad) |
|
414 { |
|
415 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::ResourceAvailability()" ) |
|
416 TInt value = GetPropertyValueL( MusSettingsKeys::KProductModeVariation ); |
|
417 // count 3 bit ,bit->100 = 4 (int) for camera |
|
418 aCamera = (value&4) ? MusSettingsKeys::EAvailabilityDynamic |
|
419 : MusSettingsKeys::EAvailabilityStatic; |
|
420 // count 6 bit ,bit->100000 = 32 (int) for keypad |
|
421 aKeypad = (value&32) ? MusSettingsKeys::EAvailabilityDynamic |
|
422 : MusSettingsKeys::EAvailabilityStatic; |
|
423 |
|
424 MUS_LOG2( "mus: [MUSSET] <- MultimediaSharingSettings::ResourceAvailability \ |
|
425 Camera = %d, Keypad = %d", aCamera,aKeypad) |
|
426 } |
|
427 |
|
428 // ----------------------------------------------------------------------------- |
|
429 // |
|
430 // ----------------------------------------------------------------------------- |
|
431 // |
|
432 inline void MultimediaSharingSettings::ResourceUsability( |
|
433 MusSettingsKeys::TUsability &aCamera, |
|
434 MusSettingsKeys::TUsability &aKeypad, |
|
435 MusSettingsKeys::TUsability &aVideoplayer) |
|
436 { |
|
437 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::ResourceUsability()" ) |
|
438 TInt value = GetPropertyValueL( MusSettingsKeys::KProductModeVariation ); |
|
439 MUS_LOG1( "mus: [MUSSET] product mode variation cenrep Key value = %d",value ) |
|
440 // Mask bit 1&2 with 11=3 |
|
441 TInt tempValue = value&3 ; |
|
442 aCamera = (tempValue < 3) ? ( MusSettingsKeys::TUsability )tempValue |
|
443 : MusSettingsKeys::EUsabilityAlways; |
|
444 |
|
445 // Left shift 3 bits and mask bit 1&2 with 11=3 so we get bits for keypad |
|
446 value = value >> 3; |
|
447 tempValue = value&3 ; |
|
448 aKeypad = ( tempValue < 3 ) ? ( MusSettingsKeys::TUsability ) tempValue |
|
449 : MusSettingsKeys::EUsabilityAlways; |
|
450 |
|
451 // Left shift again 3 bits mask bit 1&2 with 11=3,so we get bits for videoplayer |
|
452 value = value >> 3; |
|
453 tempValue = value&3 ; |
|
454 aVideoplayer = ( tempValue < 3 ) ? ( MusSettingsKeys::TUsability )tempValue |
|
455 : MusSettingsKeys::EUsabilityAlways; |
|
456 |
|
457 MUS_LOG3( "mus: [MUSSET] Camera = %d, Keypad = %d,Videoplayer = %d",\ |
|
458 aCamera,aKeypad,aVideoplayer ) |
|
459 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::ResourceUsability()" ) |
|
460 } |
|
461 |
|
462 |
|
463 // ----------------------------------------------------------------------------- |
|
464 // |
|
465 // ----------------------------------------------------------------------------- |
|
466 // |
|
467 inline HBufC8* MultimediaSharingSettings::EncoderConfigInfoLC() |
|
468 { |
|
469 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::EncoderConfigInfoLC()" ) |
|
470 |
|
471 TBuf8<NCentralRepositoryConstants::KMaxBinaryLength> keys; |
|
472 |
|
473 CRepository* repository = CRepository::NewLC( |
|
474 MusSettingsKeys::KRepositoryUid ); |
|
475 |
|
476 User::LeaveIfError( repository->Get( |
|
477 MusSettingsKeys::KEncoderConfigurationInfo, |
|
478 keys ) ); |
|
479 |
|
480 CleanupStack::PopAndDestroy( repository ); |
|
481 |
|
482 MUS_LOG_TDESC8( "mus: [MUSSET] Keys: ", keys ) |
|
483 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::EncoderConfigInfoLC()" ) |
|
484 |
|
485 return keys.AllocLC(); |
|
486 } |
|
487 |
|
488 |
|
489 // ----------------------------------------------------------------------------- |
|
490 // |
|
491 // ----------------------------------------------------------------------------- |
|
492 // |
|
493 inline void MultimediaSharingSettings::SetEncoderConfigInfoL( |
|
494 const TDesC8& aConfigKeys ) |
|
495 { |
|
496 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::SetEncoderConfigInfoL()" ) |
|
497 |
|
498 CRepository* repository = CRepository::NewLC( |
|
499 MusSettingsKeys::KRepositoryUid ); |
|
500 |
|
501 User::LeaveIfError( repository->Set( |
|
502 MusSettingsKeys::KEncoderConfigurationInfo, |
|
503 aConfigKeys ) ); |
|
504 |
|
505 CleanupStack::PopAndDestroy( repository ); |
|
506 |
|
507 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::SetEncoderConfigInfoL()" ) |
|
508 } |
|
509 |
|
510 |
|
511 // ----------------------------------------------------------------------------- |
|
512 // |
|
513 // ----------------------------------------------------------------------------- |
|
514 // |
|
515 inline TUid MultimediaSharingSettings::EncodingDeviceL() |
|
516 { |
|
517 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::EncodingDeviceL()" ) |
|
518 |
|
519 TInt value = GetPropertyValueL( MusSettingsKeys::KEncodingDevice ); |
|
520 |
|
521 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::EncodingDeviceL()") |
|
522 |
|
523 return TUid::Uid( value ); |
|
524 } |
|
525 |
|
526 // ----------------------------------------------------------------------------- |
|
527 // |
|
528 // ----------------------------------------------------------------------------- |
|
529 // |
|
530 inline TBool MultimediaSharingSettings::IsAvcDisabled() |
|
531 { |
|
532 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::IsAvcDisabled()" ) |
|
533 TInt value = 0; |
|
534 TRAPD(err, value =GetPropertyValueL( MusSettingsKeys::KEncodingDevice )); |
|
535 if( err==KErrNone && value == KMusDisableAVC ) |
|
536 { |
|
537 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::IsAvcDisabled() true") |
|
538 return ETrue; |
|
539 } |
|
540 MUS_LOG( "mus: [MUSSET] <- MultimediaSharingSettings::IsAvcDisabled() false") |
|
541 return EFalse; |
|
542 } |
|
543 |
|
544 // ----------------------------------------------------------------------------- |
|
545 // |
|
546 // ----------------------------------------------------------------------------- |
|
547 // |
|
548 inline TBool MultimediaSharingSettings::PrivacySetting() |
|
549 { |
|
550 MUS_LOG( "mus: [MUSSET] -> MultimediaSharingSettings::PrivacySetting()" ) |
|
551 |
|
552 TInt value(0); |
|
553 TRAPD( err, value = GetPropertyValueL( MusSettingsKeys::KPrivacyExchange ) ); |
|
554 MUS_LOG2( "mus: [MUSSET] <- MultimediaSharingSettings::PrivacySetting() err=%d value=%d", |
|
555 err, value ) |
|
556 return ( err == KErrNone && value == MusSettingsKeys::EPrivacy ); |
|
557 } |
|
558 #endif // MUSSETTINGS_INL |