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