59c740dd3de2a8c2fe063951a51e77e0c95dddfd
[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         }
971
972         /// <summary>
973         /// Indicates whether the vibration is enabled on the device or not.
974         /// </summary>
975         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
976         /// <privlevel>platform</privlevel>
977         /// <feature>http://tizen.org/feature/systemsetting</feature>
978         /// <exception cref="ArgumentException">Invalid Argument</exception>
979         /// <exception cref="NotSupportedException">Not Supported feature</exception>
980         /// <exception cref="InvalidOperationException">Invalid operation</exception>
981         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
982         /// <since_tizen> 5 </since_tizen>
983         public static bool Vibration
984         {
985             get
986             {
987                 bool isVibration;
988                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Vibration, out isVibration);
989                 if (res != SystemSettingsError.None)
990                 {
991                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isVibration system setting.");
992                 }
993                 return isVibration;
994             }
995             set
996             {
997                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Vibration, value);
998                 if (res != SystemSettingsError.None)
999                 {
1000                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isVibration system setting.");
1001                 }
1002             }
1003         }
1004
1005         /// <summary>
1006         /// Indicates whether the automatic time update is enabled on the device or not.
1007         /// </summary>
1008         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1009         /// <privlevel>platform</privlevel>
1010         /// <feature>http://tizen.org/feature/systemsetting</feature>
1011         /// <feature>http://tizen.org/feature/network.telephony</feature>
1012         /// <exception cref="ArgumentException">Invalid Argument</exception>
1013         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1014         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1015         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1016         /// <since_tizen> 5 </since_tizen>
1017         public static bool AutomaticTimeUpdate
1018         {
1019             get
1020             {
1021                 bool isAutomaticTimeUpdate;
1022                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, out isAutomaticTimeUpdate);
1023                 if (res != SystemSettingsError.None)
1024                 {
1025                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAutomaticTimeUpdate system setting.");
1026                 }
1027                 return isAutomaticTimeUpdate;
1028             }
1029             set
1030             {
1031                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, value);
1032                 if (res != SystemSettingsError.None)
1033                 {
1034                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAutomaticTimeUpdate system setting.");
1035                 }
1036             }
1037         }
1038
1039         /// <summary>
1040         /// Indicates whether the developer option state is enabled on the device or not.
1041         /// </summary>
1042         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1043         /// <privlevel>platform</privlevel>
1044         /// <feature>http://tizen.org/feature/systemsetting</feature>
1045         /// <exception cref="ArgumentException">Invalid Argument</exception>
1046         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1047         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1048         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1049         /// <since_tizen> 5 </since_tizen>
1050         public static bool DeveloperOptionState
1051         {
1052             get
1053             {
1054                 bool isDeveloperOptionState;
1055                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DeveloperOptionState, out isDeveloperOptionState);
1056                 if (res != SystemSettingsError.None)
1057                 {
1058                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isDeveloperOptionState system setting.");
1059                 }
1060                 return isDeveloperOptionState;
1061             }
1062             set
1063             {
1064                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.DeveloperOptionState, value);
1065                 if (res != SystemSettingsError.None)
1066                 {
1067                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isDeveloperOptionState system setting.");
1068                 }
1069             }
1070         }
1071
1072         private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1073         {
1074             string path = SystemSettings.IncomingCallRingtone;
1075             IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
1076             s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
1077         };
1078         private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
1079         /// <summary>
1080         /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
1081         /// </summary>
1082         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1083         /// <privlevel>platform</privlevel>
1084         /// <feature>http://tizen.org/feature/systemsetting</feature>
1085         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
1086         /// <exception cref="ArgumentException">Invalid Argument</exception>
1087         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1088         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1089         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1090         /// <since_tizen> 3 </since_tizen>
1091         public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
1092         {
1093             add
1094             {
1095                 if (s_incomingCallRingtoneChanged == null)
1096                 {
1097                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
1098                     if (ret != SystemSettingsError.None)
1099                     {
1100                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1101                     }
1102                 }
1103                 s_incomingCallRingtoneChanged += value;
1104             }
1105
1106             remove
1107             {
1108                 if (s_incomingCallRingtoneChanged == null) {
1109                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1110                     return;
1111                 }
1112                 s_incomingCallRingtoneChanged -= value;
1113                 if (s_incomingCallRingtoneChanged == null)
1114                 {
1115                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback);
1116                     if (ret != SystemSettingsError.None)
1117                     {
1118                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1119                     }
1120                 }
1121             }
1122         }
1123
1124         private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1125         {
1126             string path = SystemSettings.WallpaperHomeScreen;
1127             WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1128             s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1129         };
1130         private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1131         /// <summary>
1132         /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1133         /// </summary>
1134         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1135         /// <privlevel>platform</privlevel>
1136         /// <feature>http://tizen.org/feature/systemsetting</feature>
1137         /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1138         /// <exception cref="ArgumentException">Invalid Argument</exception>
1139         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1140         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1141         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1142         /// <since_tizen> 3 </since_tizen>
1143         public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1144         {
1145             add
1146             {
1147                 if (s_wallpaperHomeScreenChanged == null)
1148                 {
1149                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1150                     if (ret != SystemSettingsError.None)
1151                     {
1152                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1153                     }
1154                 }
1155                 s_wallpaperHomeScreenChanged += value;
1156             }
1157
1158             remove
1159             {
1160                 if (s_wallpaperHomeScreenChanged == null) {
1161                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1162                     return;
1163                 }
1164                 s_wallpaperHomeScreenChanged -= value;
1165                 if (s_wallpaperHomeScreenChanged == null)
1166                 {
1167                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback);
1168                     if (ret != SystemSettingsError.None)
1169                     {
1170                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1171                     }
1172                 }
1173             }
1174         }
1175
1176         private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1177         {
1178             string path = SystemSettings.WallpaperLockScreen;
1179             WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1180             s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1181         };
1182         private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1183         /// <summary>
1184         /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1185         /// </summary>
1186         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1187         /// <privlevel>platform</privlevel>
1188         /// <feature>http://tizen.org/feature/systemsetting</feature>
1189         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1190         /// <exception cref="ArgumentException">Invalid Argument</exception>
1191         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1192         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1193         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1194         /// <since_tizen> 3 </since_tizen>
1195         public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1196         {
1197             add
1198             {
1199                 if (s_wallpaperLockScreenChanged == null)
1200                 {
1201                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1202                     if (ret != SystemSettingsError.None)
1203                     {
1204                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1205                     }
1206                 }
1207                 s_wallpaperLockScreenChanged += value;
1208             }
1209
1210             remove
1211             {
1212                 if (s_wallpaperLockScreenChanged == null) {
1213                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1214                     return;
1215                 }
1216                 s_wallpaperLockScreenChanged -= value;
1217                 if (s_wallpaperLockScreenChanged == null)
1218                 {
1219                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback);
1220                     if (ret != SystemSettingsError.None)
1221                     {
1222                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1223                     }
1224                 }
1225             }
1226         }
1227
1228         private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1229         {
1230             SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1231             FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1232             s_fontSizeChanged?.Invoke(null, eventArgs);
1233         };
1234         private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1235         /// <summary>
1236         /// The FontSizeChanged event is triggered when the current system font size is changed.
1237         /// </summary>
1238         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1239         /// <privlevel>platform</privlevel>
1240         /// <feature>http://tizen.org/feature/systemsetting</feature>
1241         /// <exception cref="ArgumentException">Invalid Argument</exception>
1242         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1243         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1244         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1245         /// <since_tizen> 3 </since_tizen>
1246         public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1247         {
1248             add
1249             {
1250                 if (s_fontSizeChanged == null)
1251                 {
1252                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1253                     if (ret != SystemSettingsError.None)
1254                     {
1255                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1256                     }
1257                 }
1258                 s_fontSizeChanged += value;
1259             }
1260
1261             remove
1262             {
1263                 if (s_fontSizeChanged == null) {
1264                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1265                     return;
1266                 }
1267                 s_fontSizeChanged -= value;
1268                 if (s_fontSizeChanged == null)
1269                 {
1270                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback);
1271                     if (ret != SystemSettingsError.None)
1272                     {
1273                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1274                     }
1275                 }
1276             }
1277         }
1278
1279         private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1280         {
1281             string fontType = SystemSettings.FontType;
1282             FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1283             s_fontTypeChanged?.Invoke(null, eventArgs);
1284         };
1285         private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1286         /// <summary>
1287         /// The FontTypeChanged event is triggered when the current system font type is changed.
1288         /// </summary>
1289         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1290         /// <privlevel>platform</privlevel>
1291         /// <feature>http://tizen.org/feature/systemsetting</feature>
1292         /// <exception cref="ArgumentException">Invalid Argument</exception>
1293         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1294         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1295         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1296         /// <since_tizen> 3 </since_tizen>
1297         public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1298         {
1299             add
1300             {
1301                 if (s_fontTypeChanged == null)
1302                 {
1303                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1304                     if (ret != SystemSettingsError.None)
1305                     {
1306                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1307                     }
1308                 }
1309                 s_fontTypeChanged += value;
1310             }
1311
1312             remove
1313             {
1314                 if (s_fontTypeChanged == null) {
1315                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1316                     return;
1317                 }
1318                 s_fontTypeChanged -= value;
1319                 if (s_fontTypeChanged == null)
1320                 {
1321                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback);
1322                     if (ret != SystemSettingsError.None)
1323                     {
1324                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1325                     }
1326                 }
1327             }
1328         }
1329
1330         private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1331         {
1332             bool motionActivation = SystemSettings.MotionActivationEnabled;
1333             MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1334             s_motionActivationChanged?.Invoke(null, eventArgs);
1335         };
1336         private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1337         /// <summary>
1338         /// The MotionActivationChanged event is triggered when the motion service status is changed.
1339         /// </summary>
1340         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1341         /// <privlevel>platform</privlevel>
1342         /// <feature>http://tizen.org/feature/systemsetting</feature>
1343         /// <exception cref="ArgumentException">Invalid Argument</exception>
1344         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1345         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1346         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1347         /// <since_tizen> 3 </since_tizen>
1348         public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1349         {
1350             add
1351             {
1352                 if (s_motionActivationChanged == null)
1353                 {
1354                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1355                     if (ret != SystemSettingsError.None)
1356                     {
1357                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1358                     }
1359                 }
1360                 s_motionActivationChanged += value;
1361             }
1362
1363             remove
1364             {
1365                 if (s_motionActivationChanged == null) {
1366                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1367                     return;
1368                 }
1369                 s_motionActivationChanged -= value;
1370                 if (s_motionActivationChanged == null)
1371                 {
1372                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback);
1373                     if (ret != SystemSettingsError.None)
1374                     {
1375                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1376                     }
1377                 }
1378             }
1379         }
1380
1381         private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1382         {
1383             string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1384             EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1385             s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1386         };
1387         private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1388         /// <summary>
1389         /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1390         /// </summary>
1391         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1392         /// <privlevel>platform</privlevel>
1393         /// <feature>http://tizen.org/feature/systemsetting</feature>
1394         /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1395         /// <exception cref="ArgumentException">Invalid Argument</exception>
1396         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1397         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1398         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1399         /// <since_tizen> 3 </since_tizen>
1400         public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1401         {
1402             add
1403             {
1404                 if (s_emailAlertRingtoneChanged == null)
1405                 {
1406                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1407                     if (ret != SystemSettingsError.None)
1408                     {
1409                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1410                     }
1411                 }
1412                 s_emailAlertRingtoneChanged += value;
1413             }
1414
1415             remove
1416             {
1417                 if (s_emailAlertRingtoneChanged == null) {
1418                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1419                     return;
1420                 }
1421                 s_emailAlertRingtoneChanged -= value;
1422                 if (s_emailAlertRingtoneChanged == null)
1423                 {
1424                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback);
1425                     if (ret != SystemSettingsError.None)
1426                     {
1427                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1428                     }
1429                 }
1430             }
1431         }
1432
1433         private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1434         {
1435             bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1436             UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1437             s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1438         };
1439         private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1440         /// <summary>
1441         /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1442         /// </summary>
1443         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1444         /// <privlevel>platform</privlevel>
1445         /// <feature>http://tizen.org/feature/systemsetting</feature>
1446         /// <exception cref="ArgumentException">Invalid Argument</exception>
1447         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1448         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1449         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1450         /// <since_tizen> 3 </since_tizen>
1451         public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1452         {
1453             add
1454             {
1455                 if (s_usbDebuggingSettingChanged == null)
1456                 {
1457                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1458                     if (ret != SystemSettingsError.None)
1459                     {
1460                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1461                     }
1462                 }
1463                 s_usbDebuggingSettingChanged += value;
1464             }
1465
1466             remove
1467             {
1468                 if (s_usbDebuggingSettingChanged == null) {
1469                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1470                     return;
1471                 }
1472                 s_usbDebuggingSettingChanged -= value;
1473                 if (s_usbDebuggingSettingChanged == null)
1474                 {
1475                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback);
1476                     if (ret != SystemSettingsError.None)
1477                     {
1478                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1479                     }
1480                 }
1481             }
1482         }
1483
1484         private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1485         {
1486             bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1487             Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1488             s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1489         };
1490         private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1491         /// <summary>
1492         /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1493         /// </summary>
1494         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1495         /// <privlevel>platform</privlevel>
1496         /// <feature>http://tizen.org/feature/systemsetting</feature>
1497         /// <exception cref="ArgumentException">Invalid Argument</exception>
1498         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1499         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1500         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1501         /// <since_tizen> 3 </since_tizen>
1502         public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1503         {
1504             add
1505             {
1506                 if (s_data3GNetworkSettingChanged == null)
1507                 {
1508                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1509                     if (ret != SystemSettingsError.None)
1510                     {
1511                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1512                     }
1513                 }
1514                 s_data3GNetworkSettingChanged += value;
1515             }
1516
1517             remove
1518             {
1519                 if (s_data3GNetworkSettingChanged == null) {
1520                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1521                     return;
1522                 }
1523                 s_data3GNetworkSettingChanged -= value;
1524                 if (s_data3GNetworkSettingChanged == null)
1525                 {
1526                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback);
1527                     if (ret != SystemSettingsError.None)
1528                     {
1529                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1530                     }
1531                 }
1532             }
1533         }
1534
1535         private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1536         {
1537             string lockScreenApp = SystemSettings.LockScreenApp;
1538             LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1539             s_lockscreenAppChanged?.Invoke(null, eventArgs);
1540         };
1541         private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1542         /// <summary>
1543         /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1544         /// </summary>
1545         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1546         /// <privlevel>platform</privlevel>
1547         /// <feature>http://tizen.org/feature/systemsetting</feature>
1548         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1549         /// <exception cref="ArgumentException">Invalid Argument</exception>
1550         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1551         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1552         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1553         /// <since_tizen> 4 </since_tizen>
1554         public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1555         {
1556             add
1557             {
1558                 if (s_lockscreenAppChanged == null)
1559                 {
1560                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1561                     if (ret != SystemSettingsError.None)
1562                     {
1563                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1564                     }
1565                 }
1566                 s_lockscreenAppChanged += value;
1567             }
1568
1569             remove
1570             {
1571                 if (s_lockscreenAppChanged == null) {
1572                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1573                     return;
1574                 }
1575
1576                 s_lockscreenAppChanged -= value;
1577                 if (s_lockscreenAppChanged == null)
1578                 {
1579                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback);
1580                     if (ret != SystemSettingsError.None)
1581                     {
1582                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1583                     }
1584                 }
1585             }
1586         }
1587
1588         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1589         {
1590             string localeCountry = SystemSettings.LocaleCountry;
1591             LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1592             s_localeCountryChanged?.Invoke(null, eventArgs);
1593         };
1594         private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1595         /// <summary>
1596         /// The LocaleCountryChanged event is triggered when the current country setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax, is changed.
1597         /// </summary>
1598         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1599         /// <privlevel>platform</privlevel>
1600         /// <feature>http://tizen.org/feature/systemsetting</feature>
1601         /// <exception cref="ArgumentException">Invalid Argument</exception>
1602         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1603         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1604         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1605         /// <since_tizen> 3 </since_tizen>
1606         public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1607         {
1608             add
1609             {
1610                 if (s_localeCountryChanged == null)
1611                 {
1612                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1613                     if (ret != SystemSettingsError.None)
1614                     {
1615                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1616                     }
1617                 }
1618                 s_localeCountryChanged += value;
1619             }
1620
1621             remove
1622             {
1623                 if (s_localeCountryChanged == null) {
1624                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1625                     return;
1626                 }
1627                 s_localeCountryChanged -= value;
1628                 if (s_localeCountryChanged == null)
1629                 {
1630                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback);
1631                     if (ret != SystemSettingsError.None)
1632                     {
1633                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1634                     }
1635                 }
1636             }
1637         }
1638
1639         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1640         {
1641             string localeLanguage = SystemSettings.LocaleLanguage;
1642             LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1643             s_localeLanguageChanged?.Invoke(null, eventArgs);
1644         };
1645         private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1646         /// <summary>
1647         /// The LocaleLanguageChanged event is triggered when the current language setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax, is changed.
1648         /// </summary>
1649         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1650         /// <privlevel>platform</privlevel>
1651         /// <feature>http://tizen.org/feature/systemsetting</feature>
1652         /// <exception cref="ArgumentException">Invalid Argument</exception>
1653         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1654         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1655         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1656         /// <since_tizen> 3 </since_tizen>
1657         public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1658         {
1659             add
1660             {
1661                 if (s_localeLanguageChanged == null)
1662                 {
1663                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1664                     if (ret != SystemSettingsError.None)
1665                     {
1666                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1667                     }
1668                 }
1669                 s_localeLanguageChanged += value;
1670             }
1671
1672             remove
1673             {
1674                 if (s_localeLanguageChanged == null) {
1675                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1676                     return;
1677                 }
1678                 s_localeLanguageChanged -= value;
1679                 if (s_localeLanguageChanged == null)
1680                 {
1681                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback);
1682                     if (ret != SystemSettingsError.None)
1683                     {
1684                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1685                     }
1686                 }
1687             }
1688         }
1689
1690         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1691         {
1692             bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1693             LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1694             s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1695         };
1696         private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1697         /// <summary>
1698         /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1699         /// </summary>
1700         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1701         /// <privlevel>platform</privlevel>
1702         /// <feature>http://tizen.org/feature/systemsetting</feature>
1703         /// <exception cref="ArgumentException">Invalid Argument</exception>
1704         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1705         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1706         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1707         /// <since_tizen> 3 </since_tizen>
1708         public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1709         {
1710             add
1711             {
1712                 if (s_localeTimeFormat24HourChanged == null)
1713                 {
1714                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1715                     if (ret != SystemSettingsError.None)
1716                     {
1717                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1718                     }
1719                 }
1720                 s_localeTimeFormat24HourChanged += value;
1721             }
1722
1723             remove
1724             {
1725                 if (s_localeTimeFormat24HourChanged == null) {
1726                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1727                     return;
1728                 }
1729                 s_localeTimeFormat24HourChanged -= value;
1730                 if (s_localeTimeFormat24HourChanged == null)
1731                 {
1732                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback);
1733                     if (ret != SystemSettingsError.None)
1734                     {
1735                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1736                     }
1737                 }
1738             }
1739         }
1740
1741         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1742         {
1743             string localeTimeZone = SystemSettings.LocaleTimeZone;
1744             LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1745             s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1746         };
1747         private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1748         /// <summary>
1749         /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1750         /// </summary>
1751         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1752         /// <privlevel>platform</privlevel>
1753         /// <feature>http://tizen.org/feature/systemsetting</feature>
1754         /// <exception cref="ArgumentException">Invalid Argument</exception>
1755         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1756         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1757         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1758         /// <since_tizen> 3 </since_tizen>
1759         public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1760         {
1761             add
1762             {
1763                 if (s_localeTimeZoneChanged == null)
1764                 {
1765                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1766                     if (ret != SystemSettingsError.None)
1767                     {
1768                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1769                     }
1770                 }
1771                 s_localeTimeZoneChanged += value;
1772             }
1773
1774             remove
1775             {
1776                 if (s_localeTimeZoneChanged == null) {
1777                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1778                     return;
1779                 }
1780                 s_localeTimeZoneChanged -= value;
1781                 if (s_localeTimeZoneChanged == null)
1782                 {
1783                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback);
1784                     if (ret != SystemSettingsError.None)
1785                     {
1786                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1787                     }
1788                 }
1789             }
1790         }
1791
1792         private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1793         {
1794
1795             int time = SystemSettings.Time;
1796             TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1797             s_timeChanged?.Invoke(null, eventArgs);
1798         };
1799         private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1800         /// <summary>
1801         /// The TimeChanged event is triggered when the system time is changed.
1802         /// </summary>
1803         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1804         /// <privlevel>platform</privlevel>
1805         /// <feature>http://tizen.org/feature/systemsetting</feature>
1806         /// <exception cref="ArgumentException">Invalid Argument</exception>
1807         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1808         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1809         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1810         /// <since_tizen> 3 </since_tizen>
1811         public static event EventHandler<TimeChangedEventArgs> TimeChanged
1812         {
1813             add
1814             {
1815                 if (s_timeChanged == null)
1816                 {
1817                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1818                     if (ret != SystemSettingsError.None)
1819                     {
1820                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1821                     }
1822                 }
1823                 s_timeChanged += value;
1824             }
1825
1826             remove
1827             {
1828                 if (s_timeChanged == null) {
1829                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1830                     return;
1831                 }
1832                 s_timeChanged -= value;
1833                 if (s_timeChanged == null)
1834                 {
1835                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time, s_timeChangedCallback);
1836                     if (ret != SystemSettingsError.None)
1837                     {
1838                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1839                     }
1840                 }
1841             }
1842         }
1843
1844         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1845         {
1846             bool soundLock = SystemSettings.SoundLockEnabled;
1847             SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1848             s_soundLockChanged?.Invoke(null, eventArgs);
1849         };
1850         private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1851         /// <summary>
1852         /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1853         /// </summary>
1854         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1855         /// <privlevel>platform</privlevel>
1856         /// <feature>http://tizen.org/feature/systemsetting</feature>
1857         /// <exception cref="ArgumentException">Invalid Argument</exception>
1858         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1859         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1860         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1861         /// <since_tizen> 3 </since_tizen>
1862         public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1863         {
1864             add
1865             {
1866                 if (s_soundLockChanged == null)
1867                 {
1868                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1869                     if (ret != SystemSettingsError.None)
1870                     {
1871                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1872                     }
1873                 }
1874                 s_soundLockChanged += value;
1875             }
1876
1877             remove
1878             {
1879                 if (s_soundLockChanged == null) {
1880                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1881                     return;
1882                 }
1883                 s_soundLockChanged -= value;
1884                 if (s_soundLockChanged == null)
1885                 {
1886                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback);
1887                     if (ret != SystemSettingsError.None)
1888                     {
1889                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1890                     }
1891                 }
1892             }
1893         }
1894
1895         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1896         {
1897             bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1898             SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1899             s_soundSilentModeChanged?.Invoke(null, eventArgs);
1900         };
1901         private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1902         /// <summary>
1903         /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1904         /// </summary>
1905         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1906         /// <privlevel>platform</privlevel>
1907         /// <feature>http://tizen.org/feature/systemsetting</feature>
1908         /// <exception cref="ArgumentException">Invalid Argument</exception>
1909         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1910         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1911         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1912         /// <since_tizen> 3 </since_tizen>
1913         public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1914         {
1915             add
1916             {
1917                 if (s_soundSilentModeChanged == null)
1918                 {
1919                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1920                     if (ret != SystemSettingsError.None)
1921                     {
1922                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1923                     }
1924                 }
1925                 s_soundSilentModeChanged += value;
1926             }
1927
1928             remove
1929             {
1930                 if (s_soundSilentModeChanged == null) {
1931                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1932                     return;
1933                 }
1934                 s_soundSilentModeChanged -= value;
1935                 if (s_soundSilentModeChanged == null)
1936                 {
1937                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback);
1938                     if (ret != SystemSettingsError.None)
1939                     {
1940                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1941                     }
1942                 }
1943             }
1944         }
1945
1946         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1947         {
1948             bool soundTouch = SystemSettings.SoundTouchEnabled;
1949             SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1950             s_soundTouchChanged?.Invoke(null, eventArgs);
1951         };
1952         private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1953         /// <summary>
1954         /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1955         /// </summary>
1956         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1957         /// <privlevel>platform</privlevel>
1958         /// <feature>http://tizen.org/feature/systemsetting</feature>
1959         /// <exception cref="ArgumentException">Invalid Argument</exception>
1960         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1961         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1962         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1963         /// <since_tizen> 3 </since_tizen>
1964         public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1965         {
1966             add
1967             {
1968                 if (s_soundTouchChanged == null)
1969                 {
1970                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1971                     if (ret != SystemSettingsError.None)
1972                     {
1973                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1974                     }
1975                 }
1976                 s_soundTouchChanged += value;
1977             }
1978
1979             remove
1980             {
1981                 if (s_soundTouchChanged == null) {
1982                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1983                     return;
1984                 }
1985                 s_soundTouchChanged -= value;
1986                 if (s_soundTouchChanged == null)
1987
1988                 {
1989                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback);
1990                     if (ret != SystemSettingsError.None)
1991                     {
1992                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1993                     }
1994                 }
1995             }
1996         }
1997
1998         private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1999         {
2000             bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
2001             DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
2002             s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
2003         };
2004         private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
2005         /// <summary>
2006         /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
2007         /// </summary>
2008         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2009         /// <privlevel>platform</privlevel>
2010         /// <feature>http://tizen.org/feature/systemsetting</feature>
2011         /// <exception cref="ArgumentException">Invalid Argument</exception>
2012         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2013         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2014         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2015         /// <since_tizen> 3 </since_tizen>
2016         public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
2017         {
2018             add
2019             {
2020                 if (s_displayScreenRotationAutoChanged == null)
2021                 {
2022                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
2023                     if (ret != SystemSettingsError.None)
2024                     {
2025                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2026                     }
2027                 }
2028                 s_displayScreenRotationAutoChanged += value;
2029             }
2030
2031             remove
2032             {
2033                 if (s_displayScreenRotationAutoChanged == null) {
2034                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2035                     return;
2036                 }
2037                 s_displayScreenRotationAutoChanged -= value;
2038                 if (s_displayScreenRotationAutoChanged == null)
2039                 {
2040                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback);
2041                     if (ret != SystemSettingsError.None)
2042                     {
2043                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2044                     }
2045                 }
2046             }
2047         }
2048
2049         private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2050         {
2051             string deviceName = SystemSettings.DeviceName;
2052             DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
2053             s_deviceNameChanged?.Invoke(null, eventArgs);
2054         };
2055         private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
2056         /// <summary>
2057         /// The DeviceNameChanged event is triggered when the device name is changed.
2058         /// </summary>
2059         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2060         /// <privlevel>platform</privlevel>
2061         /// <feature>http://tizen.org/feature/systemsetting</feature>
2062         /// <exception cref="ArgumentException">Invalid Argument</exception>
2063         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2064         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2065         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2066         /// <since_tizen> 3 </since_tizen>
2067         public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
2068         {
2069             add
2070             {
2071                 if (s_deviceNameChanged == null)
2072                 {
2073                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
2074                     if (ret != SystemSettingsError.None)
2075                     {
2076                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2077                     }
2078                 }
2079                 s_deviceNameChanged += value;
2080             }
2081
2082             remove
2083             {
2084                 if (s_deviceNameChanged == null) {
2085                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2086                     return;
2087                 }
2088                 s_deviceNameChanged -= value;
2089                 if (s_deviceNameChanged == null)
2090                 {
2091                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback);
2092                     if (ret != SystemSettingsError.None)
2093                     {
2094                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2095                     }
2096                 }
2097             }
2098         }
2099
2100         private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2101         {
2102             bool motionEnabled = SystemSettings.MotionEnabled;
2103             MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
2104             s_motionSettingChanged?.Invoke(null, eventArgs);
2105         };
2106         private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
2107         /// <summary>
2108         /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
2109         /// </summary>
2110         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2111         /// <privlevel>platform</privlevel>
2112         /// <feature>http://tizen.org/feature/systemsetting</feature>
2113         /// <exception cref="ArgumentException">Invalid Argument</exception>
2114         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2115         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2116         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2117         /// <since_tizen> 3 </since_tizen>
2118         public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
2119         {
2120             add
2121             {
2122                 if (s_motionSettingChanged == null)
2123                 {
2124                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
2125                     if (ret != SystemSettingsError.None)
2126                     {
2127                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2128                     }
2129                 }
2130                 s_motionSettingChanged += value;
2131             }
2132
2133             remove
2134             {
2135                 if (s_motionSettingChanged == null) {
2136                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2137                     return;
2138                 }
2139                 s_motionSettingChanged -= value;
2140                 if (s_motionSettingChanged == null)
2141                 {
2142                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback);
2143                     if (ret != SystemSettingsError.None)
2144                     {
2145                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2146                     }
2147                 }
2148             }
2149         }
2150
2151         private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2152         {
2153             bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
2154             NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
2155             s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
2156         };
2157         private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
2158         /// <summary>
2159         /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
2160         /// </summary>
2161         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2162         /// <privlevel>platform</privlevel>
2163         /// <feature>http://tizen.org/feature/systemsetting</feature>
2164         /// <feature>http://tizen.org/feature/network.wifi</feature>
2165         /// <exception cref="ArgumentException">Invalid Argument</exception>
2166         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2167         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2168         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2169         /// <since_tizen> 3 </since_tizen>
2170         public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
2171         {
2172             add
2173             {
2174                 if (s_networkWifiNotificationChanged == null)
2175                 {
2176                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
2177                     if (ret != SystemSettingsError.None)
2178                     {
2179                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2180                     }
2181                 }
2182                 s_networkWifiNotificationChanged += value;
2183             }
2184
2185             remove
2186             {
2187                 if (s_networkWifiNotificationChanged == null) {
2188                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2189                     return;
2190                 }
2191                 s_networkWifiNotificationChanged -= value;
2192                 if (s_networkWifiNotificationChanged == null)
2193                 {
2194                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback);
2195                     if (ret != SystemSettingsError.None)
2196                     {
2197                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2198                     }
2199                 }
2200             }
2201         }
2202
2203         private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2204         {
2205             bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2206             NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2207             s_networkFlightModeChanged?.Invoke(null, eventArgs);
2208         };
2209         private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2210         /// <summary>
2211         /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2212         /// </summary>
2213         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2214         /// <privlevel>platform</privlevel>
2215         /// <feature>http://tizen.org/feature/systemsetting</feature>
2216         /// <exception cref="ArgumentException">Invalid Argument</exception>
2217         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2218         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2219         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2220         /// <since_tizen> 3 </since_tizen>
2221         public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2222         {
2223             add
2224             {
2225                 if (s_networkFlightModeChanged == null)
2226                 {
2227                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2228                     if (ret != SystemSettingsError.None)
2229                     {
2230                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2231                     }
2232                 }
2233                 s_networkFlightModeChanged += value;
2234             }
2235
2236             remove
2237             {
2238                 if (s_networkFlightModeChanged == null) {
2239                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2240                     return;
2241                 }
2242                 s_networkFlightModeChanged -= value;
2243                 if (s_networkFlightModeChanged == null)
2244                 {
2245                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback);
2246                     if (ret != SystemSettingsError.None)
2247                     {
2248                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2249                     }
2250                 }
2251             }
2252         }
2253
2254         private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2255         {
2256             int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2257             ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2258             s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2259         };
2260         private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2261         /// <summary>
2262         /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2263         /// </summary>
2264         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2265         /// <privlevel>platform</privlevel>
2266         /// <feature>http://tizen.org/feature/systemsetting</feature>
2267         /// <exception cref="ArgumentException">Invalid Argument</exception>
2268         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2269         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2270         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2271         /// <since_tizen> 3 </since_tizen>
2272         public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2273         {
2274             add
2275             {
2276                 if (s_screenBacklightTimeChanged == null)
2277                 {
2278                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2279                     if (ret != SystemSettingsError.None)
2280                     {
2281                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2282                     }
2283                 }
2284                 s_screenBacklightTimeChanged += value;
2285             }
2286
2287             remove
2288             {
2289                 if (s_screenBacklightTimeChanged == null) {
2290                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2291                     return;
2292                 }
2293                 s_screenBacklightTimeChanged -= value;
2294                 if (s_screenBacklightTimeChanged == null)
2295                 {
2296                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback);
2297                     if (ret != SystemSettingsError.None)
2298                     {
2299                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2300                     }
2301                 }
2302             }
2303         }
2304
2305         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2306         {
2307             string soundNotification = SystemSettings.SoundNotification;
2308             SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2309             s_soundNotificationChanged?.Invoke(null, eventArgs);
2310         };
2311         private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2312         /// <summary>
2313         /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2314         /// </summary>
2315         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2316         /// <privlevel>platform</privlevel>
2317         /// <feature>http://tizen.org/feature/systemsetting</feature>
2318         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2319         /// <exception cref="ArgumentException">Invalid Argument</exception>
2320         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2321         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2322         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2323         /// <since_tizen> 3 </since_tizen>
2324         public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2325         {
2326             add
2327             {
2328                 if (s_soundNotificationChanged == null)
2329                 {
2330                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2331                     if (ret != SystemSettingsError.None)
2332                     {
2333                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2334                     }
2335                 }
2336                 s_soundNotificationChanged += value;
2337             }
2338
2339             remove
2340             {
2341                 if (s_soundNotificationChanged == null) {
2342                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2343                     return;
2344                 }
2345                 s_soundNotificationChanged -= value;
2346                 if (s_soundNotificationChanged == null)
2347                 {
2348                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback);
2349                     if (ret != SystemSettingsError.None)
2350                     {
2351                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2352                     }
2353                 }
2354             }
2355         }
2356
2357         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2358         {
2359             int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2360             SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2361             s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2362         };
2363         private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2364         /// <summary>
2365         /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2366         /// </summary>
2367         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2368         /// <privlevel>platform</privlevel>
2369         /// <feature>http://tizen.org/feature/systemsetting</feature>
2370         /// <exception cref="ArgumentException">Invalid Argument</exception>
2371         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2372         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2373         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2374         /// <since_tizen> 3 </since_tizen>
2375         public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2376         {
2377             add
2378             {
2379                 if (s_soundNotificationRepetitionPeriodChanged == null)
2380                 {
2381                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2382                     if (ret != SystemSettingsError.None)
2383                     {
2384                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2385                     }
2386                 }
2387                 s_soundNotificationRepetitionPeriodChanged += value;
2388             }
2389
2390             remove
2391             {
2392                 if (s_soundNotificationRepetitionPeriodChanged == null) {
2393                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2394                     return;
2395                 }
2396                 s_soundNotificationRepetitionPeriodChanged -= value;
2397                 if (s_soundNotificationRepetitionPeriodChanged == null)
2398                 {
2399                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback);
2400                     if (ret != SystemSettingsError.None)
2401                     {
2402                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2403                     }
2404                 }
2405             }
2406         }
2407
2408         private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2409         {
2410             SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2411             LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2412             s_lockStateChanged?.Invoke(null, eventArgs);
2413         };
2414         private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2415         /// <summary>
2416         /// The LockStateChanged event is triggered when the current lock state is changed.
2417         /// </summary>
2418         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2419         /// <privlevel>platform</privlevel>
2420         /// <feature>http://tizen.org/feature/systemsetting</feature>
2421         /// <exception cref="ArgumentException">Invalid Argument</exception>
2422         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2423         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2424         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2425         /// <since_tizen> 3 </since_tizen>
2426         public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2427         {
2428             add
2429             {
2430                 if (s_lockStateChanged == null)
2431                 {
2432                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2433                     if (ret != SystemSettingsError.None)
2434                     {
2435                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2436                     }
2437                 }
2438                 s_lockStateChanged += value;
2439             }
2440
2441             remove
2442             {
2443                 if (s_lockStateChanged == null) {
2444                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2445                     return;
2446                 }
2447                 s_lockStateChanged -= value;
2448                 if (s_lockStateChanged == null)
2449                 {
2450                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback);
2451                     if (ret != SystemSettingsError.None)
2452                     {
2453                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2454                     }
2455                 }
2456             }
2457         }
2458
2459         private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2460         {
2461             string adsId = SystemSettings.AdsId;
2462             AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2463             s_adsIdChanged?.Invoke(null, eventArgs);
2464         };
2465         private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2466         /// <summary>
2467         /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2468         /// </summary>
2469         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2470         /// <privlevel>platform</privlevel>
2471         /// <feature>http://tizen.org/feature/systemsetting</feature>
2472         /// <exception cref="ArgumentException">Invalid Argument</exception>
2473         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2474         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2475         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2476         /// <since_tizen> 3 </since_tizen>
2477         public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2478         {
2479             add
2480             {
2481                 if (s_adsIdChanged == null)
2482                 {
2483                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2484                     if (ret != SystemSettingsError.None)
2485                     {
2486                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2487                     }
2488                 }
2489                 s_adsIdChanged += value;
2490             }
2491
2492             remove
2493             {
2494                 if (s_adsIdChanged == null) {
2495                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2496                     return;
2497                 }
2498                 s_adsIdChanged -= value;
2499                 if (s_adsIdChanged == null)
2500                 {
2501                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback);
2502                     if (ret != SystemSettingsError.None)
2503                     {
2504                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2505                     }
2506                 }
2507             }
2508         }
2509
2510         private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2511         {
2512             SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2513             UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2514             s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2515         };
2516         private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2517         /// <summary>
2518         /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2519         /// </summary>
2520         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2521         /// <privlevel>platform</privlevel>
2522         /// <feature>http://tizen.org/feature/systemsetting</feature>
2523         /// <feature>http://tizen.org/feature/network.telephony</feature>
2524         /// <exception cref="ArgumentException">Invalid Argument</exception>
2525         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2526         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2527         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2528         /// <since_tizen> 3 </since_tizen>
2529         public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2530         {
2531             add
2532             {
2533                 if (s_ultraDataSaveChanged == null)
2534                 {
2535                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2536                     if (ret != SystemSettingsError.None)
2537                     {
2538                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2539                     }
2540                 }
2541                 s_ultraDataSaveChanged += value;
2542             }
2543
2544             remove
2545             {
2546                 if (s_ultraDataSaveChanged == null) {
2547                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2548                     return;
2549                 }
2550                 s_ultraDataSaveChanged -= value;
2551                 if (s_ultraDataSaveChanged == null)
2552                 {
2553                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback);
2554                     if (ret != SystemSettingsError.None)
2555                     {
2556                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2557                     }
2558                 }
2559             }
2560         }
2561
2562         private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2563         {
2564             string ultraDataSavePackageList = "None";
2565             UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2566             s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2567         };
2568         private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2569         /// <summary>
2570         /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2571         /// </summary>
2572         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2573         /// <privlevel>platform</privlevel>
2574         /// <feature>http://tizen.org/feature/systemsetting</feature>
2575         /// <feature>http://tizen.org/feature/network.telephony</feature>
2576         /// <exception cref="ArgumentException">Invalid Argument</exception>
2577         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2578         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2579         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2580         /// <since_tizen> 3 </since_tizen>
2581         public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2582         {
2583             add
2584             {
2585                 if (s_ultraDataSavePackageListChanged == null)
2586                 {
2587                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2588                     if (ret != SystemSettingsError.None)
2589                     {
2590                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2591                     }
2592                 }
2593                 s_ultraDataSavePackageListChanged += value;
2594             }
2595
2596             remove
2597             {
2598                 if (s_ultraDataSavePackageListChanged == null) {
2599                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2600                     return;
2601                 }
2602                 s_ultraDataSavePackageListChanged -= value;
2603                 if (s_ultraDataSavePackageListChanged == null)
2604                 {
2605                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback);
2606                     if (ret != SystemSettingsError.None)
2607                     {
2608                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2609                     }
2610                 }
2611             }
2612         }
2613
2614         private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2615         {
2616             bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2617             AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2618             s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2619         };
2620         private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2621         /// <summary>
2622         /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2623         /// </summary>
2624         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2625         /// <privlevel>platform</privlevel>
2626         /// <feature>http://tizen.org/feature/systemsetting</feature>
2627         /// <exception cref="ArgumentException">Invalid Argument</exception>
2628         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2629         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2630         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2631         /// <since_tizen> 4 </since_tizen>
2632         public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2633         {
2634             add
2635             {
2636                 if (s_accessibilityTtsChanged == null)
2637                 {
2638                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2639                     if (ret != SystemSettingsError.None)
2640                     {
2641                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2642                     }
2643                 }
2644                 s_accessibilityTtsChanged += value;
2645             }
2646
2647             remove
2648             {
2649                 if (s_accessibilityTtsChanged == null) {
2650                     Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2651                     return;
2652                 }
2653                 s_accessibilityTtsChanged -= value;
2654                 if (s_accessibilityTtsChanged == null)
2655
2656                 {
2657                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback);
2658                     if (ret != SystemSettingsError.None)
2659                     {
2660                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2661                     }
2662                 }
2663             }
2664         }
2665
2666         private static readonly Interop.Settings.SystemSettingsChangedCallback s_vibrationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2667         {
2668             bool vibration = SystemSettings.Vibration;
2669             VibrationChangedEventArgs eventArgs = new VibrationChangedEventArgs(vibration);
2670             s_vibrationChanged?.Invoke(null, eventArgs);
2671         };
2672         private static event EventHandler<VibrationChangedEventArgs> s_vibrationChanged;
2673         /// <summary>
2674         /// The VibrationChanged event is triggered when the vibration value is changed.
2675         /// </summary>
2676         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2677         /// <privlevel>platform</privlevel>
2678         /// <feature>http://tizen.org/feature/systemsetting</feature>
2679         /// <exception cref="ArgumentException">Invalid Argument</exception>
2680         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2681         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2682         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2683         /// <since_tizen> 5 </since_tizen>
2684         public static event EventHandler<VibrationChangedEventArgs> VibrationChanged
2685         {
2686             add
2687             {
2688                 if (s_vibrationChanged == null)
2689                 {
2690                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback, IntPtr.Zero);
2691                     if (ret != SystemSettingsError.None)
2692                     {
2693                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2694                     }
2695                 }
2696                 s_vibrationChanged += value;
2697             }
2698
2699             remove
2700             {
2701                 s_vibrationChanged -= value;
2702                 if (s_vibrationChanged == null)
2703                 {
2704                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback);
2705                     if (ret != SystemSettingsError.None)
2706                     {
2707                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2708                     }
2709                 }
2710             }
2711         }
2712
2713         private static readonly Interop.Settings.SystemSettingsChangedCallback s_automaticTimeUpdateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2714         {
2715             bool automaticTimeUpdate = SystemSettings.AutomaticTimeUpdate;
2716             AutomaticTimeUpdateChangedEventArgs eventArgs = new AutomaticTimeUpdateChangedEventArgs(automaticTimeUpdate);
2717             s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
2718         };
2719         private static event EventHandler<AutomaticTimeUpdateChangedEventArgs> s_automaticTimeUpdateChanged;
2720         /// <summary>
2721         /// The AutomaticTimeUpdateChanged event is triggered when the AutomaticTimeUpdate value is changed.
2722         /// </summary>
2723         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2724         /// <privlevel>platform</privlevel>
2725         /// <feature>http://tizen.org/feature/systemsetting</feature>
2726         /// <exception cref="ArgumentException">Invalid Argument</exception>
2727         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2728         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2729         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2730         /// <since_tizen> 5 </since_tizen>
2731         public static event EventHandler<AutomaticTimeUpdateChangedEventArgs> AutomaticTimeUpdateChanged
2732         {
2733             add
2734             {
2735                 if (s_automaticTimeUpdateChanged == null)
2736                 {
2737                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback, IntPtr.Zero);
2738                     if (ret != SystemSettingsError.None)
2739                     {
2740                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2741                     }
2742                 }
2743                 s_automaticTimeUpdateChanged += value;
2744             }
2745
2746             remove
2747             {
2748                 s_automaticTimeUpdateChanged -= value;
2749                 if (s_automaticTimeUpdateChanged == null)
2750                 {
2751                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback);
2752                     if (ret != SystemSettingsError.None)
2753                     {
2754                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2755                     }
2756                 }
2757             }
2758         }
2759
2760         private static readonly Interop.Settings.SystemSettingsChangedCallback s_developerOptionStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2761         {
2762             bool developerOptionState = SystemSettings.DeveloperOptionState;
2763             DeveloperOptionStateChangedEventArgs eventArgs = new DeveloperOptionStateChangedEventArgs(developerOptionState);
2764             s_developerOptionStateChanged?.Invoke(null, eventArgs);
2765         };
2766         private static event EventHandler<DeveloperOptionStateChangedEventArgs> s_developerOptionStateChanged;
2767         /// <summary>
2768         /// The DeveloperOptionStateChanged event is triggered when the DeveloperOptionState value is changed.
2769         /// </summary>
2770         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2771         /// <privlevel>platform</privlevel>
2772         /// <feature>http://tizen.org/feature/systemsetting</feature>
2773         /// <exception cref="ArgumentException">Invalid Argument</exception>
2774         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2775         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2776         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2777         /// <since_tizen> 5 </since_tizen>
2778         public static event EventHandler<DeveloperOptionStateChangedEventArgs> DeveloperOptionStateChanged
2779         {
2780             add
2781             {
2782                 if (s_developerOptionStateChanged == null)
2783                 {
2784                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback, IntPtr.Zero);
2785                     if (ret != SystemSettingsError.None)
2786                     {
2787                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2788                     }
2789                 }
2790                 s_developerOptionStateChanged += value;
2791             }
2792
2793             remove
2794             {
2795                 s_developerOptionStateChanged -= value;
2796                 if (s_developerOptionStateChanged == null)
2797                 {
2798                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback);
2799                     if (ret != SystemSettingsError.None)
2800                     {
2801                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2802                     }
2803                 }
2804             }
2805         }
2806     }
2807 }
2808