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 if (s_incomingCallRingtoneChanged == null)
1009 s_incomingCallRingtoneChanged -= value;
1010 if (s_incomingCallRingtoneChanged == null)
1012 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback);
1013 if (ret != SystemSettingsError.None)
1015 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1021 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1023 string path = SystemSettings.WallpaperHomeScreen;
1024 WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1025 s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1027 private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1029 /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1031 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1032 /// <privlevel>platform</privlevel>
1033 /// <feature>http://tizen.org/feature/systemsetting</feature>
1034 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1035 /// <exception cref="ArgumentException">Invalid Argument</exception>
1036 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1037 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1038 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1039 /// <since_tizen> 3 </since_tizen>
1040 public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1044 if (s_wallpaperHomeScreenChanged == null)
1046 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1047 if (ret != SystemSettingsError.None)
1049 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1052 s_wallpaperHomeScreenChanged += value;
1057 if (s_wallpaperHomeScreenChanged == null)
1060 s_wallpaperHomeScreenChanged -= value;
1061 if (s_wallpaperHomeScreenChanged == null)
1063 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback);
1064 if (ret != SystemSettingsError.None)
1066 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1072 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1074 string path = SystemSettings.WallpaperLockScreen;
1075 WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1076 s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1078 private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1080 /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1082 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1083 /// <privlevel>platform</privlevel>
1084 /// <feature>http://tizen.org/feature/systemsetting</feature>
1085 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1086 /// <exception cref="ArgumentException">Invalid Argument</exception>
1087 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1088 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1089 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1090 /// <since_tizen> 3 </since_tizen>
1091 public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1095 if (s_wallpaperLockScreenChanged == null)
1097 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1098 if (ret != SystemSettingsError.None)
1100 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1103 s_wallpaperLockScreenChanged += value;
1108 if (s_wallpaperLockScreenChanged == null)
1111 s_wallpaperLockScreenChanged -= value;
1112 if (s_wallpaperLockScreenChanged == null)
1114 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback);
1115 if (ret != SystemSettingsError.None)
1117 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1123 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1125 SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1126 FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1127 s_fontSizeChanged?.Invoke(null, eventArgs);
1129 private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1131 /// The FontSizeChanged event is triggered when the current system font size is changed.
1133 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1134 /// <privlevel>platform</privlevel>
1135 /// <feature>http://tizen.org/feature/systemsetting</feature>
1136 /// <exception cref="ArgumentException">Invalid Argument</exception>
1137 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1138 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1139 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1140 /// <since_tizen> 3 </since_tizen>
1141 public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1145 if (s_fontSizeChanged == null)
1147 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1148 if (ret != SystemSettingsError.None)
1150 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1153 s_fontSizeChanged += value;
1158 if (s_fontSizeChanged == null)
1161 s_fontSizeChanged -= value;
1162 if (s_fontSizeChanged == null)
1164 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback);
1165 if (ret != SystemSettingsError.None)
1167 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1173 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1175 string fontType = SystemSettings.FontType;
1176 FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1177 s_fontTypeChanged?.Invoke(null, eventArgs);
1179 private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1181 /// The FontTypeChanged event is triggered when the current system font type is changed.
1183 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1184 /// <privlevel>platform</privlevel>
1185 /// <feature>http://tizen.org/feature/systemsetting</feature>
1186 /// <exception cref="ArgumentException">Invalid Argument</exception>
1187 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1188 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1189 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1190 /// <since_tizen> 3 </since_tizen>
1191 public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1195 if (s_fontTypeChanged == null)
1197 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1198 if (ret != SystemSettingsError.None)
1200 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1203 s_fontTypeChanged += value;
1208 if (s_fontTypeChanged == null)
1211 s_fontTypeChanged -= value;
1212 if (s_fontTypeChanged == null)
1214 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback);
1215 if (ret != SystemSettingsError.None)
1217 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1223 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1225 bool motionActivation = SystemSettings.MotionActivationEnabled;
1226 MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1227 s_motionActivationChanged?.Invoke(null, eventArgs);
1229 private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1231 /// The MotionActivationChanged event is triggered when the motion service status is changed.
1233 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1234 /// <privlevel>platform</privlevel>
1235 /// <feature>http://tizen.org/feature/systemsetting</feature>
1236 /// <exception cref="ArgumentException">Invalid Argument</exception>
1237 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1238 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1239 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1240 /// <since_tizen> 3 </since_tizen>
1241 public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1245 if (s_motionActivationChanged == null)
1247 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1248 if (ret != SystemSettingsError.None)
1250 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1253 s_motionActivationChanged += value;
1258 if (s_motionActivationChanged == null)
1261 s_motionActivationChanged -= value;
1262 if (s_motionActivationChanged == null)
1264 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback);
1265 if (ret != SystemSettingsError.None)
1267 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1273 private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1275 string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1276 EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1277 s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1279 private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1281 /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1283 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1284 /// <privlevel>platform</privlevel>
1285 /// <feature>http://tizen.org/feature/systemsetting</feature>
1286 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1287 /// <exception cref="ArgumentException">Invalid Argument</exception>
1288 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1289 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1290 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1291 /// <since_tizen> 3 </since_tizen>
1292 public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1296 if (s_emailAlertRingtoneChanged == null)
1298 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1299 if (ret != SystemSettingsError.None)
1301 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1304 s_emailAlertRingtoneChanged += value;
1309 if (s_emailAlertRingtoneChanged == null)
1312 s_emailAlertRingtoneChanged -= value;
1313 if (s_emailAlertRingtoneChanged == null)
1315 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback);
1316 if (ret != SystemSettingsError.None)
1318 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1324 private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1326 bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1327 UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1328 s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1330 private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1332 /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1334 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1335 /// <privlevel>platform</privlevel>
1336 /// <feature>http://tizen.org/feature/systemsetting</feature>
1337 /// <exception cref="ArgumentException">Invalid Argument</exception>
1338 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1339 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1340 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1341 /// <since_tizen> 3 </since_tizen>
1342 public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1346 if (s_usbDebuggingSettingChanged == null)
1348 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1349 if (ret != SystemSettingsError.None)
1351 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1354 s_usbDebuggingSettingChanged += value;
1359 if (s_usbDebuggingSettingChanged == null)
1362 s_usbDebuggingSettingChanged -= value;
1363 if (s_usbDebuggingSettingChanged == null)
1365 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback);
1366 if (ret != SystemSettingsError.None)
1368 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1374 private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1376 bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1377 Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1378 s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1380 private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1382 /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1384 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1385 /// <privlevel>platform</privlevel>
1386 /// <feature>http://tizen.org/feature/systemsetting</feature>
1387 /// <exception cref="ArgumentException">Invalid Argument</exception>
1388 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1389 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1390 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1391 /// <since_tizen> 3 </since_tizen>
1392 public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1396 if (s_data3GNetworkSettingChanged == null)
1398 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1399 if (ret != SystemSettingsError.None)
1401 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1404 s_data3GNetworkSettingChanged += value;
1409 if (s_data3GNetworkSettingChanged == null)
1412 s_data3GNetworkSettingChanged -= value;
1413 if (s_data3GNetworkSettingChanged == null)
1415 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback);
1416 if (ret != SystemSettingsError.None)
1418 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1424 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1426 string lockScreenApp = SystemSettings.LockScreenApp;
1427 LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1428 s_lockscreenAppChanged?.Invoke(null, eventArgs);
1430 private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1432 /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1434 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1435 /// <privlevel>platform</privlevel>
1436 /// <feature>http://tizen.org/feature/systemsetting</feature>
1437 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1438 /// <exception cref="ArgumentException">Invalid Argument</exception>
1439 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1440 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1441 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1442 /// <since_tizen> 4 </since_tizen>
1443 public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1447 if (s_lockscreenAppChanged == null)
1449 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1450 if (ret != SystemSettingsError.None)
1452 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1455 s_lockscreenAppChanged += value;
1460 if (s_lockscreenAppChanged == null)
1463 s_lockscreenAppChanged -= value;
1464 if (s_lockscreenAppChanged == null)
1466 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback);
1467 if (ret != SystemSettingsError.None)
1469 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1475 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1477 string localeCountry = SystemSettings.LocaleCountry;
1478 LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1479 s_localeCountryChanged?.Invoke(null, eventArgs);
1481 private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1483 /// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
1485 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1486 /// <privlevel>platform</privlevel>
1487 /// <feature>http://tizen.org/feature/systemsetting</feature>
1488 /// <exception cref="ArgumentException">Invalid Argument</exception>
1489 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1490 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1491 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1492 /// <since_tizen> 3 </since_tizen>
1493 public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1497 if (s_localeCountryChanged == null)
1499 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1500 if (ret != SystemSettingsError.None)
1502 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1505 s_localeCountryChanged += value;
1510 if (s_localeCountryChanged == null)
1513 s_localeCountryChanged -= value;
1514 if (s_localeCountryChanged == null)
1516 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback);
1517 if (ret != SystemSettingsError.None)
1519 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1525 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1527 string localeLanguage = SystemSettings.LocaleLanguage;
1528 LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1529 s_localeLanguageChanged?.Invoke(null, eventArgs);
1531 private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1533 /// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
1535 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1536 /// <privlevel>platform</privlevel>
1537 /// <feature>http://tizen.org/feature/systemsetting</feature>
1538 /// <exception cref="ArgumentException">Invalid Argument</exception>
1539 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1540 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1541 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1542 /// <since_tizen> 3 </since_tizen>
1543 public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1547 if (s_localeLanguageChanged == null)
1549 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1550 if (ret != SystemSettingsError.None)
1552 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1555 s_localeLanguageChanged += value;
1560 if (s_localeLanguageChanged == null)
1563 s_localeLanguageChanged -= value;
1564 if (s_localeLanguageChanged == null)
1566 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback);
1567 if (ret != SystemSettingsError.None)
1569 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1575 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1577 bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1578 LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1579 s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1581 private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1583 /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1585 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1586 /// <privlevel>platform</privlevel>
1587 /// <feature>http://tizen.org/feature/systemsetting</feature>
1588 /// <exception cref="ArgumentException">Invalid Argument</exception>
1589 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1590 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1591 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1592 /// <since_tizen> 3 </since_tizen>
1593 public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1597 if (s_localeTimeFormat24HourChanged == null)
1599 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1600 if (ret != SystemSettingsError.None)
1602 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1605 s_localeTimeFormat24HourChanged += value;
1610 if (s_localeTimeFormat24HourChanged == null)
1613 s_localeTimeFormat24HourChanged -= value;
1614 if (s_localeTimeFormat24HourChanged == null)
1616 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback);
1617 if (ret != SystemSettingsError.None)
1619 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1625 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1627 string localeTimeZone = SystemSettings.LocaleTimeZone;
1628 LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1629 s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1631 private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1633 /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1635 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1636 /// <privlevel>platform</privlevel>
1637 /// <feature>http://tizen.org/feature/systemsetting</feature>
1638 /// <exception cref="ArgumentException">Invalid Argument</exception>
1639 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1640 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1641 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1642 /// <since_tizen> 3 </since_tizen>
1643 public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1647 if (s_localeTimeZoneChanged == null)
1649 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1650 if (ret != SystemSettingsError.None)
1652 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1655 s_localeTimeZoneChanged += value;
1660 if (s_localeTimeZoneChanged == null)
1663 s_localeTimeZoneChanged -= value;
1664 if (s_localeTimeZoneChanged == null)
1666 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback);
1667 if (ret != SystemSettingsError.None)
1669 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1675 private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1678 int time = SystemSettings.Time;
1679 TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1680 s_timeChanged?.Invoke(null, eventArgs);
1682 private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1684 /// The TimeChanged event is triggered when the system time is changed.
1686 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1687 /// <privlevel>platform</privlevel>
1688 /// <feature>http://tizen.org/feature/systemsetting</feature>
1689 /// <exception cref="ArgumentException">Invalid Argument</exception>
1690 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1691 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1692 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1693 /// <since_tizen> 3 </since_tizen>
1694 public static event EventHandler<TimeChangedEventArgs> TimeChanged
1698 if (s_timeChanged == null)
1700 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1701 if (ret != SystemSettingsError.None)
1703 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1706 s_timeChanged += value;
1711 if (s_timeChanged == null)
1714 s_timeChanged -= value;
1715 if (s_timeChanged == null)
1717 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time, s_timeChangedCallback);
1718 if (ret != SystemSettingsError.None)
1720 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1726 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1728 bool soundLock = SystemSettings.SoundLockEnabled;
1729 SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1730 s_soundLockChanged?.Invoke(null, eventArgs);
1732 private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1734 /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1736 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1737 /// <privlevel>platform</privlevel>
1738 /// <feature>http://tizen.org/feature/systemsetting</feature>
1739 /// <exception cref="ArgumentException">Invalid Argument</exception>
1740 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1741 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1742 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1743 /// <since_tizen> 3 </since_tizen>
1744 public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1748 if (s_soundLockChanged == null)
1750 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1751 if (ret != SystemSettingsError.None)
1753 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1756 s_soundLockChanged += value;
1761 if (s_soundLockChanged == null)
1764 s_soundLockChanged -= value;
1765 if (s_soundLockChanged == null)
1767 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback);
1768 if (ret != SystemSettingsError.None)
1770 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1776 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1778 bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1779 SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1780 s_soundSilentModeChanged?.Invoke(null, eventArgs);
1782 private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1784 /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1786 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1787 /// <privlevel>platform</privlevel>
1788 /// <feature>http://tizen.org/feature/systemsetting</feature>
1789 /// <exception cref="ArgumentException">Invalid Argument</exception>
1790 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1791 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1792 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1793 /// <since_tizen> 3 </since_tizen>
1794 public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1798 if (s_soundSilentModeChanged == null)
1800 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1801 if (ret != SystemSettingsError.None)
1803 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1806 s_soundSilentModeChanged += value;
1811 if (s_soundSilentModeChanged == null)
1814 s_soundSilentModeChanged -= value;
1815 if (s_soundSilentModeChanged == null)
1817 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback);
1818 if (ret != SystemSettingsError.None)
1820 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1826 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1828 bool soundTouch = SystemSettings.SoundTouchEnabled;
1829 SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1830 s_soundTouchChanged?.Invoke(null, eventArgs);
1832 private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1834 /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1836 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1837 /// <privlevel>platform</privlevel>
1838 /// <feature>http://tizen.org/feature/systemsetting</feature>
1839 /// <exception cref="ArgumentException">Invalid Argument</exception>
1840 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1841 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1842 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1843 /// <since_tizen> 3 </since_tizen>
1844 public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1848 if (s_soundTouchChanged == null)
1850 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1851 if (ret != SystemSettingsError.None)
1853 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1856 s_soundTouchChanged += value;
1861 if (s_soundTouchChanged == null)
1864 s_soundTouchChanged -= value;
1865 if (s_soundTouchChanged == null)
1867 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback);
1868 if (ret != SystemSettingsError.None)
1870 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1876 private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1878 bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
1879 DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
1880 s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
1882 private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
1884 /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
1886 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1887 /// <privlevel>platform</privlevel>
1888 /// <feature>http://tizen.org/feature/systemsetting</feature>
1889 /// <exception cref="ArgumentException">Invalid Argument</exception>
1890 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1891 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1892 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1893 /// <since_tizen> 3 </since_tizen>
1894 public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
1898 if (s_displayScreenRotationAutoChanged == null)
1900 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
1901 if (ret != SystemSettingsError.None)
1903 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1906 s_displayScreenRotationAutoChanged += value;
1911 if (s_displayScreenRotationAutoChanged == null)
1914 s_displayScreenRotationAutoChanged -= value;
1915 if (s_displayScreenRotationAutoChanged == null)
1917 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback);
1918 if (ret != SystemSettingsError.None)
1920 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1926 private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1928 string deviceName = SystemSettings.DeviceName;
1929 DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
1930 s_deviceNameChanged?.Invoke(null, eventArgs);
1932 private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
1934 /// The DeviceNameChanged event is triggered when the device name is changed.
1936 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1937 /// <privlevel>platform</privlevel>
1938 /// <feature>http://tizen.org/feature/systemsetting</feature>
1939 /// <exception cref="ArgumentException">Invalid Argument</exception>
1940 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1941 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1942 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1943 /// <since_tizen> 3 </since_tizen>
1944 public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
1948 if (s_deviceNameChanged == null)
1950 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
1951 if (ret != SystemSettingsError.None)
1953 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1956 s_deviceNameChanged += value;
1961 if (s_deviceNameChanged == null)
1964 s_deviceNameChanged -= value;
1965 if (s_deviceNameChanged == null)
1967 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback);
1968 if (ret != SystemSettingsError.None)
1970 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1976 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1978 bool motionEnabled = SystemSettings.MotionEnabled;
1979 MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
1980 s_motionSettingChanged?.Invoke(null, eventArgs);
1982 private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
1984 /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
1986 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1987 /// <privlevel>platform</privlevel>
1988 /// <feature>http://tizen.org/feature/systemsetting</feature>
1989 /// <exception cref="ArgumentException">Invalid Argument</exception>
1990 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1991 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1992 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1993 /// <since_tizen> 3 </since_tizen>
1994 public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
1998 if (s_motionSettingChanged == null)
2000 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
2001 if (ret != SystemSettingsError.None)
2003 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2006 s_motionSettingChanged += value;
2011 if (s_motionSettingChanged == null)
2014 s_motionSettingChanged -= value;
2015 if (s_motionSettingChanged == null)
2017 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback);
2018 if (ret != SystemSettingsError.None)
2020 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2026 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2028 bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
2029 NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
2030 s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
2032 private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
2034 /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
2036 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2037 /// <privlevel>platform</privlevel>
2038 /// <feature>http://tizen.org/feature/systemsetting</feature>
2039 /// <feature>http://tizen.org/feature/network.wifi</feature>
2040 /// <exception cref="ArgumentException">Invalid Argument</exception>
2041 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2042 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2043 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2044 /// <since_tizen> 3 </since_tizen>
2045 public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
2049 if (s_networkWifiNotificationChanged == null)
2051 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
2052 if (ret != SystemSettingsError.None)
2054 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2057 s_networkWifiNotificationChanged += value;
2062 if (s_networkWifiNotificationChanged == null)
2065 s_networkWifiNotificationChanged -= value;
2066 if (s_networkWifiNotificationChanged == null)
2068 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback);
2069 if (ret != SystemSettingsError.None)
2071 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2077 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2079 bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2080 NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2081 s_networkFlightModeChanged?.Invoke(null, eventArgs);
2083 private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2085 /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2087 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2088 /// <privlevel>platform</privlevel>
2089 /// <feature>http://tizen.org/feature/systemsetting</feature>
2090 /// <exception cref="ArgumentException">Invalid Argument</exception>
2091 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2092 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2093 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2094 /// <since_tizen> 3 </since_tizen>
2095 public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2099 if (s_networkFlightModeChanged == null)
2101 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2102 if (ret != SystemSettingsError.None)
2104 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2107 s_networkFlightModeChanged += value;
2112 if (s_networkFlightModeChanged == null)
2115 s_networkFlightModeChanged -= value;
2116 if (s_networkFlightModeChanged == null)
2118 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback);
2119 if (ret != SystemSettingsError.None)
2121 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2127 private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2129 int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2130 ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2131 s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2133 private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2135 /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2137 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2138 /// <privlevel>platform</privlevel>
2139 /// <feature>http://tizen.org/feature/systemsetting</feature>
2140 /// <exception cref="ArgumentException">Invalid Argument</exception>
2141 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2142 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2143 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2144 /// <since_tizen> 3 </since_tizen>
2145 public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2149 if (s_screenBacklightTimeChanged == null)
2151 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2152 if (ret != SystemSettingsError.None)
2154 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2157 s_screenBacklightTimeChanged += value;
2162 if (s_screenBacklightTimeChanged == null)
2165 s_screenBacklightTimeChanged -= value;
2166 if (s_screenBacklightTimeChanged == null)
2168 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback);
2169 if (ret != SystemSettingsError.None)
2171 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2177 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2179 string soundNotification = SystemSettings.SoundNotification;
2180 SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2181 s_soundNotificationChanged?.Invoke(null, eventArgs);
2183 private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2185 /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2187 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2188 /// <privlevel>platform</privlevel>
2189 /// <feature>http://tizen.org/feature/systemsetting</feature>
2190 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2191 /// <exception cref="ArgumentException">Invalid Argument</exception>
2192 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2193 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2194 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2195 /// <since_tizen> 3 </since_tizen>
2196 public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2200 if (s_soundNotificationChanged == null)
2202 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2203 if (ret != SystemSettingsError.None)
2205 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2208 s_soundNotificationChanged += value;
2213 if (s_soundNotificationChanged == null)
2216 s_soundNotificationChanged -= value;
2217 if (s_soundNotificationChanged == null)
2219 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback);
2220 if (ret != SystemSettingsError.None)
2222 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2228 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2230 int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2231 SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2232 s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2234 private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2236 /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2238 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2239 /// <privlevel>platform</privlevel>
2240 /// <feature>http://tizen.org/feature/systemsetting</feature>
2241 /// <exception cref="ArgumentException">Invalid Argument</exception>
2242 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2243 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2244 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2245 /// <since_tizen> 3 </since_tizen>
2246 public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2250 if (s_soundNotificationRepetitionPeriodChanged == null)
2252 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2253 if (ret != SystemSettingsError.None)
2255 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2258 s_soundNotificationRepetitionPeriodChanged += value;
2263 if (s_soundNotificationRepetitionPeriodChanged == null)
2266 s_soundNotificationRepetitionPeriodChanged -= value;
2267 if (s_soundNotificationRepetitionPeriodChanged == null)
2269 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback);
2270 if (ret != SystemSettingsError.None)
2272 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2278 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2280 SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2281 LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2282 s_lockStateChanged?.Invoke(null, eventArgs);
2284 private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2286 /// The LockStateChanged event is triggered when the current lock state is changed.
2288 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2289 /// <privlevel>platform</privlevel>
2290 /// <feature>http://tizen.org/feature/systemsetting</feature>
2291 /// <exception cref="ArgumentException">Invalid Argument</exception>
2292 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2293 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2294 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2295 /// <since_tizen> 3 </since_tizen>
2296 public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2300 if (s_lockStateChanged == null)
2302 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2303 if (ret != SystemSettingsError.None)
2305 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2308 s_lockStateChanged += value;
2313 if (s_lockStateChanged == null)
2316 s_lockStateChanged -= value;
2317 if (s_lockStateChanged == null)
2319 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback);
2320 if (ret != SystemSettingsError.None)
2322 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2328 private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2330 string adsId = SystemSettings.AdsId;
2331 AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2332 s_adsIdChanged?.Invoke(null, eventArgs);
2334 private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2336 /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2338 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2339 /// <privlevel>platform</privlevel>
2340 /// <feature>http://tizen.org/feature/systemsetting</feature>
2341 /// <exception cref="ArgumentException">Invalid Argument</exception>
2342 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2343 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2344 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2345 /// <since_tizen> 3 </since_tizen>
2346 public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2350 if (s_adsIdChanged == null)
2352 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2353 if (ret != SystemSettingsError.None)
2355 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2358 s_adsIdChanged += value;
2363 if (s_adsIdChanged == null)
2366 s_adsIdChanged -= value;
2367 if (s_adsIdChanged == null)
2369 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback);
2370 if (ret != SystemSettingsError.None)
2372 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2378 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2380 SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2381 UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2382 s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2384 private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2386 /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2388 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2389 /// <privlevel>platform</privlevel>
2390 /// <feature>http://tizen.org/feature/systemsetting</feature>
2391 /// <feature>http://tizen.org/feature/network.telephony</feature>
2392 /// <exception cref="ArgumentException">Invalid Argument</exception>
2393 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2394 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2395 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2396 /// <since_tizen> 3 </since_tizen>
2397 public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2401 if (s_ultraDataSaveChanged == null)
2403 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2404 if (ret != SystemSettingsError.None)
2406 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2409 s_ultraDataSaveChanged += value;
2414 if (s_ultraDataSaveChanged == null)
2417 s_ultraDataSaveChanged -= value;
2418 if (s_ultraDataSaveChanged == null)
2420 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback);
2421 if (ret != SystemSettingsError.None)
2423 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2429 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2431 string ultraDataSavePackageList = "None";
2432 UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2433 s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2435 private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2437 /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2439 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2440 /// <privlevel>platform</privlevel>
2441 /// <feature>http://tizen.org/feature/systemsetting</feature>
2442 /// <feature>http://tizen.org/feature/network.telephony</feature>
2443 /// <exception cref="ArgumentException">Invalid Argument</exception>
2444 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2445 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2446 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2447 /// <since_tizen> 3 </since_tizen>
2448 public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2452 if (s_ultraDataSavePackageListChanged == null)
2454 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2455 if (ret != SystemSettingsError.None)
2457 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2460 s_ultraDataSavePackageListChanged += value;
2465 if (s_ultraDataSavePackageListChanged == null)
2468 s_ultraDataSavePackageListChanged -= value;
2469 if (s_ultraDataSavePackageListChanged == null)
2471 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback);
2472 if (ret != SystemSettingsError.None)
2474 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2480 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2482 bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2483 AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2484 s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2486 private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2488 /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2490 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2491 /// <privlevel>platform</privlevel>
2492 /// <feature>http://tizen.org/feature/systemsetting</feature>
2493 /// <exception cref="ArgumentException">Invalid Argument</exception>
2494 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2495 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2496 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2497 /// <since_tizen> 4 </since_tizen>
2498 public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2502 if (s_accessibilityTtsChanged == null)
2504 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2505 if (ret != SystemSettingsError.None)
2507 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2510 s_accessibilityTtsChanged += value;
2515 if (s_accessibilityTtsChanged == null)
2518 s_accessibilityTtsChanged -= value;
2519 if (s_accessibilityTtsChanged == null)
2522 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback);
2523 if (ret != SystemSettingsError.None)
2525 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");