[SystemSettings][TCSACR-247][Add] Add RotaryEventEnabled (#895)
[platform/core/csapi/tizenfx.git] / src / Tizen.System.SystemSettings / Tizen.System.SystemSettings / SystemSettings.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18
19 namespace Tizen.System
20 {
21     /// <summary>
22     /// The System Settings API provides APIs for sharing the configuration over a system.
23     /// </summary>
24     /// <remarks>
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.
27     /// </remarks>
28     /// <since_tizen> 3 </since_tizen>
29     public static class SystemSettings
30     {
31         /// <summary>
32         /// The file path of the current ringtone.
33         /// </summary>
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
44         {
45             get
46             {
47                 string filePath;
48                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.IncomingCallRingtone, out filePath);
49                 if (res != SystemSettingsError.None)
50                 {
51                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get IncomingCallRingtone system setting.");
52                 }
53                 return filePath;
54             }
55             set
56             {
57                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.IncomingCallRingtone, value);
58                 if (res != SystemSettingsError.None)
59                 {
60                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set IncomingCallRingtone system setting.");
61                 }
62             }
63         }
64
65         /// <summary>
66         /// The file path of the current home-screen wallpaper.
67         /// </summary>
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
78         {
79             get
80             {
81                 string filePath;
82                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperHomeScreen, out filePath);
83                 if (res != SystemSettingsError.None)
84                 {
85                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperHomeScreen system setting.");
86                 }
87                 return filePath;
88             }
89             set
90             {
91                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperHomeScreen, value);
92                 if (res != SystemSettingsError.None)
93                 {
94                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperHomeScreen system setting.");
95                 }
96             }
97         }
98
99         /// <summary>
100         /// The file path of the current lock-screen wallpaper.
101         /// </summary>
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
112         {
113             get
114             {
115                 string filePath;
116                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperLockScreen, out filePath);
117                 if (res != SystemSettingsError.None)
118                 {
119                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperLockScreen system setting.");
120                 }
121                 return filePath;
122             }
123             set
124             {
125                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperLockScreen, value);
126                 if (res != SystemSettingsError.None)
127                 {
128                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperLockScreen system setting.");
129                 }
130             }
131         }
132
133         /// <summary>
134         /// The current system font size.
135         /// </summary>
136         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
137         /// <privlevel>platform</privlevel>
138         /// <feature>http://tizen.org/feature/systemsetting</feature>
139         /// <feature>http://tizen.org/feature/systemsetting.font</feature>
140         /// <exception cref="ArgumentException">Invalid Argument</exception>
141         /// <exception cref="NotSupportedException">Not Supported feature</exception>
142         /// <exception cref="InvalidOperationException">Invalid operation</exception>
143         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
144         /// <since_tizen> 3 </since_tizen>
145         public static SystemSettingsFontSize FontSize
146         {
147             get
148             {
149                 int fontSize;
150                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.FontSize, out fontSize);
151                 if (res != SystemSettingsError.None)
152                 {
153                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontSize system setting.");
154                 }
155                 return (SystemSettingsFontSize)fontSize;
156             }
157             set
158             {
159                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.FontSize, (int)value);
160                 if (res != SystemSettingsError.None)
161                 {
162                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontSize system setting.");
163                 }
164             }
165         }
166
167         /// <summary>
168         /// The current system font type.
169         /// </summary>
170         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
171         /// <privlevel>platform</privlevel>
172         /// <feature>http://tizen.org/feature/systemsetting</feature>
173         /// <feature>http://tizen.org/feature/systemsetting.font</feature>
174         /// <exception cref="ArgumentException">Invalid Argument</exception>
175         /// <exception cref="NotSupportedException">Not Supported feature</exception>
176         /// <exception cref="InvalidOperationException">Invalid operation</exception>
177         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
178         /// <since_tizen> 3 </since_tizen>
179         public static string FontType
180         {
181             get
182             {
183                 string fontType;
184                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.FontType, out fontType);
185                 if (res != SystemSettingsError.None)
186                 {
187                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontType system setting.");
188                 }
189                 return fontType;
190             }
191             set
192             {
193                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.FontType, value);
194                 if (res != SystemSettingsError.None)
195                 {
196                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontType system setting.");
197                 }
198             }
199         }
200
201         /// <summary>
202         /// Indicates whether the motion service is activated.
203         /// </summary>
204         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
205         /// <privlevel>platform</privlevel>
206         /// <feature>http://tizen.org/feature/systemsetting</feature>
207         /// <exception cref="ArgumentException">Invalid Argument</exception>
208         /// <exception cref="NotSupportedException">Not Supported feature</exception>
209         /// <exception cref="InvalidOperationException">Invalid operation</exception>
210         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
211         /// <since_tizen> 3 </since_tizen>
212         public static bool MotionActivationEnabled
213         {
214             get
215             {
216                 bool isMotionServiceActivated;
217                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated);
218                 if (res != SystemSettingsError.None)
219                 {
220                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionActivation system setting.");
221                 }
222                 return isMotionServiceActivated;
223             }
224             set
225             {
226                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivationEnabled, value);
227                 if (res != SystemSettingsError.None)
228                 {
229                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set MotionActivation system setting.");
230                 }
231             }
232         }
233
234         /// <summary>
235         /// The file path of the current email alert ringtone.
236         /// </summary>
237         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
238         /// <privlevel>platform</privlevel>
239         /// <feature>http://tizen.org/feature/systemsetting</feature>
240         /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
241         /// <exception cref="ArgumentException">Invalid Argument</exception>
242         /// <exception cref="NotSupportedException">Not Supported feature</exception>
243         /// <exception cref="InvalidOperationException">Invalid operation</exception>
244         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
245         /// <since_tizen> 3 </since_tizen>
246         public static string EmailAlertRingtone
247         {
248             get
249             {
250                 string filePath;
251                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.EmailAlertRingtone, out filePath);
252                 if (res != SystemSettingsError.None)
253                 {
254                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get EmailAlertRingtone system setting.");
255                 }
256                 return filePath;
257             }
258             set
259             {
260                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.EmailAlertRingtone, value);
261                 if (res != SystemSettingsError.None)
262                 {
263                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set EmailAlertRingtone system setting.");
264                 }
265             }
266         }
267         /// <summary>
268         /// Indicates whether the USB debugging is enabled.
269         /// </summary>
270         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
271         /// <privlevel>platform</privlevel>
272         /// <feature>http://tizen.org/feature/systemsetting</feature>
273         /// <exception cref="ArgumentException">Invalid Argument</exception>
274         /// <exception cref="NotSupportedException">Not Supported feature</exception>
275         /// <exception cref="InvalidOperationException">Invalid operation</exception>
276         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
277         /// <since_tizen> 3 </since_tizen>
278         public static bool UsbDebuggingEnabled
279         {
280             get
281             {
282                 bool isusbDebuggingEnabled;
283                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, out isusbDebuggingEnabled);
284                 if (res != SystemSettingsError.None)
285                 {
286                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UsbDebuggingEnabled system setting.");
287                 }
288                 return isusbDebuggingEnabled;
289             }
290             set
291             {
292                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, value);
293                 if (res != SystemSettingsError.None)
294                 {
295                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set UsbDebuggingEnabled system setting.");
296                 }
297             }
298         }
299
300         /// <summary>
301         /// Indicates whether the 3G data network is enabled.
302         /// </summary>
303         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
304         /// <privlevel>platform</privlevel>
305         /// <feature>http://tizen.org/feature/systemsetting</feature>
306         /// <exception cref="ArgumentException">Invalid Argument</exception>
307         /// <exception cref="NotSupportedException">Not Supported feature</exception>
308         /// <exception cref="InvalidOperationException">Invalid operation</exception>
309         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
310         /// <since_tizen> 3 </since_tizen>
311         public static bool Data3GNetworkEnabled
312         {
313             get
314             {
315                 bool is3GDataEnabled;
316                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, out is3GDataEnabled);
317                 if (res != SystemSettingsError.None)
318                 {
319                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Data3GNetworkEnabled system setting.");
320                 }
321                 return is3GDataEnabled;
322             }
323             set
324             {
325                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, value);
326                 if (res != SystemSettingsError.None)
327                 {
328                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set Data3GNetworkEnabled system setting.");
329                 }
330             }
331         }
332
333         /// <summary>
334         /// Indicates the lock-screen application package name.
335         /// </summary>
336         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
337         /// <privlevel>platform</privlevel>
338         /// <feature>http://tizen.org/feature/systemsetting</feature>
339         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
340         /// <exception cref="ArgumentException">Invalid Argument</exception>
341         /// <exception cref="NotSupportedException">Not Supported feature</exception>
342         /// <exception cref="InvalidOperationException">Invalid operation</exception>
343         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
344         /// <since_tizen> 4 </since_tizen>
345         public static string LockScreenApp
346         {
347             get
348             {
349                 string pkgName;
350                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LockScreenApp, out pkgName);
351                 if (res != SystemSettingsError.None)
352                 {
353                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockScreenApp system setting.");
354                 }
355                 return pkgName;
356             }
357             set
358             {
359                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LockScreenApp, value);
360                 if (res != SystemSettingsError.None)
361                 {
362                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockScreenApp system setting.");
363                 }
364             }
365         }
366
367         /// <summary>
368         /// The current system default font type (only supports Get).
369         /// </summary>
370         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
371         /// <privlevel>platform</privlevel>
372         /// <feature>http://tizen.org/feature/systemsetting</feature>
373         /// <feature>http://tizen.org/feature/systemsetting.font</feature>
374         /// <exception cref="ArgumentException">Invalid Argument</exception>
375         /// <exception cref="NotSupportedException">Not Supported feature</exception>
376         /// <exception cref="InvalidOperationException">Invalid operation</exception>
377         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
378         /// <since_tizen> 3 </since_tizen>
379         public static string DefaultFontType
380         {
381             get
382             {
383                 string defaultFontType;
384                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DefaultFontType, out defaultFontType);
385                 if (res != SystemSettingsError.None)
386                 {
387                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DefaultFontType system setting value.");
388                 }
389                 return defaultFontType;
390             }
391         }
392
393         /// <summary>
394         /// Indicates the current country setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax.
395         /// The country setting is in the ISO 639-2 format,
396         /// and the region setting is in the ISO 3166-1 alpha-2 format.
397         /// </summary>
398         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
399         /// <privlevel>platform</privlevel>
400         /// <feature>http://tizen.org/feature/systemsetting</feature>
401         /// <exception cref="ArgumentException">Invalid Argument</exception>
402         /// <exception cref="NotSupportedException">Not Supported feature</exception>
403         /// <exception cref="InvalidOperationException">Invalid operation</exception>
404         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
405         /// <since_tizen> 3 </since_tizen>
406         public static string LocaleCountry
407         {
408             get
409             {
410                 string countrySetting;
411                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleCountry, out countrySetting);
412                 if (res != SystemSettingsError.None)
413                 {
414                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleCountry system setting.");
415                 }
416                 return countrySetting;
417             }
418             set
419             {
420                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleCountry, value);
421                 if (res != SystemSettingsError.None)
422                 {
423                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleCountry system setting.");
424                 }
425             }
426         }
427
428         /// <summary>
429         /// Indicates the current language setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax.
430         /// The language setting is in the ISO 639-2 format,
431         /// and the region setting is in the ISO 3166-1 alpha-2 format.
432         /// </summary>
433         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
434         /// <privlevel>platform</privlevel>
435         /// <feature>http://tizen.org/feature/systemsetting</feature>
436         /// <exception cref="ArgumentException">Invalid Argument</exception>
437         /// <exception cref="NotSupportedException">Not Supported feature</exception>
438         /// <exception cref="InvalidOperationException">Invalid operation</exception>
439         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
440         /// <since_tizen> 3 </since_tizen>
441         public static string LocaleLanguage
442         {
443             get
444             {
445                 string languageSetting;
446                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleLanguage, out languageSetting);
447                 if (res != SystemSettingsError.None)
448                 {
449                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleLanguage system setting.");
450                 }
451                 return languageSetting;
452             }
453             set
454             {
455                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleLanguage, value);
456                 if (res != SystemSettingsError.None)
457                 {
458                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleLanguage system setting.");
459                 }
460             }
461         }
462
463         /// <summary>
464         /// Indicates whether the 24-hour clock is used.
465         /// If the value is false, the 12-hour clock is used.
466         /// </summary>
467         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
468         /// <privlevel>platform</privlevel>
469         /// <feature>http://tizen.org/feature/systemsetting</feature>
470         /// <exception cref="ArgumentException">Invalid Argument</exception>
471         /// <exception cref="NotSupportedException">Not Supported feature</exception>
472         /// <exception cref="InvalidOperationException">Invalid operation</exception>
473         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
474         /// <since_tizen> 3 </since_tizen>
475         public static bool LocaleTimeFormat24HourEnabled
476         {
477             get
478             {
479                 bool is24HrFormat;
480                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat);
481                 if (res != SystemSettingsError.None)
482                 {
483                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeFormat24Hour system setting.");
484                 }
485                 return is24HrFormat;
486             }
487             set
488             {
489                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, value);
490                 if (res != SystemSettingsError.None)
491                 {
492                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeFormat24Hour system setting.");
493                 }
494             }
495         }
496
497         /// <summary>
498         /// Indicates the current time zone, for example, Pacific/Tahiti.
499         /// </summary>
500         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
501         /// <privlevel>platform</privlevel>
502         /// <feature>http://tizen.org/feature/systemsetting</feature>
503         /// <exception cref="ArgumentException">Invalid Argument</exception>
504         /// <exception cref="NotSupportedException">Not Supported feature</exception>
505         /// <exception cref="InvalidOperationException">Invalid operation</exception>
506         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
507         /// <since_tizen> 3 </since_tizen>
508         public static string LocaleTimeZone
509         {
510             get
511             {
512                 string timeZone;
513                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone);
514                 if (res != SystemSettingsError.None)
515                 {
516                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeZone system setting.");
517                 }
518                 return timeZone;
519             }
520             set
521             {
522                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimeZone, value);
523                 if (res != SystemSettingsError.None)
524                 {
525                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeZone system setting.");
526                 }
527             }
528         }
529
530         /// <summary>
531         /// Once the system changes time, this event occurs to notify the time change.
532         /// </summary>
533         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
534         /// <privlevel>platform</privlevel>
535         /// <feature>http://tizen.org/feature/systemsetting</feature>
536         /// <exception cref="ArgumentException">Invalid Argument</exception>
537         /// <exception cref="NotSupportedException">Not Supported feature</exception>
538         /// <exception cref="InvalidOperationException">Invalid operation</exception>
539         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
540         /// <since_tizen> 3 </since_tizen>
541         public static int Time
542         {
543             get
544             {
545                 int time;
546                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time);
547                 if (res != SystemSettingsError.None)
548                 {
549                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting.");
550                 }
551                 return time;
552             }
553         }
554         /// <summary>
555         /// Indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound.
556         /// </summary>
557         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
558         /// <privlevel>platform</privlevel>
559         /// <feature>http://tizen.org/feature/systemsetting</feature>
560         /// <exception cref="ArgumentException">Invalid Argument</exception>
561         /// <exception cref="NotSupportedException">Not Supported feature</exception>
562         /// <exception cref="InvalidOperationException">Invalid operation</exception>
563         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
564         /// <since_tizen> 3 </since_tizen>
565         public static bool SoundLockEnabled
566         {
567             get
568             {
569                 bool isSoundLockEnabled;
570                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled);
571                 if (res != SystemSettingsError.None)
572                 {
573                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundLock system setting.");
574                 }
575                 return isSoundLockEnabled;
576             }
577         }
578
579         /// <summary>
580         /// Indicates whether the device is in the silent mode.
581         /// </summary>
582         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
583         /// <privlevel>platform</privlevel>
584         /// <feature>http://tizen.org/feature/systemsetting</feature>
585         /// <exception cref="ArgumentException">Invalid Argument</exception>
586         /// <exception cref="NotSupportedException">Not Supported feature</exception>
587         /// <exception cref="InvalidOperationException">Invalid operation</exception>
588         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
589         /// <since_tizen> 3 </since_tizen>
590         public static bool SoundSilentModeEnabled
591         {
592             get
593             {
594                 bool isSilent;
595                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent);
596                 if (res != SystemSettingsError.None)
597                 {
598                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundSilentMode system setting.");
599                 }
600                 return isSilent;
601             }
602         }
603
604         /// <summary>
605         /// Indicates whether the screen touch sound is enabled on the device.
606         /// </summary>
607         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
608         /// <privlevel>platform</privlevel>
609         /// <feature>http://tizen.org/feature/systemsetting</feature>
610         /// <exception cref="ArgumentException">Invalid Argument</exception>
611         /// <exception cref="NotSupportedException">Not Supported feature</exception>
612         /// <exception cref="InvalidOperationException">Invalid operation</exception>
613         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
614         /// <since_tizen> 3 </since_tizen>
615         public static bool SoundTouchEnabled
616         {
617             get
618             {
619                 bool isTouchSoundEnabled;
620                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled);
621                 if (res != SystemSettingsError.None)
622                 {
623                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundTouch system setting value.");
624                 }
625                 return isTouchSoundEnabled;
626             }
627         }
628
629         /// <summary>
630         /// Indicates whether the rotation control is automatic.
631         /// </summary>
632         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
633         /// <privlevel>platform</privlevel>
634         /// <feature>http://tizen.org/feature/systemsetting</feature>
635         /// <exception cref="ArgumentException">Invalid Argument</exception>
636         /// <exception cref="NotSupportedException">Not Supported feature</exception>
637         /// <exception cref="InvalidOperationException">Invalid operation</exception>
638         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
639         /// <since_tizen> 3 </since_tizen>
640         public static bool DisplayScreenRotationAutoEnabled
641         {
642             get
643             {
644                 bool isRotationAutomatic;
645                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic);
646                 if (res != SystemSettingsError.None)
647                 {
648                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DisplayScreenRotationAuto system setting.");
649                 }
650                 return isRotationAutomatic;
651             }
652         }
653
654         /// <summary>
655         /// Indicates the device name.
656         /// </summary>
657         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
658         /// <privlevel>platform</privlevel>
659         /// <feature>http://tizen.org/feature/systemsetting</feature>
660         /// <exception cref="ArgumentException">Invalid Argument</exception>
661         /// <exception cref="NotSupportedException">Not Supported feature</exception>
662         /// <exception cref="InvalidOperationException">Invalid operation</exception>
663         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
664         /// <since_tizen> 3 </since_tizen>
665         public static string DeviceName
666         {
667             get
668             {
669                 string deviceName;
670                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DeviceName, out deviceName);
671                 if (res != SystemSettingsError.None)
672                 {
673                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DeviceName system setting value.");
674                 }
675                 return deviceName;
676             }
677         }
678         /// <summary>
679         /// Indicates whether the device user has enabled the motion feature.
680         /// </summary>
681         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
682         /// <privlevel>platform</privlevel>
683         /// <feature>http://tizen.org/feature/systemsetting</feature>
684         /// <exception cref="ArgumentException">Invalid Argument</exception>
685         /// <exception cref="NotSupportedException">Not Supported feature</exception>
686         /// <exception cref="InvalidOperationException">Invalid operation</exception>
687         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
688         /// <since_tizen> 3 </since_tizen>
689         public static bool MotionEnabled
690         {
691             get
692             {
693                 bool isMotionEnabled;
694                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionEnabled, out isMotionEnabled);
695                 if (res != SystemSettingsError.None)
696                 {
697                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionEnabled system setting value.");
698                 }
699                 return isMotionEnabled;
700             }
701         }
702
703         /// <summary>
704         /// Indicates whether Wi-Fi related notifications are enabled on the device.
705         /// </summary>
706         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
707         /// <privlevel>platform</privlevel>
708         /// <feature>http://tizen.org/feature/systemsetting</feature>
709         /// <feature>http://tizen.org/feature/network.wifi</feature>
710         /// <exception cref="ArgumentException">Invalid Argument</exception>
711         /// <exception cref="NotSupportedException">Not Supported feature</exception>
712         /// <exception cref="InvalidOperationException">Invalid operation</exception>
713         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
714         /// <since_tizen> 3 </since_tizen>
715         public static bool NetworkWifiNotificationEnabled
716         {
717             get
718             {
719                 bool isWifiNotificationEnabled;
720                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled);
721                 if (res != SystemSettingsError.None)
722                 {
723                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkWifiNotification system setting.");
724                 }
725                 return isWifiNotificationEnabled;
726             }
727         }
728
729         /// <summary>
730         /// Indicates whether the device is in the flight mode.
731         /// </summary>
732         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
733         /// <privlevel>platform</privlevel>
734         /// <feature>http://tizen.org/feature/systemsetting</feature>
735         /// <exception cref="ArgumentException">Invalid Argument</exception>
736         /// <exception cref="NotSupportedException">Not Supported feature</exception>
737         /// <exception cref="InvalidOperationException">Invalid operation</exception>
738         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
739         /// <since_tizen> 3 </since_tizen>
740         public static bool NetworkFlightModeEnabled
741         {
742             get
743             {
744                 bool isFlightModeEnabled;
745                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled);
746                 if (res != SystemSettingsError.None)
747                 {
748                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkFlightMode system setting.");
749                 }
750                 return isFlightModeEnabled;
751             }
752         }
753
754         /// <summary>
755         /// Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600.
756         /// </summary>
757         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
758         /// <privlevel>platform</privlevel>
759         /// <feature>http://tizen.org/feature/systemsetting</feature>
760         /// <exception cref="ArgumentException">Invalid Argument</exception>
761         /// <exception cref="NotSupportedException">Not Supported feature</exception>
762         /// <exception cref="InvalidOperationException">Invalid operation</exception>
763         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
764         /// <since_tizen> 3 </since_tizen>
765         public static int ScreenBacklightTime
766         {
767             get
768             {
769                 int backlightTime;
770                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.ScreenBacklightTime, out backlightTime);
771                 if (res != SystemSettingsError.None)
772                 {
773                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get ScreenBacklightTime system setting.");
774                 }
775                 return backlightTime;
776             }
777             set
778             {
779                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.ScreenBacklightTime, value);
780                 if (res != SystemSettingsError.None)
781                 {
782                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set ScreenBacklightTime system setting.");
783                 }
784             }
785         }
786
787         /// <summary>
788         /// Indicates the file path of the current notification tone set by the user.
789         /// </summary>
790         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
791         /// <privlevel>platform</privlevel>
792         /// <feature>http://tizen.org/feature/systemsetting</feature>
793         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
794         /// <exception cref="ArgumentException">Invalid Argument</exception>
795         /// <exception cref="NotSupportedException">Not Supported feature</exception>
796         /// <exception cref="InvalidOperationException">Invalid operation</exception>
797         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
798         /// <since_tizen> 3 </since_tizen>
799         public static string SoundNotification
800         {
801             get
802             {
803                 string filePath;
804                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.SoundNotification, out filePath);
805                 if (res != SystemSettingsError.None)
806                 {
807                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotification system setting.");
808                 }
809                 return filePath;
810             }
811             set
812             {
813                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.SoundNotification, value);
814                 if (res != SystemSettingsError.None)
815                 {
816                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotification system setting.");
817                 }
818             }
819         }
820
821         /// <summary>
822         /// Indicates the time period for notification repetitions.
823         /// </summary>
824         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
825         /// <privlevel>platform</privlevel>
826         /// <feature>http://tizen.org/feature/systemsetting</feature>
827         /// <exception cref="ArgumentException">Invalid Argument</exception>
828         /// <exception cref="NotSupportedException">Not Supported feature</exception>
829         /// <exception cref="InvalidOperationException">Invalid operation</exception>
830         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
831         /// <since_tizen> 3 </since_tizen>
832         public static int SoundNotificationRepetitionPeriod
833         {
834             get
835             {
836                 int notificationRepetitionPeriod;
837                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, out notificationRepetitionPeriod);
838                 if (res != SystemSettingsError.None)
839                 {
840                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotificationRepetitionPeriod system setting.");
841                 }
842                 return notificationRepetitionPeriod;
843             }
844             set
845             {
846                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, value);
847                 if (res != SystemSettingsError.None)
848                 {
849                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotificationRepetitionPeriod system setting.");
850                 }
851             }
852         }
853
854         /// <summary>
855         /// Indicates the current lock state.
856         /// </summary>
857         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
858         /// <privlevel>platform</privlevel>
859         /// <feature>http://tizen.org/feature/systemsetting</feature>
860         /// <exception cref="ArgumentException">Invalid Argument</exception>
861         /// <exception cref="NotSupportedException">Not Supported feature</exception>
862         /// <exception cref="InvalidOperationException">Invalid operation</exception>
863         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
864         /// <since_tizen> 3 </since_tizen>
865         public static SystemSettingsIdleLockState LockState
866         {
867             get
868             {
869                 int LockState;
870                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.LockState, out LockState);
871                 if (res != SystemSettingsError.None)
872                 {
873                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockState system setting.");
874                 }
875                 return (SystemSettingsIdleLockState)LockState;
876             }
877             set
878             {
879                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.LockState, (int)value);
880                 if (res != SystemSettingsError.None)
881                 {
882                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockState system setting.");
883                 }
884             }
885         }
886
887         /// <summary>
888         /// The current system ADS ID.
889         /// </summary>
890         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
891         /// <privlevel>platform</privlevel>
892         /// <feature>http://tizen.org/feature/systemsetting</feature>
893         /// <exception cref="ArgumentException">Invalid Argument</exception>
894         /// <exception cref="NotSupportedException">Not Supported feature</exception>
895         /// <exception cref="InvalidOperationException">Invalid operation</exception>
896         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
897         /// <since_tizen> 3 </since_tizen>
898         public static string AdsId
899         {
900             get
901             {
902                 string adsId;
903                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId);
904                 if (res != SystemSettingsError.None)
905                 {
906                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AdsId system setting.");
907                 }
908                 return adsId;
909             }
910             set
911             {
912                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.AdsId, value);
913                 if (res != SystemSettingsError.None)
914                 {
915                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AdsId system setting.");
916                 }
917             }
918         }
919
920
921         /// <summary>
922         /// Indicates the time period for notification repetitions.
923         /// </summary>
924         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
925         /// <privlevel>platform</privlevel>
926         /// <feature>http://tizen.org/feature/systemsetting</feature>
927         /// <feature>http://tizen.org/feature/network.telephony</feature>
928         /// <exception cref="ArgumentException">Invalid Argument</exception>
929         /// <exception cref="NotSupportedException">Not Supported feature</exception>
930         /// <exception cref="InvalidOperationException">Invalid operation</exception>
931         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
932         /// <since_tizen> 3 </since_tizen>
933         public static SystemSettingsUdsState UltraDataSave
934         {
935             get
936             {
937                 int UltraDataSave;
938                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave);
939                 if (res != SystemSettingsError.None)
940                 {
941                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UltraDataSave system setting.");
942                 }
943                 return (SystemSettingsUdsState)UltraDataSave;
944             }
945         }
946
947         /// <summary>
948         /// Indicates whether the accessibility TTS is enabled on the device.
949         /// </summary>
950         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
951         /// <privlevel>platform</privlevel>
952         /// <feature>http://tizen.org/feature/systemsetting</feature>
953         /// <exception cref="ArgumentException">Invalid Argument</exception>
954         /// <exception cref="NotSupportedException">Not Supported feature</exception>
955         /// <exception cref="InvalidOperationException">Invalid operation</exception>
956         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
957         /// <since_tizen> 4 </since_tizen>
958         public static bool AccessibilityTtsEnabled
959         {
960             get
961             {
962                 bool isAccessibilityTTSEnabled;
963                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, out isAccessibilityTTSEnabled);
964                 if (res != SystemSettingsError.None)
965                 {
966                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AccessibilityTTS system setting value.");
967                 }
968                 return isAccessibilityTTSEnabled;
969             }
970             set
971             {
972                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, value);
973                 if (res != SystemSettingsError.None)
974                 {
975                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AccessibilityTTS system setting.");
976                 }
977             }
978         }
979
980         /// <summary>
981         /// Indicates whether the vibration is enabled on the device or not.
982         /// </summary>
983         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
984         /// <privlevel>platform</privlevel>
985         /// <feature>http://tizen.org/feature/systemsetting</feature>
986         /// <exception cref="ArgumentException">Invalid Argument</exception>
987         /// <exception cref="NotSupportedException">Not Supported feature</exception>
988         /// <exception cref="InvalidOperationException">Invalid operation</exception>
989         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
990         /// <since_tizen> 5 </since_tizen>
991         public static bool Vibration
992         {
993             get
994             {
995                 bool isVibration;
996                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Vibration, out isVibration);
997                 if (res != SystemSettingsError.None)
998                 {
999                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isVibration system setting.");
1000                 }
1001                 return isVibration;
1002             }
1003             set
1004             {
1005                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Vibration, value);
1006                 if (res != SystemSettingsError.None)
1007                 {
1008                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isVibration system setting.");
1009                 }
1010             }
1011         }
1012
1013         /// <summary>
1014         /// Indicates whether the automatic time update is enabled on the device or not.
1015         /// </summary>
1016         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1017         /// <privlevel>platform</privlevel>
1018         /// <feature>http://tizen.org/feature/systemsetting</feature>
1019         /// <feature>http://tizen.org/feature/network.telephony</feature>
1020         /// <exception cref="ArgumentException">Invalid Argument</exception>
1021         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1022         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1023         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1024         /// <since_tizen> 5 </since_tizen>
1025         public static bool AutomaticTimeUpdate
1026         {
1027             get
1028             {
1029                 bool isAutomaticTimeUpdate;
1030                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, out isAutomaticTimeUpdate);
1031                 if (res != SystemSettingsError.None)
1032                 {
1033                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAutomaticTimeUpdate system setting.");
1034                 }
1035                 return isAutomaticTimeUpdate;
1036             }
1037             set
1038             {
1039                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, value);
1040                 if (res != SystemSettingsError.None)
1041                 {
1042                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAutomaticTimeUpdate system setting.");
1043                 }
1044             }
1045         }
1046
1047         /// <summary>
1048         /// Indicates whether the developer option state is enabled on the device or not.
1049         /// </summary>
1050         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1051         /// <privlevel>platform</privlevel>
1052         /// <feature>http://tizen.org/feature/systemsetting</feature>
1053         /// <exception cref="ArgumentException">Invalid Argument</exception>
1054         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1055         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1056         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1057         /// <since_tizen> 5 </since_tizen>
1058         public static bool DeveloperOptionState
1059         {
1060             get
1061             {
1062                 bool isDeveloperOptionState;
1063                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DeveloperOptionState, out isDeveloperOptionState);
1064                 if (res != SystemSettingsError.None)
1065                 {
1066                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isDeveloperOptionState system setting.");
1067                 }
1068                 return isDeveloperOptionState;
1069             }
1070             set
1071             {
1072                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.DeveloperOptionState, value);
1073                 if (res != SystemSettingsError.None)
1074                 {
1075                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isDeveloperOptionState system setting.");
1076                 }
1077             }
1078         }
1079
1080         /// <summary>
1081         /// Indicates whether accessibility grayscale is enabled on the device or not.
1082         /// </summary>
1083         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1084         /// <privlevel>platform</privlevel>
1085         /// <feature>http://tizen.org/feature/systemsetting</feature>
1086         /// <feature>http://tizen.org/feature/accessibility.grayscale</feature>
1087         /// <exception cref="ArgumentException">Invalid Argument</exception>
1088         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1089         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1090         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1091         /// <since_tizen> 6 </since_tizen>
1092         public static bool AccessibilityGrayscale
1093         {
1094             get
1095             {
1096                 bool isAccessibilityGrayscale;
1097                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityGrayscale, out isAccessibilityGrayscale);
1098                 if (res != SystemSettingsError.None)
1099                 {
1100                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAccessibilityGrayscale system setting.");
1101                 }
1102                 return isAccessibilityGrayscale;
1103             }
1104             set
1105             {
1106                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AccessibilityGrayscale, value);
1107                 if (res != SystemSettingsError.None)
1108                 {
1109                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAccessibilityGrayscale system setting.");
1110                 }
1111             }
1112         }
1113
1114         /// <summary>
1115         /// Indicates whether accessibility negative color is enabled on the device or not.
1116         /// </summary>
1117         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1118         /// <privlevel>platform</privlevel>
1119         /// <feature>http://tizen.org/feature/systemsetting</feature>
1120         /// <feature>http://tizen.org/feature/accessibility.negative</feature>
1121         /// <exception cref="ArgumentException">Invalid Argument</exception>
1122         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1123         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1124         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1125         /// <since_tizen> 6 </since_tizen>
1126         public static bool AccessibilityNegativeColor
1127         {
1128             get
1129             {
1130                 bool isAccessibilityNegativeColor;
1131                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityNegativeColor, out isAccessibilityNegativeColor);
1132                 if (res != SystemSettingsError.None)
1133                 {
1134                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAccessibilityNegativeColor system setting.");
1135                 }
1136                 return isAccessibilityNegativeColor;
1137             }
1138             set
1139             {
1140                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AccessibilityNegativeColor, value);
1141                 if (res != SystemSettingsError.None)
1142                 {
1143                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAccessibilityNegativeColor system setting.");
1144                 }
1145             }
1146         }
1147
1148         /// <summary>
1149         /// Indicates whether rotary event is enabled on the device.
1150         /// </summary>
1151         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1152         /// <privlevel>platform</privlevel>
1153         /// <feature>http://tizen.org/feature/systemsetting</feature>
1154         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1155         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1156         /// <remarks>
1157         /// http://tizen.org/privilege/systemsettings.admin is needed only for setting value. When getting the value, it isn't needed.
1158         /// </remarks>
1159         /// <since_tizen> 6 </since_tizen>
1160         public static bool RotaryEventEnabled
1161         {
1162             get
1163             {
1164                 bool isRotaryEventEnabled;
1165                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.RotaryEventEnabled, out isRotaryEventEnabled);
1166                 if (res != SystemSettingsError.None)
1167                 {
1168                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isRotaryEventEnabled system setting.");
1169                 }
1170                 return isRotaryEventEnabled;
1171             }
1172             set
1173             {
1174                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.RotaryEventEnabled, value);
1175                 if (res != SystemSettingsError.None)
1176                 {
1177                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isRotaryEventEnabled system setting.");
1178                 }
1179             }
1180         }
1181
1182         private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1183         {
1184             string path = SystemSettings.IncomingCallRingtone;
1185             IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
1186             s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
1187         };
1188         private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
1189         /// <summary>
1190         /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
1191         /// </summary>
1192         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1193         /// <privlevel>platform</privlevel>
1194         /// <feature>http://tizen.org/feature/systemsetting</feature>
1195         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
1196         /// <exception cref="ArgumentException">Invalid Argument</exception>
1197         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1198         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1199         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1200         /// <since_tizen> 3 </since_tizen>
1201         public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
1202         {
1203             add
1204             {
1205                 if (s_incomingCallRingtoneChanged == null)
1206                 {
1207                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
1208                     if (ret != SystemSettingsError.None)
1209                     {
1210                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1211                     }
1212                 }
1213                 s_incomingCallRingtoneChanged += value;
1214             }
1215
1216             remove
1217             {
1218                 if (s_incomingCallRingtoneChanged == null) {
1219                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1220                     return;
1221                 }
1222                 s_incomingCallRingtoneChanged -= value;
1223                 if (s_incomingCallRingtoneChanged == null)
1224                 {
1225                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback);
1226                     if (ret != SystemSettingsError.None)
1227                     {
1228                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1229                     }
1230                 }
1231             }
1232         }
1233
1234         private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1235         {
1236             string path = SystemSettings.WallpaperHomeScreen;
1237             WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1238             s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1239         };
1240         private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1241         /// <summary>
1242         /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1243         /// </summary>
1244         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1245         /// <privlevel>platform</privlevel>
1246         /// <feature>http://tizen.org/feature/systemsetting</feature>
1247         /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1248         /// <exception cref="ArgumentException">Invalid Argument</exception>
1249         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1250         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1251         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1252         /// <since_tizen> 3 </since_tizen>
1253         public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1254         {
1255             add
1256             {
1257                 if (s_wallpaperHomeScreenChanged == null)
1258                 {
1259                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1260                     if (ret != SystemSettingsError.None)
1261                     {
1262                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1263                     }
1264                 }
1265                 s_wallpaperHomeScreenChanged += value;
1266             }
1267
1268             remove
1269             {
1270                 if (s_wallpaperHomeScreenChanged == null) {
1271                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1272                     return;
1273                 }
1274                 s_wallpaperHomeScreenChanged -= value;
1275                 if (s_wallpaperHomeScreenChanged == null)
1276                 {
1277                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback);
1278                     if (ret != SystemSettingsError.None)
1279                     {
1280                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1281                     }
1282                 }
1283             }
1284         }
1285
1286         private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1287         {
1288             string path = SystemSettings.WallpaperLockScreen;
1289             WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1290             s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1291         };
1292         private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1293         /// <summary>
1294         /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1295         /// </summary>
1296         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1297         /// <privlevel>platform</privlevel>
1298         /// <feature>http://tizen.org/feature/systemsetting</feature>
1299         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1300         /// <exception cref="ArgumentException">Invalid Argument</exception>
1301         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1302         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1303         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1304         /// <since_tizen> 3 </since_tizen>
1305         public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1306         {
1307             add
1308             {
1309                 if (s_wallpaperLockScreenChanged == null)
1310                 {
1311                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1312                     if (ret != SystemSettingsError.None)
1313                     {
1314                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1315                     }
1316                 }
1317                 s_wallpaperLockScreenChanged += value;
1318             }
1319
1320             remove
1321             {
1322                 if (s_wallpaperLockScreenChanged == null) {
1323                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1324                     return;
1325                 }
1326                 s_wallpaperLockScreenChanged -= value;
1327                 if (s_wallpaperLockScreenChanged == null)
1328                 {
1329                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback);
1330                     if (ret != SystemSettingsError.None)
1331                     {
1332                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1333                     }
1334                 }
1335             }
1336         }
1337
1338         private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1339         {
1340             SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1341             FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1342             s_fontSizeChanged?.Invoke(null, eventArgs);
1343         };
1344         private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1345         /// <summary>
1346         /// The FontSizeChanged event is triggered when the current system font size is changed.
1347         /// </summary>
1348         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1349         /// <privlevel>platform</privlevel>
1350         /// <feature>http://tizen.org/feature/systemsetting</feature>
1351         /// <exception cref="ArgumentException">Invalid Argument</exception>
1352         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1353         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1354         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1355         /// <since_tizen> 3 </since_tizen>
1356         public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1357         {
1358             add
1359             {
1360                 if (s_fontSizeChanged == null)
1361                 {
1362                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1363                     if (ret != SystemSettingsError.None)
1364                     {
1365                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1366                     }
1367                 }
1368                 s_fontSizeChanged += value;
1369             }
1370
1371             remove
1372             {
1373                 if (s_fontSizeChanged == null) {
1374                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1375                     return;
1376                 }
1377                 s_fontSizeChanged -= value;
1378                 if (s_fontSizeChanged == null)
1379                 {
1380                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback);
1381                     if (ret != SystemSettingsError.None)
1382                     {
1383                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1384                     }
1385                 }
1386             }
1387         }
1388
1389         private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1390         {
1391             string fontType = SystemSettings.FontType;
1392             FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1393             s_fontTypeChanged?.Invoke(null, eventArgs);
1394         };
1395         private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1396         /// <summary>
1397         /// The FontTypeChanged event is triggered when the current system font type is changed.
1398         /// </summary>
1399         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1400         /// <privlevel>platform</privlevel>
1401         /// <feature>http://tizen.org/feature/systemsetting</feature>
1402         /// <exception cref="ArgumentException">Invalid Argument</exception>
1403         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1404         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1405         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1406         /// <since_tizen> 3 </since_tizen>
1407         public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1408         {
1409             add
1410             {
1411                 if (s_fontTypeChanged == null)
1412                 {
1413                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1414                     if (ret != SystemSettingsError.None)
1415                     {
1416                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1417                     }
1418                 }
1419                 s_fontTypeChanged += value;
1420             }
1421
1422             remove
1423             {
1424                 if (s_fontTypeChanged == null) {
1425                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1426                     return;
1427                 }
1428                 s_fontTypeChanged -= value;
1429                 if (s_fontTypeChanged == null)
1430                 {
1431                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback);
1432                     if (ret != SystemSettingsError.None)
1433                     {
1434                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1435                     }
1436                 }
1437             }
1438         }
1439
1440         private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1441         {
1442             bool motionActivation = SystemSettings.MotionActivationEnabled;
1443             MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1444             s_motionActivationChanged?.Invoke(null, eventArgs);
1445         };
1446         private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1447         /// <summary>
1448         /// The MotionActivationChanged event is triggered when the motion service status is changed.
1449         /// </summary>
1450         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1451         /// <privlevel>platform</privlevel>
1452         /// <feature>http://tizen.org/feature/systemsetting</feature>
1453         /// <exception cref="ArgumentException">Invalid Argument</exception>
1454         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1455         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1456         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1457         /// <since_tizen> 3 </since_tizen>
1458         public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1459         {
1460             add
1461             {
1462                 if (s_motionActivationChanged == null)
1463                 {
1464                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1465                     if (ret != SystemSettingsError.None)
1466                     {
1467                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1468                     }
1469                 }
1470                 s_motionActivationChanged += value;
1471             }
1472
1473             remove
1474             {
1475                 if (s_motionActivationChanged == null) {
1476                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1477                     return;
1478                 }
1479                 s_motionActivationChanged -= value;
1480                 if (s_motionActivationChanged == null)
1481                 {
1482                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback);
1483                     if (ret != SystemSettingsError.None)
1484                     {
1485                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1486                     }
1487                 }
1488             }
1489         }
1490
1491         private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1492         {
1493             string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1494             EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1495             s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1496         };
1497         private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1498         /// <summary>
1499         /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1500         /// </summary>
1501         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1502         /// <privlevel>platform</privlevel>
1503         /// <feature>http://tizen.org/feature/systemsetting</feature>
1504         /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1505         /// <exception cref="ArgumentException">Invalid Argument</exception>
1506         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1507         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1508         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1509         /// <since_tizen> 3 </since_tizen>
1510         public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1511         {
1512             add
1513             {
1514                 if (s_emailAlertRingtoneChanged == null)
1515                 {
1516                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1517                     if (ret != SystemSettingsError.None)
1518                     {
1519                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1520                     }
1521                 }
1522                 s_emailAlertRingtoneChanged += value;
1523             }
1524
1525             remove
1526             {
1527                 if (s_emailAlertRingtoneChanged == null) {
1528                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1529                     return;
1530                 }
1531                 s_emailAlertRingtoneChanged -= value;
1532                 if (s_emailAlertRingtoneChanged == null)
1533                 {
1534                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback);
1535                     if (ret != SystemSettingsError.None)
1536                     {
1537                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1538                     }
1539                 }
1540             }
1541         }
1542
1543         private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1544         {
1545             bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1546             UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1547             s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1548         };
1549         private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1550         /// <summary>
1551         /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1552         /// </summary>
1553         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1554         /// <privlevel>platform</privlevel>
1555         /// <feature>http://tizen.org/feature/systemsetting</feature>
1556         /// <exception cref="ArgumentException">Invalid Argument</exception>
1557         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1558         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1559         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1560         /// <since_tizen> 3 </since_tizen>
1561         public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1562         {
1563             add
1564             {
1565                 if (s_usbDebuggingSettingChanged == null)
1566                 {
1567                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1568                     if (ret != SystemSettingsError.None)
1569                     {
1570                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1571                     }
1572                 }
1573                 s_usbDebuggingSettingChanged += value;
1574             }
1575
1576             remove
1577             {
1578                 if (s_usbDebuggingSettingChanged == null) {
1579                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1580                     return;
1581                 }
1582                 s_usbDebuggingSettingChanged -= value;
1583                 if (s_usbDebuggingSettingChanged == null)
1584                 {
1585                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback);
1586                     if (ret != SystemSettingsError.None)
1587                     {
1588                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1589                     }
1590                 }
1591             }
1592         }
1593
1594         private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1595         {
1596             bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1597             Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1598             s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1599         };
1600         private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1601         /// <summary>
1602         /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1603         /// </summary>
1604         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1605         /// <privlevel>platform</privlevel>
1606         /// <feature>http://tizen.org/feature/systemsetting</feature>
1607         /// <exception cref="ArgumentException">Invalid Argument</exception>
1608         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1609         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1610         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1611         /// <since_tizen> 3 </since_tizen>
1612         public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1613         {
1614             add
1615             {
1616                 if (s_data3GNetworkSettingChanged == null)
1617                 {
1618                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1619                     if (ret != SystemSettingsError.None)
1620                     {
1621                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1622                     }
1623                 }
1624                 s_data3GNetworkSettingChanged += value;
1625             }
1626
1627             remove
1628             {
1629                 if (s_data3GNetworkSettingChanged == null) {
1630                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1631                     return;
1632                 }
1633                 s_data3GNetworkSettingChanged -= value;
1634                 if (s_data3GNetworkSettingChanged == null)
1635                 {
1636                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback);
1637                     if (ret != SystemSettingsError.None)
1638                     {
1639                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1640                     }
1641                 }
1642             }
1643         }
1644
1645         private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1646         {
1647             string lockScreenApp = SystemSettings.LockScreenApp;
1648             LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1649             s_lockscreenAppChanged?.Invoke(null, eventArgs);
1650         };
1651         private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1652         /// <summary>
1653         /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1654         /// </summary>
1655         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1656         /// <privlevel>platform</privlevel>
1657         /// <feature>http://tizen.org/feature/systemsetting</feature>
1658         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1659         /// <exception cref="ArgumentException">Invalid Argument</exception>
1660         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1661         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1662         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1663         /// <since_tizen> 4 </since_tizen>
1664         public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1665         {
1666             add
1667             {
1668                 if (s_lockscreenAppChanged == null)
1669                 {
1670                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1671                     if (ret != SystemSettingsError.None)
1672                     {
1673                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1674                     }
1675                 }
1676                 s_lockscreenAppChanged += value;
1677             }
1678
1679             remove
1680             {
1681                 if (s_lockscreenAppChanged == null) {
1682                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1683                     return;
1684                 }
1685
1686                 s_lockscreenAppChanged -= value;
1687                 if (s_lockscreenAppChanged == null)
1688                 {
1689                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback);
1690                     if (ret != SystemSettingsError.None)
1691                     {
1692                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1693                     }
1694                 }
1695             }
1696         }
1697
1698         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1699         {
1700             string localeCountry = SystemSettings.LocaleCountry;
1701             LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1702             s_localeCountryChanged?.Invoke(null, eventArgs);
1703         };
1704         private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1705         /// <summary>
1706         /// The LocaleCountryChanged event is triggered when the current country setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax, is changed.
1707         /// </summary>
1708         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1709         /// <privlevel>platform</privlevel>
1710         /// <feature>http://tizen.org/feature/systemsetting</feature>
1711         /// <exception cref="ArgumentException">Invalid Argument</exception>
1712         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1713         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1714         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1715         /// <since_tizen> 3 </since_tizen>
1716         public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1717         {
1718             add
1719             {
1720                 if (s_localeCountryChanged == null)
1721                 {
1722                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1723                     if (ret != SystemSettingsError.None)
1724                     {
1725                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1726                     }
1727                 }
1728                 s_localeCountryChanged += value;
1729             }
1730
1731             remove
1732             {
1733                 if (s_localeCountryChanged == null) {
1734                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1735                     return;
1736                 }
1737                 s_localeCountryChanged -= value;
1738                 if (s_localeCountryChanged == null)
1739                 {
1740                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback);
1741                     if (ret != SystemSettingsError.None)
1742                     {
1743                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1744                     }
1745                 }
1746             }
1747         }
1748
1749         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1750         {
1751             string localeLanguage = SystemSettings.LocaleLanguage;
1752             LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1753             s_localeLanguageChanged?.Invoke(null, eventArgs);
1754         };
1755         private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1756         /// <summary>
1757         /// The LocaleLanguageChanged event is triggered when the current language setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax, is changed.
1758         /// </summary>
1759         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1760         /// <privlevel>platform</privlevel>
1761         /// <feature>http://tizen.org/feature/systemsetting</feature>
1762         /// <exception cref="ArgumentException">Invalid Argument</exception>
1763         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1764         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1765         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1766         /// <since_tizen> 3 </since_tizen>
1767         public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1768         {
1769             add
1770             {
1771                 if (s_localeLanguageChanged == null)
1772                 {
1773                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1774                     if (ret != SystemSettingsError.None)
1775                     {
1776                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1777                     }
1778                 }
1779                 s_localeLanguageChanged += value;
1780             }
1781
1782             remove
1783             {
1784                 if (s_localeLanguageChanged == null) {
1785                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1786                     return;
1787                 }
1788                 s_localeLanguageChanged -= value;
1789                 if (s_localeLanguageChanged == null)
1790                 {
1791                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback);
1792                     if (ret != SystemSettingsError.None)
1793                     {
1794                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1795                     }
1796                 }
1797             }
1798         }
1799
1800         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1801         {
1802             bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1803             LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1804             s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1805         };
1806         private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1807         /// <summary>
1808         /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1809         /// </summary>
1810         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1811         /// <privlevel>platform</privlevel>
1812         /// <feature>http://tizen.org/feature/systemsetting</feature>
1813         /// <exception cref="ArgumentException">Invalid Argument</exception>
1814         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1815         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1816         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1817         /// <since_tizen> 3 </since_tizen>
1818         public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1819         {
1820             add
1821             {
1822                 if (s_localeTimeFormat24HourChanged == null)
1823                 {
1824                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1825                     if (ret != SystemSettingsError.None)
1826                     {
1827                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1828                     }
1829                 }
1830                 s_localeTimeFormat24HourChanged += value;
1831             }
1832
1833             remove
1834             {
1835                 if (s_localeTimeFormat24HourChanged == null) {
1836                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1837                     return;
1838                 }
1839                 s_localeTimeFormat24HourChanged -= value;
1840                 if (s_localeTimeFormat24HourChanged == null)
1841                 {
1842                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback);
1843                     if (ret != SystemSettingsError.None)
1844                     {
1845                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1846                     }
1847                 }
1848             }
1849         }
1850
1851         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1852         {
1853             string localeTimeZone = SystemSettings.LocaleTimeZone;
1854             LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1855             s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1856         };
1857         private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1858         /// <summary>
1859         /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1860         /// </summary>
1861         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1862         /// <privlevel>platform</privlevel>
1863         /// <feature>http://tizen.org/feature/systemsetting</feature>
1864         /// <exception cref="ArgumentException">Invalid Argument</exception>
1865         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1866         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1867         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1868         /// <since_tizen> 3 </since_tizen>
1869         public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1870         {
1871             add
1872             {
1873                 if (s_localeTimeZoneChanged == null)
1874                 {
1875                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1876                     if (ret != SystemSettingsError.None)
1877                     {
1878                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1879                     }
1880                 }
1881                 s_localeTimeZoneChanged += value;
1882             }
1883
1884             remove
1885             {
1886                 if (s_localeTimeZoneChanged == null) {
1887                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1888                     return;
1889                 }
1890                 s_localeTimeZoneChanged -= value;
1891                 if (s_localeTimeZoneChanged == null)
1892                 {
1893                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback);
1894                     if (ret != SystemSettingsError.None)
1895                     {
1896                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1897                     }
1898                 }
1899             }
1900         }
1901
1902         private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1903         {
1904
1905             int time = SystemSettings.Time;
1906             TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1907             s_timeChanged?.Invoke(null, eventArgs);
1908         };
1909         private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1910         /// <summary>
1911         /// The TimeChanged event is triggered when the system time is changed.
1912         /// </summary>
1913         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1914         /// <privlevel>platform</privlevel>
1915         /// <feature>http://tizen.org/feature/systemsetting</feature>
1916         /// <exception cref="ArgumentException">Invalid Argument</exception>
1917         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1918         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1919         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1920         /// <since_tizen> 3 </since_tizen>
1921         public static event EventHandler<TimeChangedEventArgs> TimeChanged
1922         {
1923             add
1924             {
1925                 if (s_timeChanged == null)
1926                 {
1927                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1928                     if (ret != SystemSettingsError.None)
1929                     {
1930                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1931                     }
1932                 }
1933                 s_timeChanged += value;
1934             }
1935
1936             remove
1937             {
1938                 if (s_timeChanged == null) {
1939                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1940                     return;
1941                 }
1942                 s_timeChanged -= value;
1943                 if (s_timeChanged == null)
1944                 {
1945                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time, s_timeChangedCallback);
1946                     if (ret != SystemSettingsError.None)
1947                     {
1948                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1949                     }
1950                 }
1951             }
1952         }
1953
1954         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1955         {
1956             bool soundLock = SystemSettings.SoundLockEnabled;
1957             SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1958             s_soundLockChanged?.Invoke(null, eventArgs);
1959         };
1960         private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1961         /// <summary>
1962         /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1963         /// </summary>
1964         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1965         /// <privlevel>platform</privlevel>
1966         /// <feature>http://tizen.org/feature/systemsetting</feature>
1967         /// <exception cref="ArgumentException">Invalid Argument</exception>
1968         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1969         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1970         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1971         /// <since_tizen> 3 </since_tizen>
1972         public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1973         {
1974             add
1975             {
1976                 if (s_soundLockChanged == null)
1977                 {
1978                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1979                     if (ret != SystemSettingsError.None)
1980                     {
1981                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1982                     }
1983                 }
1984                 s_soundLockChanged += value;
1985             }
1986
1987             remove
1988             {
1989                 if (s_soundLockChanged == null) {
1990                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1991                     return;
1992                 }
1993                 s_soundLockChanged -= value;
1994                 if (s_soundLockChanged == null)
1995                 {
1996                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback);
1997                     if (ret != SystemSettingsError.None)
1998                     {
1999                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2000                     }
2001                 }
2002             }
2003         }
2004
2005         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2006         {
2007             bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
2008             SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
2009             s_soundSilentModeChanged?.Invoke(null, eventArgs);
2010         };
2011         private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
2012         /// <summary>
2013         /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
2014         /// </summary>
2015         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2016         /// <privlevel>platform</privlevel>
2017         /// <feature>http://tizen.org/feature/systemsetting</feature>
2018         /// <exception cref="ArgumentException">Invalid Argument</exception>
2019         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2020         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2021         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2022         /// <since_tizen> 3 </since_tizen>
2023         public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
2024         {
2025             add
2026             {
2027                 if (s_soundSilentModeChanged == null)
2028                 {
2029                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
2030                     if (ret != SystemSettingsError.None)
2031                     {
2032                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2033                     }
2034                 }
2035                 s_soundSilentModeChanged += value;
2036             }
2037
2038             remove
2039             {
2040                 if (s_soundSilentModeChanged == null) {
2041                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2042                     return;
2043                 }
2044                 s_soundSilentModeChanged -= value;
2045                 if (s_soundSilentModeChanged == null)
2046                 {
2047                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback);
2048                     if (ret != SystemSettingsError.None)
2049                     {
2050                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2051                     }
2052                 }
2053             }
2054         }
2055
2056         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2057         {
2058             bool soundTouch = SystemSettings.SoundTouchEnabled;
2059             SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
2060             s_soundTouchChanged?.Invoke(null, eventArgs);
2061         };
2062         private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
2063         /// <summary>
2064         /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
2065         /// </summary>
2066         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2067         /// <privlevel>platform</privlevel>
2068         /// <feature>http://tizen.org/feature/systemsetting</feature>
2069         /// <exception cref="ArgumentException">Invalid Argument</exception>
2070         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2071         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2072         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2073         /// <since_tizen> 3 </since_tizen>
2074         public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
2075         {
2076             add
2077             {
2078                 if (s_soundTouchChanged == null)
2079                 {
2080                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
2081                     if (ret != SystemSettingsError.None)
2082                     {
2083                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2084                     }
2085                 }
2086                 s_soundTouchChanged += value;
2087             }
2088
2089             remove
2090             {
2091                 if (s_soundTouchChanged == null) {
2092                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2093                     return;
2094                 }
2095                 s_soundTouchChanged -= value;
2096                 if (s_soundTouchChanged == null)
2097
2098                 {
2099                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback);
2100                     if (ret != SystemSettingsError.None)
2101                     {
2102                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2103                     }
2104                 }
2105             }
2106         }
2107
2108         private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2109         {
2110             bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
2111             DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
2112             s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
2113         };
2114         private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
2115         /// <summary>
2116         /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
2117         /// </summary>
2118         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2119         /// <privlevel>platform</privlevel>
2120         /// <feature>http://tizen.org/feature/systemsetting</feature>
2121         /// <exception cref="ArgumentException">Invalid Argument</exception>
2122         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2123         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2124         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2125         /// <since_tizen> 3 </since_tizen>
2126         public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
2127         {
2128             add
2129             {
2130                 if (s_displayScreenRotationAutoChanged == null)
2131                 {
2132                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
2133                     if (ret != SystemSettingsError.None)
2134                     {
2135                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2136                     }
2137                 }
2138                 s_displayScreenRotationAutoChanged += value;
2139             }
2140
2141             remove
2142             {
2143                 if (s_displayScreenRotationAutoChanged == null) {
2144                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2145                     return;
2146                 }
2147                 s_displayScreenRotationAutoChanged -= value;
2148                 if (s_displayScreenRotationAutoChanged == null)
2149                 {
2150                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback);
2151                     if (ret != SystemSettingsError.None)
2152                     {
2153                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2154                     }
2155                 }
2156             }
2157         }
2158
2159         private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2160         {
2161             string deviceName = SystemSettings.DeviceName;
2162             DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
2163             s_deviceNameChanged?.Invoke(null, eventArgs);
2164         };
2165         private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
2166         /// <summary>
2167         /// The DeviceNameChanged event is triggered when the device name is changed.
2168         /// </summary>
2169         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2170         /// <privlevel>platform</privlevel>
2171         /// <feature>http://tizen.org/feature/systemsetting</feature>
2172         /// <exception cref="ArgumentException">Invalid Argument</exception>
2173         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2174         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2175         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2176         /// <since_tizen> 3 </since_tizen>
2177         public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
2178         {
2179             add
2180             {
2181                 if (s_deviceNameChanged == null)
2182                 {
2183                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
2184                     if (ret != SystemSettingsError.None)
2185                     {
2186                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2187                     }
2188                 }
2189                 s_deviceNameChanged += value;
2190             }
2191
2192             remove
2193             {
2194                 if (s_deviceNameChanged == null) {
2195                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2196                     return;
2197                 }
2198                 s_deviceNameChanged -= value;
2199                 if (s_deviceNameChanged == null)
2200                 {
2201                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback);
2202                     if (ret != SystemSettingsError.None)
2203                     {
2204                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2205                     }
2206                 }
2207             }
2208         }
2209
2210         private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2211         {
2212             bool motionEnabled = SystemSettings.MotionEnabled;
2213             MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
2214             s_motionSettingChanged?.Invoke(null, eventArgs);
2215         };
2216         private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
2217         /// <summary>
2218         /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
2219         /// </summary>
2220         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2221         /// <privlevel>platform</privlevel>
2222         /// <feature>http://tizen.org/feature/systemsetting</feature>
2223         /// <exception cref="ArgumentException">Invalid Argument</exception>
2224         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2225         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2226         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2227         /// <since_tizen> 3 </since_tizen>
2228         public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
2229         {
2230             add
2231             {
2232                 if (s_motionSettingChanged == null)
2233                 {
2234                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
2235                     if (ret != SystemSettingsError.None)
2236                     {
2237                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2238                     }
2239                 }
2240                 s_motionSettingChanged += value;
2241             }
2242
2243             remove
2244             {
2245                 if (s_motionSettingChanged == null) {
2246                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2247                     return;
2248                 }
2249                 s_motionSettingChanged -= value;
2250                 if (s_motionSettingChanged == null)
2251                 {
2252                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback);
2253                     if (ret != SystemSettingsError.None)
2254                     {
2255                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2256                     }
2257                 }
2258             }
2259         }
2260
2261         private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2262         {
2263             bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
2264             NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
2265             s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
2266         };
2267         private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
2268         /// <summary>
2269         /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
2270         /// </summary>
2271         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2272         /// <privlevel>platform</privlevel>
2273         /// <feature>http://tizen.org/feature/systemsetting</feature>
2274         /// <feature>http://tizen.org/feature/network.wifi</feature>
2275         /// <exception cref="ArgumentException">Invalid Argument</exception>
2276         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2277         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2278         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2279         /// <since_tizen> 3 </since_tizen>
2280         public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
2281         {
2282             add
2283             {
2284                 if (s_networkWifiNotificationChanged == null)
2285                 {
2286                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
2287                     if (ret != SystemSettingsError.None)
2288                     {
2289                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2290                     }
2291                 }
2292                 s_networkWifiNotificationChanged += value;
2293             }
2294
2295             remove
2296             {
2297                 if (s_networkWifiNotificationChanged == null) {
2298                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2299                     return;
2300                 }
2301                 s_networkWifiNotificationChanged -= value;
2302                 if (s_networkWifiNotificationChanged == null)
2303                 {
2304                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback);
2305                     if (ret != SystemSettingsError.None)
2306                     {
2307                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2308                     }
2309                 }
2310             }
2311         }
2312
2313         private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2314         {
2315             bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2316             NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2317             s_networkFlightModeChanged?.Invoke(null, eventArgs);
2318         };
2319         private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2320         /// <summary>
2321         /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2322         /// </summary>
2323         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2324         /// <privlevel>platform</privlevel>
2325         /// <feature>http://tizen.org/feature/systemsetting</feature>
2326         /// <exception cref="ArgumentException">Invalid Argument</exception>
2327         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2328         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2329         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2330         /// <since_tizen> 3 </since_tizen>
2331         public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2332         {
2333             add
2334             {
2335                 if (s_networkFlightModeChanged == null)
2336                 {
2337                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2338                     if (ret != SystemSettingsError.None)
2339                     {
2340                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2341                     }
2342                 }
2343                 s_networkFlightModeChanged += value;
2344             }
2345
2346             remove
2347             {
2348                 if (s_networkFlightModeChanged == null) {
2349                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2350                     return;
2351                 }
2352                 s_networkFlightModeChanged -= value;
2353                 if (s_networkFlightModeChanged == null)
2354                 {
2355                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback);
2356                     if (ret != SystemSettingsError.None)
2357                     {
2358                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2359                     }
2360                 }
2361             }
2362         }
2363
2364         private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2365         {
2366             int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2367             ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2368             s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2369         };
2370         private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2371         /// <summary>
2372         /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2373         /// </summary>
2374         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2375         /// <privlevel>platform</privlevel>
2376         /// <feature>http://tizen.org/feature/systemsetting</feature>
2377         /// <exception cref="ArgumentException">Invalid Argument</exception>
2378         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2379         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2380         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2381         /// <since_tizen> 3 </since_tizen>
2382         public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2383         {
2384             add
2385             {
2386                 if (s_screenBacklightTimeChanged == null)
2387                 {
2388                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2389                     if (ret != SystemSettingsError.None)
2390                     {
2391                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2392                     }
2393                 }
2394                 s_screenBacklightTimeChanged += value;
2395             }
2396
2397             remove
2398             {
2399                 if (s_screenBacklightTimeChanged == null) {
2400                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2401                     return;
2402                 }
2403                 s_screenBacklightTimeChanged -= value;
2404                 if (s_screenBacklightTimeChanged == null)
2405                 {
2406                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback);
2407                     if (ret != SystemSettingsError.None)
2408                     {
2409                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2410                     }
2411                 }
2412             }
2413         }
2414
2415         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2416         {
2417             string soundNotification = SystemSettings.SoundNotification;
2418             SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2419             s_soundNotificationChanged?.Invoke(null, eventArgs);
2420         };
2421         private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2422         /// <summary>
2423         /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2424         /// </summary>
2425         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2426         /// <privlevel>platform</privlevel>
2427         /// <feature>http://tizen.org/feature/systemsetting</feature>
2428         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2429         /// <exception cref="ArgumentException">Invalid Argument</exception>
2430         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2431         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2432         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2433         /// <since_tizen> 3 </since_tizen>
2434         public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2435         {
2436             add
2437             {
2438                 if (s_soundNotificationChanged == null)
2439                 {
2440                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2441                     if (ret != SystemSettingsError.None)
2442                     {
2443                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2444                     }
2445                 }
2446                 s_soundNotificationChanged += value;
2447             }
2448
2449             remove
2450             {
2451                 if (s_soundNotificationChanged == null) {
2452                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2453                     return;
2454                 }
2455                 s_soundNotificationChanged -= value;
2456                 if (s_soundNotificationChanged == null)
2457                 {
2458                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback);
2459                     if (ret != SystemSettingsError.None)
2460                     {
2461                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2462                     }
2463                 }
2464             }
2465         }
2466
2467         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2468         {
2469             int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2470             SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2471             s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2472         };
2473         private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2474         /// <summary>
2475         /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2476         /// </summary>
2477         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2478         /// <privlevel>platform</privlevel>
2479         /// <feature>http://tizen.org/feature/systemsetting</feature>
2480         /// <exception cref="ArgumentException">Invalid Argument</exception>
2481         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2482         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2483         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2484         /// <since_tizen> 3 </since_tizen>
2485         public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2486         {
2487             add
2488             {
2489                 if (s_soundNotificationRepetitionPeriodChanged == null)
2490                 {
2491                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2492                     if (ret != SystemSettingsError.None)
2493                     {
2494                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2495                     }
2496                 }
2497                 s_soundNotificationRepetitionPeriodChanged += value;
2498             }
2499
2500             remove
2501             {
2502                 if (s_soundNotificationRepetitionPeriodChanged == null) {
2503                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2504                     return;
2505                 }
2506                 s_soundNotificationRepetitionPeriodChanged -= value;
2507                 if (s_soundNotificationRepetitionPeriodChanged == null)
2508                 {
2509                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback);
2510                     if (ret != SystemSettingsError.None)
2511                     {
2512                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2513                     }
2514                 }
2515             }
2516         }
2517
2518         private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2519         {
2520             SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2521             LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2522             s_lockStateChanged?.Invoke(null, eventArgs);
2523         };
2524         private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2525         /// <summary>
2526         /// The LockStateChanged event is triggered when the current lock state is changed.
2527         /// </summary>
2528         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2529         /// <privlevel>platform</privlevel>
2530         /// <feature>http://tizen.org/feature/systemsetting</feature>
2531         /// <exception cref="ArgumentException">Invalid Argument</exception>
2532         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2533         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2534         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2535         /// <since_tizen> 3 </since_tizen>
2536         public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2537         {
2538             add
2539             {
2540                 if (s_lockStateChanged == null)
2541                 {
2542                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2543                     if (ret != SystemSettingsError.None)
2544                     {
2545                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2546                     }
2547                 }
2548                 s_lockStateChanged += value;
2549             }
2550
2551             remove
2552             {
2553                 if (s_lockStateChanged == null) {
2554                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2555                     return;
2556                 }
2557                 s_lockStateChanged -= value;
2558                 if (s_lockStateChanged == null)
2559                 {
2560                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback);
2561                     if (ret != SystemSettingsError.None)
2562                     {
2563                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2564                     }
2565                 }
2566             }
2567         }
2568
2569         private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2570         {
2571             string adsId = SystemSettings.AdsId;
2572             AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2573             s_adsIdChanged?.Invoke(null, eventArgs);
2574         };
2575         private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2576         /// <summary>
2577         /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2578         /// </summary>
2579         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2580         /// <privlevel>platform</privlevel>
2581         /// <feature>http://tizen.org/feature/systemsetting</feature>
2582         /// <exception cref="ArgumentException">Invalid Argument</exception>
2583         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2584         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2585         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2586         /// <since_tizen> 3 </since_tizen>
2587         public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2588         {
2589             add
2590             {
2591                 if (s_adsIdChanged == null)
2592                 {
2593                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2594                     if (ret != SystemSettingsError.None)
2595                     {
2596                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2597                     }
2598                 }
2599                 s_adsIdChanged += value;
2600             }
2601
2602             remove
2603             {
2604                 if (s_adsIdChanged == null) {
2605                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2606                     return;
2607                 }
2608                 s_adsIdChanged -= value;
2609                 if (s_adsIdChanged == null)
2610                 {
2611                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback);
2612                     if (ret != SystemSettingsError.None)
2613                     {
2614                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2615                     }
2616                 }
2617             }
2618         }
2619
2620         private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2621         {
2622             SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2623             UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2624             s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2625         };
2626         private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2627         /// <summary>
2628         /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2629         /// </summary>
2630         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2631         /// <privlevel>platform</privlevel>
2632         /// <feature>http://tizen.org/feature/systemsetting</feature>
2633         /// <feature>http://tizen.org/feature/network.telephony</feature>
2634         /// <exception cref="ArgumentException">Invalid Argument</exception>
2635         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2636         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2637         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2638         /// <since_tizen> 3 </since_tizen>
2639         public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2640         {
2641             add
2642             {
2643                 if (s_ultraDataSaveChanged == null)
2644                 {
2645                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2646                     if (ret != SystemSettingsError.None)
2647                     {
2648                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2649                     }
2650                 }
2651                 s_ultraDataSaveChanged += value;
2652             }
2653
2654             remove
2655             {
2656                 if (s_ultraDataSaveChanged == null) {
2657                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2658                     return;
2659                 }
2660                 s_ultraDataSaveChanged -= value;
2661                 if (s_ultraDataSaveChanged == null)
2662                 {
2663                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback);
2664                     if (ret != SystemSettingsError.None)
2665                     {
2666                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2667                     }
2668                 }
2669             }
2670         }
2671
2672         private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2673         {
2674             string ultraDataSavePackageList = "None";
2675             UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2676             s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2677         };
2678         private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2679         /// <summary>
2680         /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2681         /// </summary>
2682         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2683         /// <privlevel>platform</privlevel>
2684         /// <feature>http://tizen.org/feature/systemsetting</feature>
2685         /// <feature>http://tizen.org/feature/network.telephony</feature>
2686         /// <exception cref="ArgumentException">Invalid Argument</exception>
2687         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2688         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2689         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2690         /// <since_tizen> 3 </since_tizen>
2691         public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2692         {
2693             add
2694             {
2695                 if (s_ultraDataSavePackageListChanged == null)
2696                 {
2697                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2698                     if (ret != SystemSettingsError.None)
2699                     {
2700                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2701                     }
2702                 }
2703                 s_ultraDataSavePackageListChanged += value;
2704             }
2705
2706             remove
2707             {
2708                 if (s_ultraDataSavePackageListChanged == null) {
2709                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2710                     return;
2711                 }
2712                 s_ultraDataSavePackageListChanged -= value;
2713                 if (s_ultraDataSavePackageListChanged == null)
2714                 {
2715                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback);
2716                     if (ret != SystemSettingsError.None)
2717                     {
2718                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2719                     }
2720                 }
2721             }
2722         }
2723
2724         private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2725         {
2726             bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2727             AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2728             s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2729         };
2730         private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2731         /// <summary>
2732         /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2733         /// </summary>
2734         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2735         /// <privlevel>platform</privlevel>
2736         /// <feature>http://tizen.org/feature/systemsetting</feature>
2737         /// <exception cref="ArgumentException">Invalid Argument</exception>
2738         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2739         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2740         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2741         /// <since_tizen> 4 </since_tizen>
2742         public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2743         {
2744             add
2745             {
2746                 if (s_accessibilityTtsChanged == null)
2747                 {
2748                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2749                     if (ret != SystemSettingsError.None)
2750                     {
2751                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2752                     }
2753                 }
2754                 s_accessibilityTtsChanged += value;
2755             }
2756
2757             remove
2758             {
2759                 if (s_accessibilityTtsChanged == null) {
2760                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2761                     return;
2762                 }
2763                 s_accessibilityTtsChanged -= value;
2764                 if (s_accessibilityTtsChanged == null)
2765
2766                 {
2767                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback);
2768                     if (ret != SystemSettingsError.None)
2769                     {
2770                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2771                     }
2772                 }
2773             }
2774         }
2775
2776         private static readonly Interop.Settings.SystemSettingsChangedCallback s_vibrationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2777         {
2778             bool vibration = SystemSettings.Vibration;
2779             VibrationChangedEventArgs eventArgs = new VibrationChangedEventArgs(vibration);
2780             s_vibrationChanged?.Invoke(null, eventArgs);
2781         };
2782         private static event EventHandler<VibrationChangedEventArgs> s_vibrationChanged;
2783         /// <summary>
2784         /// The VibrationChanged event is triggered when the vibration value is changed.
2785         /// </summary>
2786         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2787         /// <privlevel>platform</privlevel>
2788         /// <feature>http://tizen.org/feature/systemsetting</feature>
2789         /// <exception cref="ArgumentException">Invalid Argument</exception>
2790         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2791         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2792         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2793         /// <since_tizen> 5 </since_tizen>
2794         public static event EventHandler<VibrationChangedEventArgs> VibrationChanged
2795         {
2796             add
2797             {
2798                 if (s_vibrationChanged == null)
2799                 {
2800                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback, IntPtr.Zero);
2801                     if (ret != SystemSettingsError.None)
2802                     {
2803                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2804                     }
2805                 }
2806                 s_vibrationChanged += value;
2807             }
2808
2809             remove
2810             {
2811                 s_vibrationChanged -= value;
2812                 if (s_vibrationChanged == null)
2813                 {
2814                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback);
2815                     if (ret != SystemSettingsError.None)
2816                     {
2817                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2818                     }
2819                 }
2820             }
2821         }
2822
2823         private static readonly Interop.Settings.SystemSettingsChangedCallback s_automaticTimeUpdateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2824         {
2825             bool automaticTimeUpdate = SystemSettings.AutomaticTimeUpdate;
2826             AutomaticTimeUpdateChangedEventArgs eventArgs = new AutomaticTimeUpdateChangedEventArgs(automaticTimeUpdate);
2827             s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
2828         };
2829         private static event EventHandler<AutomaticTimeUpdateChangedEventArgs> s_automaticTimeUpdateChanged;
2830         /// <summary>
2831         /// The AutomaticTimeUpdateChanged event is triggered when the AutomaticTimeUpdate value is changed.
2832         /// </summary>
2833         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2834         /// <privlevel>platform</privlevel>
2835         /// <feature>http://tizen.org/feature/systemsetting</feature>
2836         /// <exception cref="ArgumentException">Invalid Argument</exception>
2837         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2838         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2839         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2840         /// <since_tizen> 5 </since_tizen>
2841         public static event EventHandler<AutomaticTimeUpdateChangedEventArgs> AutomaticTimeUpdateChanged
2842         {
2843             add
2844             {
2845                 if (s_automaticTimeUpdateChanged == null)
2846                 {
2847                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback, IntPtr.Zero);
2848                     if (ret != SystemSettingsError.None)
2849                     {
2850                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2851                     }
2852                 }
2853                 s_automaticTimeUpdateChanged += value;
2854             }
2855
2856             remove
2857             {
2858                 s_automaticTimeUpdateChanged -= value;
2859                 if (s_automaticTimeUpdateChanged == null)
2860                 {
2861                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback);
2862                     if (ret != SystemSettingsError.None)
2863                     {
2864                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2865                     }
2866                 }
2867             }
2868         }
2869
2870         private static readonly Interop.Settings.SystemSettingsChangedCallback s_developerOptionStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2871         {
2872             bool developerOptionState = SystemSettings.DeveloperOptionState;
2873             DeveloperOptionStateChangedEventArgs eventArgs = new DeveloperOptionStateChangedEventArgs(developerOptionState);
2874             s_developerOptionStateChanged?.Invoke(null, eventArgs);
2875         };
2876         private static event EventHandler<DeveloperOptionStateChangedEventArgs> s_developerOptionStateChanged;
2877         /// <summary>
2878         /// The DeveloperOptionStateChanged event is triggered when the DeveloperOptionState value is changed.
2879         /// </summary>
2880         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2881         /// <privlevel>platform</privlevel>
2882         /// <feature>http://tizen.org/feature/systemsetting</feature>
2883         /// <exception cref="ArgumentException">Invalid Argument</exception>
2884         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2885         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2886         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2887         /// <since_tizen> 5 </since_tizen>
2888         public static event EventHandler<DeveloperOptionStateChangedEventArgs> DeveloperOptionStateChanged
2889         {
2890             add
2891             {
2892                 if (s_developerOptionStateChanged == null)
2893                 {
2894                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback, IntPtr.Zero);
2895                     if (ret != SystemSettingsError.None)
2896                     {
2897                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2898                     }
2899                 }
2900                 s_developerOptionStateChanged += value;
2901             }
2902
2903             remove
2904             {
2905                 s_developerOptionStateChanged -= value;
2906                 if (s_developerOptionStateChanged == null)
2907                 {
2908                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback);
2909                     if (ret != SystemSettingsError.None)
2910                     {
2911                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2912                     }
2913                 }
2914             }
2915         }
2916
2917         private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityGrayscaleChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2918         {
2919             bool accessibilityGrayscale = SystemSettings.AccessibilityGrayscale;
2920             AccessibilityGrayscaleChangedEventArgs eventArgs = new AccessibilityGrayscaleChangedEventArgs(accessibilityGrayscale);
2921             s_accessibilityGrayscaleChanged?.Invoke(null, eventArgs);
2922         };
2923         private static event EventHandler<AccessibilityGrayscaleChangedEventArgs> s_accessibilityGrayscaleChanged;
2924         /// <summary>
2925         /// The AccessibilityGrayscaleChanged event is triggered when the AccessibilityGrayscale value is changed.
2926         /// </summary>
2927         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2928         /// <privlevel>platform</privlevel>
2929         /// <feature>http://tizen.org/feature/systemsetting</feature>
2930         /// <feature>http://tizen.org/feature/accessibility.grayscale</feature>
2931         /// <exception cref="ArgumentException">Invalid Argument</exception>
2932         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2933         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2934         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2935         /// <since_tizen> 6 </since_tizen>
2936         public static event EventHandler<AccessibilityGrayscaleChangedEventArgs> AccessibilityGrayscaleChanged
2937         {
2938             add
2939             {
2940                 if (s_accessibilityGrayscaleChanged == null)
2941                 {
2942                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityGrayscale, s_accessibilityGrayscaleChangedCallback, IntPtr.Zero);
2943                     if (ret != SystemSettingsError.None)
2944                     {
2945                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2946                     }
2947                 }
2948                 s_accessibilityGrayscaleChanged += value;
2949             }
2950
2951             remove
2952             {
2953                 s_accessibilityGrayscaleChanged -= value;
2954                 if (s_accessibilityGrayscaleChanged == null)
2955                 {
2956                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityGrayscale, s_accessibilityGrayscaleChangedCallback);
2957                     if (ret != SystemSettingsError.None)
2958                     {
2959                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2960                     }
2961                 }
2962             }
2963         }
2964
2965         private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityNegativeColorChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2966         {
2967             bool accessibilityNegativeColor = SystemSettings.AccessibilityNegativeColor;
2968             AccessibilityNegativeColorChangedEventArgs eventArgs = new AccessibilityNegativeColorChangedEventArgs(accessibilityNegativeColor);
2969             s_accessibilityNegativeColorChanged?.Invoke(null, eventArgs);
2970         };
2971         private static event EventHandler<AccessibilityNegativeColorChangedEventArgs> s_accessibilityNegativeColorChanged;
2972         /// <summary>
2973         /// The AccessibilityNegativeColorChanged event is triggered when the AccessibilityNegativeColor value is changed.
2974         /// </summary>
2975         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2976         /// <privlevel>platform</privlevel>
2977         /// <feature>http://tizen.org/feature/systemsetting</feature>
2978         /// <feature>http://tizen.org/feature/accessibility.negative</feature>
2979         /// <exception cref="ArgumentException">Invalid Argument</exception>
2980         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2981         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2982         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2983         /// <since_tizen> 6 </since_tizen>
2984         public static event EventHandler<AccessibilityNegativeColorChangedEventArgs> AccessibilityNegativeColorChanged
2985         {
2986             add
2987             {
2988                 if (s_accessibilityNegativeColorChanged == null)
2989                 {
2990                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityNegativeColor, s_accessibilityNegativeColorChangedCallback, IntPtr.Zero);
2991                     if (ret != SystemSettingsError.None)
2992                     {
2993                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2994                     }
2995                 }
2996                 s_accessibilityNegativeColorChanged += value;
2997             }
2998
2999             remove
3000             {
3001                 s_accessibilityNegativeColorChanged -= value;
3002                 if (s_accessibilityNegativeColorChanged == null)
3003                 {
3004                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityNegativeColor, s_accessibilityNegativeColorChangedCallback);
3005                     if (ret != SystemSettingsError.None)
3006                     {
3007                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
3008                     }
3009                 }
3010             }
3011         }
3012
3013         private static readonly Interop.Settings.SystemSettingsChangedCallback s_rotaryEventEnabledChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
3014         {
3015             bool rotaryEventEnabled = SystemSettings.RotaryEventEnabled;
3016             RotaryEventEnabledChangedEventArgs eventArgs = new RotaryEventEnabledChangedEventArgs(rotaryEventEnabled);
3017             s_rotaryEventEnabledChanged?.Invoke(null, eventArgs);
3018         };
3019         private static event EventHandler<RotaryEventEnabledChangedEventArgs> s_rotaryEventEnabledChanged;
3020         /// <summary>
3021         /// The RotaryEventEnabledChanged event is triggered when the RotaryEventEnabled value is changed.
3022         /// </summary>
3023         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
3024         /// <privlevel>platform</privlevel>
3025         /// <feature>http://tizen.org/feature/systemsetting</feature>
3026         /// <exception cref="NotSupportedException">Not Supported feature</exception>
3027         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
3028         /// <remarks>
3029         /// http://tizen.org/privilege/systemsettings.admin is needed only for setting value. When getting the value, it isn't needed.
3030         /// </remarks>
3031         /// <since_tizen> 6 </since_tizen>
3032         public static event EventHandler<RotaryEventEnabledChangedEventArgs> RotaryEventEnabledChanged
3033         {
3034             add
3035             {
3036                 if (s_rotaryEventEnabledChanged == null)
3037                 {
3038                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.RotaryEventEnabled, s_rotaryEventEnabledChangedCallback, IntPtr.Zero);
3039                     if (ret != SystemSettingsError.None)
3040                     {
3041                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
3042                     }
3043                 }
3044                 s_rotaryEventEnabledChanged += value;
3045             }
3046
3047             remove
3048             {
3049                 s_rotaryEventEnabledChanged -= value;
3050                 if (s_rotaryEventEnabledChanged == null)
3051                 {
3052                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.RotaryEventEnabled, s_rotaryEventEnabledChangedCallback);
3053                     if (ret != SystemSettingsError.None)
3054                     {
3055                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
3056                     }
3057                 }
3058             }
3059         }
3060     }
3061 }
3062