2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 namespace Tizen.System
22 /// The System Settings API provides APIs for sharing the configuration over a system.
25 /// The System Settings API provides functions for getting the system configuration related to user preferences.
26 /// The main features of the System Settings API include accessing system-wide configurations, such as ringtones, wallpapers, and so on.
28 /// <since_tizen> 3 </since_tizen>
29 public static class SystemSettings
32 /// The file path of the current ringtone.
34 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
35 /// <privlevel>platform</privlevel>
36 /// <feature>http://tizen.org/feature/systemsetting</feature>
37 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
38 /// <exception cref="ArgumentException">Invalid Argument</exception>
39 /// <exception cref="NotSupportedException">Not Supported feature</exception>
40 /// <exception cref="InvalidOperationException">Invalid operation</exception>
41 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
42 /// <since_tizen> 3 </since_tizen>
43 public static string IncomingCallRingtone
48 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.IncomingCallRingtone, out filePath);
49 if (res != SystemSettingsError.None)
51 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get IncomingCallRingtone system setting.");
57 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.IncomingCallRingtone, value);
58 if (res != SystemSettingsError.None)
60 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set IncomingCallRingtone system setting.");
66 /// The file path of the current home-screen wallpaper.
68 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
69 /// <privlevel>platform</privlevel>
70 /// <feature>http://tizen.org/feature/systemsetting</feature>
71 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
72 /// <exception cref="ArgumentException">Invalid Argument</exception>
73 /// <exception cref="NotSupportedException">Not Supported feature</exception>
74 /// <exception cref="InvalidOperationException">Invalid operation</exception>
75 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
76 /// <since_tizen> 3 </since_tizen>
77 public static string WallpaperHomeScreen
82 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperHomeScreen, out filePath);
83 if (res != SystemSettingsError.None)
85 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperHomeScreen system setting.");
91 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperHomeScreen, value);
92 if (res != SystemSettingsError.None)
94 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperHomeScreen system setting.");
100 /// The file path of the current lock-screen wallpaper.
102 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
103 /// <privlevel>platform</privlevel>
104 /// <feature>http://tizen.org/feature/systemsetting</feature>
105 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
106 /// <exception cref="ArgumentException">Invalid Argument</exception>
107 /// <exception cref="NotSupportedException">Not Supported feature</exception>
108 /// <exception cref="InvalidOperationException">Invalid operation</exception>
109 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
110 /// <since_tizen> 3 </since_tizen>
111 public static string WallpaperLockScreen
116 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperLockScreen, out filePath);
117 if (res != SystemSettingsError.None)
119 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperLockScreen system setting.");
125 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperLockScreen, value);
126 if (res != SystemSettingsError.None)
128 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperLockScreen system setting.");
134 /// The current system font size.
136 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
137 /// <privlevel>platform</privlevel>
138 /// <feature>http://tizen.org/feature/systemsetting</feature>
139 /// <exception cref="ArgumentException">Invalid Argument</exception>
140 /// <exception cref="NotSupportedException">Not Supported feature</exception>
141 /// <exception cref="InvalidOperationException">Invalid operation</exception>
142 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
143 /// <since_tizen> 3 </since_tizen>
144 public static SystemSettingsFontSize FontSize
149 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.FontSize, out fontSize);
150 if (res != SystemSettingsError.None)
152 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontSize system setting.");
154 return (SystemSettingsFontSize)fontSize;
158 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.FontSize, (int)value);
159 if (res != SystemSettingsError.None)
161 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontSize system setting.");
167 /// The current system font type.
169 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
170 /// <privlevel>platform</privlevel>
171 /// <feature>http://tizen.org/feature/systemsetting</feature>
172 /// <exception cref="ArgumentException">Invalid Argument</exception>
173 /// <exception cref="NotSupportedException">Not Supported feature</exception>
174 /// <exception cref="InvalidOperationException">Invalid operation</exception>
175 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
176 /// <since_tizen> 3 </since_tizen>
177 public static string FontType
182 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.FontType, out fontType);
183 if (res != SystemSettingsError.None)
185 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontType system setting.");
191 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.FontType, value);
192 if (res != SystemSettingsError.None)
194 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontType system setting.");
200 /// Indicates whether the motion service is activated.
202 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
203 /// <privlevel>platform</privlevel>
204 /// <feature>http://tizen.org/feature/systemsetting</feature>
205 /// <exception cref="ArgumentException">Invalid Argument</exception>
206 /// <exception cref="NotSupportedException">Not Supported feature</exception>
207 /// <exception cref="InvalidOperationException">Invalid operation</exception>
208 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
209 /// <since_tizen> 3 </since_tizen>
210 public static bool MotionActivationEnabled
214 bool isMotionServiceActivated;
215 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated);
216 if (res != SystemSettingsError.None)
218 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionActivation system setting.");
220 return isMotionServiceActivated;
224 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivationEnabled, value);
225 if (res != SystemSettingsError.None)
227 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set MotionActivation system setting.");
233 /// The file path of the current email alert ringtone.
235 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
236 /// <privlevel>platform</privlevel>
237 /// <feature>http://tizen.org/feature/systemsetting</feature>
238 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
239 /// <exception cref="ArgumentException">Invalid Argument</exception>
240 /// <exception cref="NotSupportedException">Not Supported feature</exception>
241 /// <exception cref="InvalidOperationException">Invalid operation</exception>
242 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
243 /// <since_tizen> 3 </since_tizen>
244 public static string EmailAlertRingtone
249 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.EmailAlertRingtone, out filePath);
250 if (res != SystemSettingsError.None)
252 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get EmailAlertRingtone system setting.");
258 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.EmailAlertRingtone, value);
259 if (res != SystemSettingsError.None)
261 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set EmailAlertRingtone system setting.");
266 /// Indicates whether the USB debugging is enabled.
268 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
269 /// <privlevel>platform</privlevel>
270 /// <feature>http://tizen.org/feature/systemsetting</feature>
271 /// <exception cref="ArgumentException">Invalid Argument</exception>
272 /// <exception cref="NotSupportedException">Not Supported feature</exception>
273 /// <exception cref="InvalidOperationException">Invalid operation</exception>
274 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
275 /// <since_tizen> 3 </since_tizen>
276 public static bool UsbDebuggingEnabled
280 bool isusbDebuggingEnabled;
281 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, out isusbDebuggingEnabled);
282 if (res != SystemSettingsError.None)
284 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UsbDebuggingEnabled system setting.");
286 return isusbDebuggingEnabled;
290 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, value);
291 if (res != SystemSettingsError.None)
293 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set UsbDebuggingEnabled system setting.");
299 /// Indicates whether the 3G data network is enabled.
301 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
302 /// <privlevel>platform</privlevel>
303 /// <feature>http://tizen.org/feature/systemsetting</feature>
304 /// <exception cref="ArgumentException">Invalid Argument</exception>
305 /// <exception cref="NotSupportedException">Not Supported feature</exception>
306 /// <exception cref="InvalidOperationException">Invalid operation</exception>
307 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
308 /// <since_tizen> 3 </since_tizen>
309 public static bool Data3GNetworkEnabled
313 bool is3GDataEnabled;
314 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, out is3GDataEnabled);
315 if (res != SystemSettingsError.None)
317 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Data3GNetworkEnabled system setting.");
319 return is3GDataEnabled;
323 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, value);
324 if (res != SystemSettingsError.None)
326 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set Data3GNetworkEnabled system setting.");
332 /// Indicates the lock-screen application package name.
334 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
335 /// <privlevel>platform</privlevel>
336 /// <feature>http://tizen.org/feature/systemsetting</feature>
337 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
338 /// <exception cref="ArgumentException">Invalid Argument</exception>
339 /// <exception cref="NotSupportedException">Not Supported feature</exception>
340 /// <exception cref="InvalidOperationException">Invalid operation</exception>
341 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
342 /// <since_tizen> 4 </since_tizen>
343 public static string LockScreenApp
348 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LockScreenApp, out pkgName);
349 if (res != SystemSettingsError.None)
351 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockScreenApp system setting.");
357 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LockScreenApp, value);
358 if (res != SystemSettingsError.None)
360 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockScreenApp system setting.");
366 /// The current system default font type (only supports Get).
368 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
369 /// <privlevel>platform</privlevel>
370 /// <feature>http://tizen.org/feature/systemsetting</feature>
371 /// <exception cref="ArgumentException">Invalid Argument</exception>
372 /// <exception cref="NotSupportedException">Not Supported feature</exception>
373 /// <exception cref="InvalidOperationException">Invalid operation</exception>
374 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
375 /// <since_tizen> 3 </since_tizen>
376 public static string DefaultFontType
380 string defaultFontType;
381 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DefaultFontType, out defaultFontType);
382 if (res != SystemSettingsError.None)
384 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DefaultFontType system setting value.");
386 return defaultFontType;
391 /// Indicates the current country setting in the <LANGUAGE>_<REGION> syntax.
392 /// The country setting is in the ISO 639-2 format,
393 /// and the region setting is in the ISO 3166-1 alpha-2 format.
395 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
396 /// <privlevel>platform</privlevel>
397 /// <feature>http://tizen.org/feature/systemsetting</feature>
398 /// <exception cref="ArgumentException">Invalid Argument</exception>
399 /// <exception cref="NotSupportedException">Not Supported feature</exception>
400 /// <exception cref="InvalidOperationException">Invalid operation</exception>
401 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
402 /// <since_tizen> 3 </since_tizen>
403 public static string LocaleCountry
407 string countrySetting;
408 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleCountry, out countrySetting);
409 if (res != SystemSettingsError.None)
411 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleCountry system setting.");
413 return countrySetting;
417 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleCountry, value);
418 if (res != SystemSettingsError.None)
420 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleCountry system setting.");
426 /// Indicates the current language setting in the <LANGUAGE>_<REGION> syntax.
427 /// The language setting is in the ISO 639-2 format,
428 /// and the region setting is in the ISO 3166-1 alpha-2 format.
430 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
431 /// <privlevel>platform</privlevel>
432 /// <feature>http://tizen.org/feature/systemsetting</feature>
433 /// <exception cref="ArgumentException">Invalid Argument</exception>
434 /// <exception cref="NotSupportedException">Not Supported feature</exception>
435 /// <exception cref="InvalidOperationException">Invalid operation</exception>
436 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
437 /// <since_tizen> 3 </since_tizen>
438 public static string LocaleLanguage
442 string languageSetting;
443 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleLanguage, out languageSetting);
444 if (res != SystemSettingsError.None)
446 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleLanguage system setting.");
448 return languageSetting;
452 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleLanguage, value);
453 if (res != SystemSettingsError.None)
455 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleLanguage system setting.");
461 /// Indicates whether the 24-hour clock is used.
462 /// If the value is false, the 12-hour clock is used.
464 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
465 /// <privlevel>platform</privlevel>
466 /// <feature>http://tizen.org/feature/systemsetting</feature>
467 /// <exception cref="ArgumentException">Invalid Argument</exception>
468 /// <exception cref="NotSupportedException">Not Supported feature</exception>
469 /// <exception cref="InvalidOperationException">Invalid operation</exception>
470 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
471 /// <since_tizen> 3 </since_tizen>
472 public static bool LocaleTimeFormat24HourEnabled
477 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat);
478 if (res != SystemSettingsError.None)
480 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeFormat24Hour system setting.");
486 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, value);
487 if (res != SystemSettingsError.None)
489 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeFormat24Hour system setting.");
495 /// Indicates the current time zone, for example, Pacific/Tahiti.
497 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
498 /// <privlevel>platform</privlevel>
499 /// <feature>http://tizen.org/feature/systemsetting</feature>
500 /// <exception cref="ArgumentException">Invalid Argument</exception>
501 /// <exception cref="NotSupportedException">Not Supported feature</exception>
502 /// <exception cref="InvalidOperationException">Invalid operation</exception>
503 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
504 /// <since_tizen> 3 </since_tizen>
505 public static string LocaleTimeZone
510 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone);
511 if (res != SystemSettingsError.None)
513 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeZone system setting.");
519 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimeZone, value);
520 if (res != SystemSettingsError.None)
522 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeZone system setting.");
528 /// Once the system changes time, this event occurs to notify the time change.
530 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
531 /// <privlevel>platform</privlevel>
532 /// <feature>http://tizen.org/feature/systemsetting</feature>
533 /// <exception cref="ArgumentException">Invalid Argument</exception>
534 /// <exception cref="NotSupportedException">Not Supported feature</exception>
535 /// <exception cref="InvalidOperationException">Invalid operation</exception>
536 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
537 /// <since_tizen> 3 </since_tizen>
538 public static int Time
543 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time);
544 if (res != SystemSettingsError.None)
546 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting.");
552 /// Indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound.
554 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
555 /// <privlevel>platform</privlevel>
556 /// <feature>http://tizen.org/feature/systemsetting</feature>
557 /// <exception cref="ArgumentException">Invalid Argument</exception>
558 /// <exception cref="NotSupportedException">Not Supported feature</exception>
559 /// <exception cref="InvalidOperationException">Invalid operation</exception>
560 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
561 /// <since_tizen> 3 </since_tizen>
562 public static bool SoundLockEnabled
566 bool isSoundLockEnabled;
567 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled);
568 if (res != SystemSettingsError.None)
570 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundLock system setting.");
572 return isSoundLockEnabled;
577 /// Indicates whether the device is in the silent mode.
579 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
580 /// <privlevel>platform</privlevel>
581 /// <feature>http://tizen.org/feature/systemsetting</feature>
582 /// <exception cref="ArgumentException">Invalid Argument</exception>
583 /// <exception cref="NotSupportedException">Not Supported feature</exception>
584 /// <exception cref="InvalidOperationException">Invalid operation</exception>
585 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
586 /// <since_tizen> 3 </since_tizen>
587 public static bool SoundSilentModeEnabled
592 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent);
593 if (res != SystemSettingsError.None)
595 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundSilentMode system setting.");
602 /// Indicates whether the screen touch sound is enabled on the device.
604 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
605 /// <privlevel>platform</privlevel>
606 /// <feature>http://tizen.org/feature/systemsetting</feature>
607 /// <exception cref="ArgumentException">Invalid Argument</exception>
608 /// <exception cref="NotSupportedException">Not Supported feature</exception>
609 /// <exception cref="InvalidOperationException">Invalid operation</exception>
610 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
611 /// <since_tizen> 3 </since_tizen>
612 public static bool SoundTouchEnabled
616 bool isTouchSoundEnabled;
617 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled);
618 if (res != SystemSettingsError.None)
620 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundTouch system setting value.");
622 return isTouchSoundEnabled;
627 /// Indicates whether the rotation control is automatic.
629 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
630 /// <privlevel>platform</privlevel>
631 /// <feature>http://tizen.org/feature/systemsetting</feature>
632 /// <exception cref="ArgumentException">Invalid Argument</exception>
633 /// <exception cref="NotSupportedException">Not Supported feature</exception>
634 /// <exception cref="InvalidOperationException">Invalid operation</exception>
635 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
636 /// <since_tizen> 3 </since_tizen>
637 public static bool DisplayScreenRotationAutoEnabled
641 bool isRotationAutomatic;
642 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic);
643 if (res != SystemSettingsError.None)
645 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DisplayScreenRotationAuto system setting.");
647 return isRotationAutomatic;
652 /// Indicates the device name.
654 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
655 /// <privlevel>platform</privlevel>
656 /// <feature>http://tizen.org/feature/systemsetting</feature>
657 /// <exception cref="ArgumentException">Invalid Argument</exception>
658 /// <exception cref="NotSupportedException">Not Supported feature</exception>
659 /// <exception cref="InvalidOperationException">Invalid operation</exception>
660 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
661 /// <since_tizen> 3 </since_tizen>
662 public static string DeviceName
667 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DeviceName, out deviceName);
668 if (res != SystemSettingsError.None)
670 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DeviceName system setting value.");
676 /// Indicates whether the device user has enabled the motion feature.
678 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
679 /// <privlevel>platform</privlevel>
680 /// <feature>http://tizen.org/feature/systemsetting</feature>
681 /// <exception cref="ArgumentException">Invalid Argument</exception>
682 /// <exception cref="NotSupportedException">Not Supported feature</exception>
683 /// <exception cref="InvalidOperationException">Invalid operation</exception>
684 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
685 /// <since_tizen> 3 </since_tizen>
686 public static bool MotionEnabled
690 bool isMotionEnabled;
691 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionEnabled, out isMotionEnabled);
692 if (res != SystemSettingsError.None)
694 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionEnabled system setting value.");
696 return isMotionEnabled;
701 /// Indicates whether Wi-Fi related notifications are enabled on the device.
703 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
704 /// <privlevel>platform</privlevel>
705 /// <feature>http://tizen.org/feature/systemsetting</feature>
706 /// <feature>http://tizen.org/feature/network.wifi</feature>
707 /// <exception cref="ArgumentException">Invalid Argument</exception>
708 /// <exception cref="NotSupportedException">Not Supported feature</exception>
709 /// <exception cref="InvalidOperationException">Invalid operation</exception>
710 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
711 /// <since_tizen> 3 </since_tizen>
712 public static bool NetworkWifiNotificationEnabled
716 bool isWifiNotificationEnabled;
717 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled);
718 if (res != SystemSettingsError.None)
720 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkWifiNotification system setting.");
722 return isWifiNotificationEnabled;
727 /// Indicates whether the device is in the flight mode.
729 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
730 /// <privlevel>platform</privlevel>
731 /// <feature>http://tizen.org/feature/systemsetting</feature>
732 /// <exception cref="ArgumentException">Invalid Argument</exception>
733 /// <exception cref="NotSupportedException">Not Supported feature</exception>
734 /// <exception cref="InvalidOperationException">Invalid operation</exception>
735 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
736 /// <since_tizen> 3 </since_tizen>
737 public static bool NetworkFlightModeEnabled
741 bool isFlightModeEnabled;
742 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled);
743 if (res != SystemSettingsError.None)
745 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkFlightMode system setting.");
747 return isFlightModeEnabled;
752 /// Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600.
754 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
755 /// <privlevel>platform</privlevel>
756 /// <feature>http://tizen.org/feature/systemsetting</feature>
757 /// <exception cref="ArgumentException">Invalid Argument</exception>
758 /// <exception cref="NotSupportedException">Not Supported feature</exception>
759 /// <exception cref="InvalidOperationException">Invalid operation</exception>
760 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
761 /// <since_tizen> 3 </since_tizen>
762 public static int ScreenBacklightTime
767 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.ScreenBacklightTime, out backlightTime);
768 if (res != SystemSettingsError.None)
770 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get ScreenBacklightTime system setting.");
772 return backlightTime;
776 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.ScreenBacklightTime, value);
777 if (res != SystemSettingsError.None)
779 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set ScreenBacklightTime system setting.");
785 /// Indicates the file path of the current notification tone set by the user.
787 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
788 /// <privlevel>platform</privlevel>
789 /// <feature>http://tizen.org/feature/systemsetting</feature>
790 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
791 /// <exception cref="ArgumentException">Invalid Argument</exception>
792 /// <exception cref="NotSupportedException">Not Supported feature</exception>
793 /// <exception cref="InvalidOperationException">Invalid operation</exception>
794 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
795 /// <since_tizen> 3 </since_tizen>
796 public static string SoundNotification
801 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.SoundNotification, out filePath);
802 if (res != SystemSettingsError.None)
804 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotification system setting.");
810 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.SoundNotification, value);
811 if (res != SystemSettingsError.None)
813 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotification system setting.");
819 /// Indicates the time period for notification repetitions.
821 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
822 /// <privlevel>platform</privlevel>
823 /// <feature>http://tizen.org/feature/systemsetting</feature>
824 /// <exception cref="ArgumentException">Invalid Argument</exception>
825 /// <exception cref="NotSupportedException">Not Supported feature</exception>
826 /// <exception cref="InvalidOperationException">Invalid operation</exception>
827 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
828 /// <since_tizen> 3 </since_tizen>
829 public static int SoundNotificationRepetitionPeriod
833 int notificationRepetitionPeriod;
834 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, out notificationRepetitionPeriod);
835 if (res != SystemSettingsError.None)
837 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotificationRepetitionPeriod system setting.");
839 return notificationRepetitionPeriod;
843 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, value);
844 if (res != SystemSettingsError.None)
846 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotificationRepetitionPeriod system setting.");
852 /// Indicates the current lock state.
854 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
855 /// <privlevel>platform</privlevel>
856 /// <feature>http://tizen.org/feature/systemsetting</feature>
857 /// <exception cref="ArgumentException">Invalid Argument</exception>
858 /// <exception cref="NotSupportedException">Not Supported feature</exception>
859 /// <exception cref="InvalidOperationException">Invalid operation</exception>
860 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
861 /// <since_tizen> 3 </since_tizen>
862 public static SystemSettingsIdleLockState LockState
867 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.LockState, out LockState);
868 if (res != SystemSettingsError.None)
870 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockState system setting.");
872 return (SystemSettingsIdleLockState)LockState;
876 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.LockState, (int)value);
877 if (res != SystemSettingsError.None)
879 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockState system setting.");
885 /// The current system ADS ID.
887 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
888 /// <privlevel>platform</privlevel>
889 /// <feature>http://tizen.org/feature/systemsetting</feature>
890 /// <exception cref="ArgumentException">Invalid Argument</exception>
891 /// <exception cref="NotSupportedException">Not Supported feature</exception>
892 /// <exception cref="InvalidOperationException">Invalid operation</exception>
893 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
894 /// <since_tizen> 3 </since_tizen>
895 public static string AdsId
900 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId);
901 if (res != SystemSettingsError.None)
903 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AdsId system setting.");
909 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.AdsId, value);
910 if (res != SystemSettingsError.None)
912 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AdsId system setting.");
919 /// Indicates the time period for notification repetitions.
921 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
922 /// <privlevel>platform</privlevel>
923 /// <feature>http://tizen.org/feature/systemsetting</feature>
924 /// <feature>http://tizen.org/feature/network.telephony</feature>
925 /// <exception cref="ArgumentException">Invalid Argument</exception>
926 /// <exception cref="NotSupportedException">Not Supported feature</exception>
927 /// <exception cref="InvalidOperationException">Invalid operation</exception>
928 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
929 /// <since_tizen> 3 </since_tizen>
930 public static SystemSettingsUdsState UltraDataSave
935 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave);
936 if (res != SystemSettingsError.None)
938 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UltraDataSave system setting.");
940 return (SystemSettingsUdsState)UltraDataSave;
945 /// Indicates whether the accessibility TTS is enabled on the device.
947 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
948 /// <privlevel>platform</privlevel>
949 /// <feature>http://tizen.org/feature/systemsetting</feature>
950 /// <exception cref="ArgumentException">Invalid Argument</exception>
951 /// <exception cref="NotSupportedException">Not Supported feature</exception>
952 /// <exception cref="InvalidOperationException">Invalid operation</exception>
953 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
954 /// <since_tizen> 4 </since_tizen>
955 public static bool AccessibilityTtsEnabled
959 bool isAccessibilityTTSEnabled;
960 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, out isAccessibilityTTSEnabled);
961 if (res != SystemSettingsError.None)
963 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AccessibilityTTS system setting value.");
965 return isAccessibilityTTSEnabled;
970 private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
972 string path = SystemSettings.IncomingCallRingtone;
973 IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
974 s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
976 private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
978 /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
980 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
981 /// <privlevel>platform</privlevel>
982 /// <feature>http://tizen.org/feature/systemsetting</feature>
983 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
984 /// <exception cref="ArgumentException">Invalid Argument</exception>
985 /// <exception cref="NotSupportedException">Not Supported feature</exception>
986 /// <exception cref="InvalidOperationException">Invalid operation</exception>
987 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
988 /// <since_tizen> 3 </since_tizen>
989 public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
993 if (s_incomingCallRingtoneChanged == null)
995 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
996 if (ret != SystemSettingsError.None)
998 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1001 s_incomingCallRingtoneChanged += value;
1006 s_incomingCallRingtoneChanged -= value;
1007 if (s_incomingCallRingtoneChanged == null)
1009 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone);
1010 if (ret != SystemSettingsError.None)
1012 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1018 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1020 string path = SystemSettings.WallpaperHomeScreen;
1021 WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1022 s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1024 private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1026 /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1028 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1029 /// <privlevel>platform</privlevel>
1030 /// <feature>http://tizen.org/feature/systemsetting</feature>
1031 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1032 /// <exception cref="ArgumentException">Invalid Argument</exception>
1033 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1034 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1035 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1036 /// <since_tizen> 3 </since_tizen>
1037 public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1041 if (s_wallpaperHomeScreenChanged == null)
1043 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1044 if (ret != SystemSettingsError.None)
1046 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1049 s_wallpaperHomeScreenChanged += value;
1054 s_wallpaperHomeScreenChanged -= value;
1055 if (s_wallpaperHomeScreenChanged == null)
1057 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen);
1058 if (ret != SystemSettingsError.None)
1060 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1066 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1068 string path = SystemSettings.WallpaperLockScreen;
1069 WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1070 s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1072 private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1074 /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1076 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1077 /// <privlevel>platform</privlevel>
1078 /// <feature>http://tizen.org/feature/systemsetting</feature>
1079 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1080 /// <exception cref="ArgumentException">Invalid Argument</exception>
1081 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1082 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1083 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1084 /// <since_tizen> 3 </since_tizen>
1085 public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1089 if (s_wallpaperLockScreenChanged == null)
1091 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1092 if (ret != SystemSettingsError.None)
1094 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1097 s_wallpaperLockScreenChanged += value;
1102 s_wallpaperLockScreenChanged -= value;
1103 if (s_wallpaperLockScreenChanged == null)
1105 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen);
1106 if (ret != SystemSettingsError.None)
1108 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1114 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1116 SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1117 FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1118 s_fontSizeChanged?.Invoke(null, eventArgs);
1120 private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1122 /// The FontSizeChanged event is triggered when the current system font size is changed.
1124 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1125 /// <privlevel>platform</privlevel>
1126 /// <feature>http://tizen.org/feature/systemsetting</feature>
1127 /// <exception cref="ArgumentException">Invalid Argument</exception>
1128 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1129 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1130 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1131 /// <since_tizen> 3 </since_tizen>
1132 public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1136 if (s_fontSizeChanged == null)
1138 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1139 if (ret != SystemSettingsError.None)
1141 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1144 s_fontSizeChanged += value;
1149 s_fontSizeChanged -= value;
1150 if (s_fontSizeChanged == null)
1152 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize);
1153 if (ret != SystemSettingsError.None)
1155 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1161 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1163 string fontType = SystemSettings.FontType;
1164 FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1165 s_fontTypeChanged?.Invoke(null, eventArgs);
1167 private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1169 /// The FontTypeChanged event is triggered when the current system font type is changed.
1171 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1172 /// <privlevel>platform</privlevel>
1173 /// <feature>http://tizen.org/feature/systemsetting</feature>
1174 /// <exception cref="ArgumentException">Invalid Argument</exception>
1175 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1176 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1177 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1178 /// <since_tizen> 3 </since_tizen>
1179 public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1183 if (s_fontTypeChanged == null)
1185 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1186 if (ret != SystemSettingsError.None)
1188 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1191 s_fontTypeChanged += value;
1196 s_fontTypeChanged -= value;
1197 if (s_fontTypeChanged == null)
1199 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType);
1200 if (ret != SystemSettingsError.None)
1202 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1208 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1210 bool motionActivation = SystemSettings.MotionActivationEnabled;
1211 MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1212 s_motionActivationChanged?.Invoke(null, eventArgs);
1214 private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1216 /// The MotionActivationChanged event is triggered when the motion service status is changed.
1218 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1219 /// <privlevel>platform</privlevel>
1220 /// <feature>http://tizen.org/feature/systemsetting</feature>
1221 /// <exception cref="ArgumentException">Invalid Argument</exception>
1222 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1223 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1224 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1225 /// <since_tizen> 3 </since_tizen>
1226 public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1230 if (s_motionActivationChanged == null)
1232 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1233 if (ret != SystemSettingsError.None)
1235 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1238 s_motionActivationChanged += value;
1243 s_motionActivationChanged -= value;
1244 if (s_motionActivationChanged == null)
1246 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled);
1247 if (ret != SystemSettingsError.None)
1249 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1255 private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1257 string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1258 EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1259 s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1261 private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1263 /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1265 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1266 /// <privlevel>platform</privlevel>
1267 /// <feature>http://tizen.org/feature/systemsetting</feature>
1268 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1269 /// <exception cref="ArgumentException">Invalid Argument</exception>
1270 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1271 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1272 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1273 /// <since_tizen> 3 </since_tizen>
1274 public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1278 if (s_emailAlertRingtoneChanged == null)
1280 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1281 if (ret != SystemSettingsError.None)
1283 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1286 s_emailAlertRingtoneChanged += value;
1291 s_emailAlertRingtoneChanged -= value;
1292 if (s_emailAlertRingtoneChanged == null)
1294 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone);
1295 if (ret != SystemSettingsError.None)
1297 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1303 private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1305 bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1306 UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1307 s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1309 private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1311 /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1313 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1314 /// <privlevel>platform</privlevel>
1315 /// <feature>http://tizen.org/feature/systemsetting</feature>
1316 /// <exception cref="ArgumentException">Invalid Argument</exception>
1317 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1318 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1319 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1320 /// <since_tizen> 3 </since_tizen>
1321 public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1325 if (s_usbDebuggingSettingChanged == null)
1327 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1328 if (ret != SystemSettingsError.None)
1330 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1333 s_usbDebuggingSettingChanged += value;
1338 s_usbDebuggingSettingChanged -= value;
1339 if (s_usbDebuggingSettingChanged == null)
1341 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled);
1342 if (ret != SystemSettingsError.None)
1344 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1350 private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1352 bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1353 Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1354 s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1356 private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1358 /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1360 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1361 /// <privlevel>platform</privlevel>
1362 /// <feature>http://tizen.org/feature/systemsetting</feature>
1363 /// <exception cref="ArgumentException">Invalid Argument</exception>
1364 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1365 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1366 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1367 /// <since_tizen> 3 </since_tizen>
1368 public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1372 if (s_data3GNetworkSettingChanged == null)
1374 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1375 if (ret != SystemSettingsError.None)
1377 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1380 s_data3GNetworkSettingChanged += value;
1385 s_data3GNetworkSettingChanged -= value;
1386 if (s_data3GNetworkSettingChanged == null)
1388 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled);
1389 if (ret != SystemSettingsError.None)
1391 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1397 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1399 string lockScreenApp = SystemSettings.LockScreenApp;
1400 LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1401 s_lockscreenAppChanged?.Invoke(null, eventArgs);
1403 private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1405 /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1407 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1408 /// <privlevel>platform</privlevel>
1409 /// <feature>http://tizen.org/feature/systemsetting</feature>
1410 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1411 /// <exception cref="ArgumentException">Invalid Argument</exception>
1412 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1413 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1414 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1415 /// <since_tizen> 4 </since_tizen>
1416 public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1420 if (s_lockscreenAppChanged == null)
1422 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1423 if (ret != SystemSettingsError.None)
1425 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1428 s_lockscreenAppChanged += value;
1433 s_lockscreenAppChanged -= value;
1434 if (s_lockscreenAppChanged == null)
1436 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp);
1437 if (ret != SystemSettingsError.None)
1439 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1445 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1447 string localeCountry = SystemSettings.LocaleCountry;
1448 LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1449 s_localeCountryChanged?.Invoke(null, eventArgs);
1451 private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1453 /// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
1455 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1456 /// <privlevel>platform</privlevel>
1457 /// <feature>http://tizen.org/feature/systemsetting</feature>
1458 /// <exception cref="ArgumentException">Invalid Argument</exception>
1459 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1460 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1461 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1462 /// <since_tizen> 3 </since_tizen>
1463 public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1467 if (s_localeCountryChanged == null)
1469 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1470 if (ret != SystemSettingsError.None)
1472 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1475 s_localeCountryChanged += value;
1480 s_localeCountryChanged -= value;
1481 if (s_localeCountryChanged == null)
1483 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry);
1484 if (ret != SystemSettingsError.None)
1486 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1492 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1494 string localeLanguage = SystemSettings.LocaleLanguage;
1495 LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1496 s_localeLanguageChanged?.Invoke(null, eventArgs);
1498 private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1500 /// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
1502 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1503 /// <privlevel>platform</privlevel>
1504 /// <feature>http://tizen.org/feature/systemsetting</feature>
1505 /// <exception cref="ArgumentException">Invalid Argument</exception>
1506 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1507 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1508 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1509 /// <since_tizen> 3 </since_tizen>
1510 public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1514 if (s_localeLanguageChanged == null)
1516 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1517 if (ret != SystemSettingsError.None)
1519 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1522 s_localeLanguageChanged += value;
1527 s_localeLanguageChanged -= value;
1528 if (s_localeLanguageChanged == null)
1530 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage);
1531 if (ret != SystemSettingsError.None)
1533 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1539 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1541 bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1542 LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1543 s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1545 private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1547 /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1549 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1550 /// <privlevel>platform</privlevel>
1551 /// <feature>http://tizen.org/feature/systemsetting</feature>
1552 /// <exception cref="ArgumentException">Invalid Argument</exception>
1553 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1554 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1555 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1556 /// <since_tizen> 3 </since_tizen>
1557 public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1561 if (s_localeTimeFormat24HourChanged == null)
1563 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1564 if (ret != SystemSettingsError.None)
1566 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1569 s_localeTimeFormat24HourChanged += value;
1574 s_localeTimeFormat24HourChanged -= value;
1575 if (s_localeTimeFormat24HourChanged == null)
1577 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled);
1578 if (ret != SystemSettingsError.None)
1580 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1586 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1588 string localeTimeZone = SystemSettings.LocaleTimeZone;
1589 LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1590 s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1592 private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1594 /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1596 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1597 /// <privlevel>platform</privlevel>
1598 /// <feature>http://tizen.org/feature/systemsetting</feature>
1599 /// <exception cref="ArgumentException">Invalid Argument</exception>
1600 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1601 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1602 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1603 /// <since_tizen> 3 </since_tizen>
1604 public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1608 if (s_localeTimeZoneChanged == null)
1610 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1611 if (ret != SystemSettingsError.None)
1613 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1616 s_localeTimeZoneChanged += value;
1621 s_localeTimeZoneChanged -= value;
1622 if (s_localeTimeZoneChanged == null)
1624 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone);
1625 if (ret != SystemSettingsError.None)
1627 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1633 private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1636 int time = SystemSettings.Time;
1637 TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1638 s_timeChanged?.Invoke(null, eventArgs);
1640 private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1642 /// The TimeChanged event is triggered when the system time is changed.
1644 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1645 /// <privlevel>platform</privlevel>
1646 /// <feature>http://tizen.org/feature/systemsetting</feature>
1647 /// <exception cref="ArgumentException">Invalid Argument</exception>
1648 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1649 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1650 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1651 /// <since_tizen> 3 </since_tizen>
1652 public static event EventHandler<TimeChangedEventArgs> TimeChanged
1656 if (s_timeChanged == null)
1658 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1659 if (ret != SystemSettingsError.None)
1661 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1664 s_timeChanged += value;
1669 s_timeChanged -= value;
1670 if (s_timeChanged == null)
1672 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time);
1673 if (ret != SystemSettingsError.None)
1675 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1681 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1683 bool soundLock = SystemSettings.SoundLockEnabled;
1684 SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1685 s_soundLockChanged?.Invoke(null, eventArgs);
1687 private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1689 /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1691 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1692 /// <privlevel>platform</privlevel>
1693 /// <feature>http://tizen.org/feature/systemsetting</feature>
1694 /// <exception cref="ArgumentException">Invalid Argument</exception>
1695 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1696 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1697 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1698 /// <since_tizen> 3 </since_tizen>
1699 public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1703 if (s_soundLockChanged == null)
1705 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1706 if (ret != SystemSettingsError.None)
1708 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1711 s_soundLockChanged += value;
1716 s_soundLockChanged -= value;
1717 if (s_soundLockChanged == null)
1719 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled);
1720 if (ret != SystemSettingsError.None)
1722 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1728 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1730 bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1731 SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1732 s_soundSilentModeChanged?.Invoke(null, eventArgs);
1734 private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1736 /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1738 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1739 /// <privlevel>platform</privlevel>
1740 /// <feature>http://tizen.org/feature/systemsetting</feature>
1741 /// <exception cref="ArgumentException">Invalid Argument</exception>
1742 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1743 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1744 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1745 /// <since_tizen> 3 </since_tizen>
1746 public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1750 if (s_soundSilentModeChanged == null)
1752 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1753 if (ret != SystemSettingsError.None)
1755 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1758 s_soundSilentModeChanged += value;
1763 s_soundSilentModeChanged -= value;
1764 if (s_soundSilentModeChanged == null)
1766 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled);
1767 if (ret != SystemSettingsError.None)
1769 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1775 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1777 bool soundTouch = SystemSettings.SoundTouchEnabled;
1778 SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1779 s_soundTouchChanged?.Invoke(null, eventArgs);
1781 private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1783 /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1785 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1786 /// <privlevel>platform</privlevel>
1787 /// <feature>http://tizen.org/feature/systemsetting</feature>
1788 /// <exception cref="ArgumentException">Invalid Argument</exception>
1789 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1790 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1791 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1792 /// <since_tizen> 3 </since_tizen>
1793 public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1797 if (s_soundTouchChanged == null)
1799 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1800 if (ret != SystemSettingsError.None)
1802 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1805 s_soundTouchChanged += value;
1810 s_soundTouchChanged -= value;
1811 if (s_soundTouchChanged == null)
1814 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled);
1815 if (ret != SystemSettingsError.None)
1817 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1823 private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1825 bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
1826 DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
1827 s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
1829 private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
1831 /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
1833 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1834 /// <privlevel>platform</privlevel>
1835 /// <feature>http://tizen.org/feature/systemsetting</feature>
1836 /// <exception cref="ArgumentException">Invalid Argument</exception>
1837 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1838 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1839 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1840 /// <since_tizen> 3 </since_tizen>
1841 public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
1845 if (s_displayScreenRotationAutoChanged == null)
1847 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
1848 if (ret != SystemSettingsError.None)
1850 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1853 s_displayScreenRotationAutoChanged += value;
1858 s_displayScreenRotationAutoChanged -= value;
1859 if (s_displayScreenRotationAutoChanged == null)
1861 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled);
1862 if (ret != SystemSettingsError.None)
1864 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1870 private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1872 string deviceName = SystemSettings.DeviceName;
1873 DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
1874 s_deviceNameChanged?.Invoke(null, eventArgs);
1876 private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
1878 /// The DeviceNameChanged event is triggered when the device name is changed.
1880 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1881 /// <privlevel>platform</privlevel>
1882 /// <feature>http://tizen.org/feature/systemsetting</feature>
1883 /// <exception cref="ArgumentException">Invalid Argument</exception>
1884 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1885 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1886 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1887 /// <since_tizen> 3 </since_tizen>
1888 public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
1892 if (s_deviceNameChanged == null)
1894 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
1895 if (ret != SystemSettingsError.None)
1897 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1900 s_deviceNameChanged += value;
1905 s_deviceNameChanged -= value;
1906 if (s_deviceNameChanged == null)
1908 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName);
1909 if (ret != SystemSettingsError.None)
1911 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1917 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1919 bool motionEnabled = SystemSettings.MotionEnabled;
1920 MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
1921 s_motionSettingChanged?.Invoke(null, eventArgs);
1923 private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
1925 /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
1927 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1928 /// <privlevel>platform</privlevel>
1929 /// <feature>http://tizen.org/feature/systemsetting</feature>
1930 /// <exception cref="ArgumentException">Invalid Argument</exception>
1931 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1932 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1933 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1934 /// <since_tizen> 3 </since_tizen>
1935 public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
1939 if (s_motionSettingChanged == null)
1941 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
1942 if (ret != SystemSettingsError.None)
1944 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1947 s_motionSettingChanged += value;
1952 s_motionSettingChanged -= value;
1953 if (s_motionSettingChanged == null)
1955 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled);
1956 if (ret != SystemSettingsError.None)
1958 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1964 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1966 bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
1967 NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
1968 s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
1970 private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
1972 /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
1974 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1975 /// <privlevel>platform</privlevel>
1976 /// <feature>http://tizen.org/feature/systemsetting</feature>
1977 /// <feature>http://tizen.org/feature/network.wifi</feature>
1978 /// <exception cref="ArgumentException">Invalid Argument</exception>
1979 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1980 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1981 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1982 /// <since_tizen> 3 </since_tizen>
1983 public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
1987 if (s_networkWifiNotificationChanged == null)
1989 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
1990 if (ret != SystemSettingsError.None)
1992 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1995 s_networkWifiNotificationChanged += value;
2000 s_networkWifiNotificationChanged -= value;
2001 if (s_networkWifiNotificationChanged == null)
2003 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled);
2004 if (ret != SystemSettingsError.None)
2006 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2012 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2014 bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2015 NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2016 s_networkFlightModeChanged?.Invoke(null, eventArgs);
2018 private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2020 /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2022 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2023 /// <privlevel>platform</privlevel>
2024 /// <feature>http://tizen.org/feature/systemsetting</feature>
2025 /// <exception cref="ArgumentException">Invalid Argument</exception>
2026 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2027 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2028 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2029 /// <since_tizen> 3 </since_tizen>
2030 public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2034 if (s_networkFlightModeChanged == null)
2036 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2037 if (ret != SystemSettingsError.None)
2039 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2042 s_networkFlightModeChanged += value;
2047 s_networkFlightModeChanged -= value;
2048 if (s_networkFlightModeChanged == null)
2050 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled);
2051 if (ret != SystemSettingsError.None)
2053 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2059 private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2061 int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2062 ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2063 s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2065 private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2067 /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2069 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2070 /// <privlevel>platform</privlevel>
2071 /// <feature>http://tizen.org/feature/systemsetting</feature>
2072 /// <exception cref="ArgumentException">Invalid Argument</exception>
2073 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2074 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2075 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2076 /// <since_tizen> 3 </since_tizen>
2077 public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2081 if (s_screenBacklightTimeChanged == null)
2083 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2084 if (ret != SystemSettingsError.None)
2086 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2089 s_screenBacklightTimeChanged += value;
2094 s_screenBacklightTimeChanged -= value;
2095 if (s_screenBacklightTimeChanged == null)
2097 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime);
2098 if (ret != SystemSettingsError.None)
2100 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2106 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2108 string soundNotification = SystemSettings.SoundNotification;
2109 SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2110 s_soundNotificationChanged?.Invoke(null, eventArgs);
2112 private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2114 /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2116 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2117 /// <privlevel>platform</privlevel>
2118 /// <feature>http://tizen.org/feature/systemsetting</feature>
2119 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2120 /// <exception cref="ArgumentException">Invalid Argument</exception>
2121 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2122 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2123 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2124 /// <since_tizen> 3 </since_tizen>
2125 public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2129 if (s_soundNotificationChanged == null)
2131 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2132 if (ret != SystemSettingsError.None)
2134 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2137 s_soundNotificationChanged += value;
2142 s_soundNotificationChanged -= value;
2143 if (s_soundNotificationChanged == null)
2145 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification);
2146 if (ret != SystemSettingsError.None)
2148 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2154 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2156 int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2157 SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2158 s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2160 private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2162 /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2164 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2165 /// <privlevel>platform</privlevel>
2166 /// <feature>http://tizen.org/feature/systemsetting</feature>
2167 /// <exception cref="ArgumentException">Invalid Argument</exception>
2168 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2169 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2170 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2171 /// <since_tizen> 3 </since_tizen>
2172 public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2176 if (s_soundNotificationRepetitionPeriodChanged == null)
2178 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2179 if (ret != SystemSettingsError.None)
2181 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2184 s_soundNotificationRepetitionPeriodChanged += value;
2189 s_soundNotificationRepetitionPeriodChanged -= value;
2190 if (s_soundNotificationRepetitionPeriodChanged == null)
2192 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod);
2193 if (ret != SystemSettingsError.None)
2195 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2201 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2203 SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2204 LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2205 s_lockStateChanged?.Invoke(null, eventArgs);
2207 private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2209 /// The LockStateChanged event is triggered when the current lock state is changed.
2211 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2212 /// <privlevel>platform</privlevel>
2213 /// <feature>http://tizen.org/feature/systemsetting</feature>
2214 /// <exception cref="ArgumentException">Invalid Argument</exception>
2215 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2216 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2217 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2218 /// <since_tizen> 3 </since_tizen>
2219 public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2223 if (s_lockStateChanged == null)
2225 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2226 if (ret != SystemSettingsError.None)
2228 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2231 s_lockStateChanged += value;
2236 s_lockStateChanged -= value;
2237 if (s_lockStateChanged == null)
2239 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState);
2240 if (ret != SystemSettingsError.None)
2242 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2248 private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2250 string adsId = SystemSettings.AdsId;
2251 AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2252 s_adsIdChanged?.Invoke(null, eventArgs);
2254 private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2256 /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2258 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2259 /// <privlevel>platform</privlevel>
2260 /// <feature>http://tizen.org/feature/systemsetting</feature>
2261 /// <exception cref="ArgumentException">Invalid Argument</exception>
2262 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2263 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2264 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2265 /// <since_tizen> 3 </since_tizen>
2266 public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2270 if (s_adsIdChanged == null)
2272 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2273 if (ret != SystemSettingsError.None)
2275 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2278 s_adsIdChanged += value;
2283 s_adsIdChanged -= value;
2284 if (s_adsIdChanged == null)
2286 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId);
2287 if (ret != SystemSettingsError.None)
2289 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2295 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2297 SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2298 UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2299 s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2301 private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2303 /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2305 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2306 /// <privlevel>platform</privlevel>
2307 /// <feature>http://tizen.org/feature/systemsetting</feature>
2308 /// <feature>http://tizen.org/feature/network.telephony</feature>
2309 /// <exception cref="ArgumentException">Invalid Argument</exception>
2310 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2311 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2312 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2313 /// <since_tizen> 3 </since_tizen>
2314 public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2318 if (s_ultraDataSaveChanged == null)
2320 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2321 if (ret != SystemSettingsError.None)
2323 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2326 s_ultraDataSaveChanged += value;
2331 s_ultraDataSaveChanged -= value;
2332 if (s_ultraDataSaveChanged == null)
2334 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave);
2335 if (ret != SystemSettingsError.None)
2337 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2343 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2345 string ultraDataSavePackageList = "None";
2346 UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2347 s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2349 private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2351 /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2353 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2354 /// <privlevel>platform</privlevel>
2355 /// <feature>http://tizen.org/feature/systemsetting</feature>
2356 /// <feature>http://tizen.org/feature/network.telephony</feature>
2357 /// <exception cref="ArgumentException">Invalid Argument</exception>
2358 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2359 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2360 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2361 /// <since_tizen> 3 </since_tizen>
2362 public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2366 if (s_ultraDataSavePackageListChanged == null)
2368 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2369 if (ret != SystemSettingsError.None)
2371 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2374 s_ultraDataSavePackageListChanged += value;
2379 s_ultraDataSavePackageListChanged -= value;
2380 if (s_ultraDataSavePackageListChanged == null)
2382 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList);
2383 if (ret != SystemSettingsError.None)
2385 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2391 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2393 bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2394 AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2395 s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2397 private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2399 /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2401 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2402 /// <privlevel>platform</privlevel>
2403 /// <feature>http://tizen.org/feature/systemsetting</feature>
2404 /// <exception cref="ArgumentException">Invalid Argument</exception>
2405 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2406 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2407 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2408 /// <since_tizen> 4 </since_tizen>
2409 public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2413 if (s_accessibilityTtsChanged == null)
2415 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2416 if (ret != SystemSettingsError.None)
2418 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2421 s_accessibilityTtsChanged += value;
2426 s_accessibilityTtsChanged -= value;
2427 if (s_accessibilityTtsChanged == null)
2430 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled);
2431 if (ret != SystemSettingsError.None)
2433 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");