Revert "Changed DllIport entry point for new system-settings API for callback."
[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         /// <exception cref="ArgumentException">Invalid Argument</exception>
140         /// <exception cref="NotSupportedException">Not Supported feature</exception>
141         /// <exception cref="InvalidOperationException">Invalid operation</exception>
142         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
143         /// <since_tizen> 3 </since_tizen>
144         public static SystemSettingsFontSize FontSize
145         {
146             get
147             {
148                 int fontSize;
149                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.FontSize, out fontSize);
150                 if (res != SystemSettingsError.None)
151                 {
152                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontSize system setting.");
153                 }
154                 return (SystemSettingsFontSize)fontSize;
155             }
156             set
157             {
158                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.FontSize, (int)value);
159                 if (res != SystemSettingsError.None)
160                 {
161                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontSize system setting.");
162                 }
163             }
164         }
165
166         /// <summary>
167         /// The current system font type.
168         /// </summary>
169         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
170         /// <privlevel>platform</privlevel>
171         /// <feature>http://tizen.org/feature/systemsetting</feature>
172         /// <exception cref="ArgumentException">Invalid Argument</exception>
173         /// <exception cref="NotSupportedException">Not Supported feature</exception>
174         /// <exception cref="InvalidOperationException">Invalid operation</exception>
175         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
176         /// <since_tizen> 3 </since_tizen>
177         public static string FontType
178         {
179             get
180             {
181                 string fontType;
182                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.FontType, out fontType);
183                 if (res != SystemSettingsError.None)
184                 {
185                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontType system setting.");
186                 }
187                 return fontType;
188             }
189             set
190             {
191                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.FontType, value);
192                 if (res != SystemSettingsError.None)
193                 {
194                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontType system setting.");
195                 }
196             }
197         }
198
199         /// <summary>
200         /// Indicates whether the motion service is activated.
201         /// </summary>
202         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
203         /// <privlevel>platform</privlevel>
204         /// <feature>http://tizen.org/feature/systemsetting</feature>
205         /// <exception cref="ArgumentException">Invalid Argument</exception>
206         /// <exception cref="NotSupportedException">Not Supported feature</exception>
207         /// <exception cref="InvalidOperationException">Invalid operation</exception>
208         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
209         /// <since_tizen> 3 </since_tizen>
210         public static bool MotionActivationEnabled
211         {
212             get
213             {
214                 bool isMotionServiceActivated;
215                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated);
216                 if (res != SystemSettingsError.None)
217                 {
218                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionActivation system setting.");
219                 }
220                 return isMotionServiceActivated;
221             }
222             set
223             {
224                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivationEnabled, value);
225                 if (res != SystemSettingsError.None)
226                 {
227                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set MotionActivation system setting.");
228                 }
229             }
230         }
231
232         /// <summary>
233         /// The file path of the current email alert ringtone.
234         /// </summary>
235         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
236         /// <privlevel>platform</privlevel>
237         /// <feature>http://tizen.org/feature/systemsetting</feature>
238         /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
239         /// <exception cref="ArgumentException">Invalid Argument</exception>
240         /// <exception cref="NotSupportedException">Not Supported feature</exception>
241         /// <exception cref="InvalidOperationException">Invalid operation</exception>
242         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
243         /// <since_tizen> 3 </since_tizen>
244         public static string EmailAlertRingtone
245         {
246             get
247             {
248                 string filePath;
249                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.EmailAlertRingtone, out filePath);
250                 if (res != SystemSettingsError.None)
251                 {
252                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get EmailAlertRingtone system setting.");
253                 }
254                 return filePath;
255             }
256             set
257             {
258                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.EmailAlertRingtone, value);
259                 if (res != SystemSettingsError.None)
260                 {
261                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set EmailAlertRingtone system setting.");
262                 }
263             }
264         }
265         /// <summary>
266         /// Indicates whether the USB debugging is enabled.
267         /// </summary>
268         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
269         /// <privlevel>platform</privlevel>
270         /// <feature>http://tizen.org/feature/systemsetting</feature>
271         /// <exception cref="ArgumentException">Invalid Argument</exception>
272         /// <exception cref="NotSupportedException">Not Supported feature</exception>
273         /// <exception cref="InvalidOperationException">Invalid operation</exception>
274         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
275         /// <since_tizen> 3 </since_tizen>
276         public static bool UsbDebuggingEnabled
277         {
278             get
279             {
280                 bool isusbDebuggingEnabled;
281                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, out isusbDebuggingEnabled);
282                 if (res != SystemSettingsError.None)
283                 {
284                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UsbDebuggingEnabled system setting.");
285                 }
286                 return isusbDebuggingEnabled;
287             }
288             set
289             {
290                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, value);
291                 if (res != SystemSettingsError.None)
292                 {
293                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set UsbDebuggingEnabled system setting.");
294                 }
295             }
296         }
297
298         /// <summary>
299         /// Indicates whether the 3G data network is enabled.
300         /// </summary>
301         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
302         /// <privlevel>platform</privlevel>
303         /// <feature>http://tizen.org/feature/systemsetting</feature>
304         /// <exception cref="ArgumentException">Invalid Argument</exception>
305         /// <exception cref="NotSupportedException">Not Supported feature</exception>
306         /// <exception cref="InvalidOperationException">Invalid operation</exception>
307         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
308         /// <since_tizen> 3 </since_tizen>
309         public static bool Data3GNetworkEnabled
310         {
311             get
312             {
313                 bool is3GDataEnabled;
314                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, out is3GDataEnabled);
315                 if (res != SystemSettingsError.None)
316                 {
317                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Data3GNetworkEnabled system setting.");
318                 }
319                 return is3GDataEnabled;
320             }
321             set
322             {
323                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, value);
324                 if (res != SystemSettingsError.None)
325                 {
326                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set Data3GNetworkEnabled system setting.");
327                 }
328             }
329         }
330
331         /// <summary>
332         /// Indicates the lock-screen application package name.
333         /// </summary>
334         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
335         /// <privlevel>platform</privlevel>
336         /// <feature>http://tizen.org/feature/systemsetting</feature>
337         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
338         /// <exception cref="ArgumentException">Invalid Argument</exception>
339         /// <exception cref="NotSupportedException">Not Supported feature</exception>
340         /// <exception cref="InvalidOperationException">Invalid operation</exception>
341         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
342         /// <since_tizen> 4 </since_tizen>
343         public static string LockScreenApp
344         {
345             get
346             {
347                 string pkgName;
348                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LockScreenApp, out pkgName);
349                 if (res != SystemSettingsError.None)
350                 {
351                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockScreenApp system setting.");
352                 }
353                 return pkgName;
354             }
355             set
356             {
357                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LockScreenApp, value);
358                 if (res != SystemSettingsError.None)
359                 {
360                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockScreenApp system setting.");
361                 }
362             }
363         }
364
365         /// <summary>
366         /// The current system default font type (only supports Get).
367         /// </summary>
368         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
369         /// <privlevel>platform</privlevel>
370         /// <feature>http://tizen.org/feature/systemsetting</feature>
371         /// <exception cref="ArgumentException">Invalid Argument</exception>
372         /// <exception cref="NotSupportedException">Not Supported feature</exception>
373         /// <exception cref="InvalidOperationException">Invalid operation</exception>
374         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
375         /// <since_tizen> 3 </since_tizen>
376         public static string DefaultFontType
377         {
378             get
379             {
380                 string defaultFontType;
381                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DefaultFontType, out defaultFontType);
382                 if (res != SystemSettingsError.None)
383                 {
384                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DefaultFontType system setting value.");
385                 }
386                 return defaultFontType;
387             }
388         }
389
390         /// <summary>
391         /// Indicates the current country setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax.
392         /// The country setting is in the ISO 639-2 format,
393         /// and the region setting is in the ISO 3166-1 alpha-2 format.
394         /// </summary>
395         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
396         /// <privlevel>platform</privlevel>
397         /// <feature>http://tizen.org/feature/systemsetting</feature>
398         /// <exception cref="ArgumentException">Invalid Argument</exception>
399         /// <exception cref="NotSupportedException">Not Supported feature</exception>
400         /// <exception cref="InvalidOperationException">Invalid operation</exception>
401         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
402         /// <since_tizen> 3 </since_tizen>
403         public static string LocaleCountry
404         {
405             get
406             {
407                 string countrySetting;
408                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleCountry, out countrySetting);
409                 if (res != SystemSettingsError.None)
410                 {
411                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleCountry system setting.");
412                 }
413                 return countrySetting;
414             }
415             set
416             {
417                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleCountry, value);
418                 if (res != SystemSettingsError.None)
419                 {
420                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleCountry system setting.");
421                 }
422             }
423         }
424
425         /// <summary>
426         /// Indicates the current language setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax.
427         /// The language setting is in the ISO 639-2 format,
428         /// and the region setting is in the ISO 3166-1 alpha-2 format.
429         /// </summary>
430         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
431         /// <privlevel>platform</privlevel>
432         /// <feature>http://tizen.org/feature/systemsetting</feature>
433         /// <exception cref="ArgumentException">Invalid Argument</exception>
434         /// <exception cref="NotSupportedException">Not Supported feature</exception>
435         /// <exception cref="InvalidOperationException">Invalid operation</exception>
436         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
437         /// <since_tizen> 3 </since_tizen>
438         public static string LocaleLanguage
439         {
440             get
441             {
442                 string languageSetting;
443                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleLanguage, out languageSetting);
444                 if (res != SystemSettingsError.None)
445                 {
446                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleLanguage system setting.");
447                 }
448                 return languageSetting;
449             }
450             set
451             {
452                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleLanguage, value);
453                 if (res != SystemSettingsError.None)
454                 {
455                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleLanguage system setting.");
456                 }
457             }
458         }
459
460         /// <summary>
461         /// Indicates whether the 24-hour clock is used.
462         /// If the value is false, the 12-hour clock is used.
463         /// </summary>
464         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
465         /// <privlevel>platform</privlevel>
466         /// <feature>http://tizen.org/feature/systemsetting</feature>
467         /// <exception cref="ArgumentException">Invalid Argument</exception>
468         /// <exception cref="NotSupportedException">Not Supported feature</exception>
469         /// <exception cref="InvalidOperationException">Invalid operation</exception>
470         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
471         /// <since_tizen> 3 </since_tizen>
472         public static bool LocaleTimeFormat24HourEnabled
473         {
474             get
475             {
476                 bool is24HrFormat;
477                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat);
478                 if (res != SystemSettingsError.None)
479                 {
480                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeFormat24Hour system setting.");
481                 }
482                 return is24HrFormat;
483             }
484             set
485             {
486                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, value);
487                 if (res != SystemSettingsError.None)
488                 {
489                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeFormat24Hour system setting.");
490                 }
491             }
492         }
493
494         /// <summary>
495         /// Indicates the current time zone, for example, Pacific/Tahiti.
496         /// </summary>
497         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
498         /// <privlevel>platform</privlevel>
499         /// <feature>http://tizen.org/feature/systemsetting</feature>
500         /// <exception cref="ArgumentException">Invalid Argument</exception>
501         /// <exception cref="NotSupportedException">Not Supported feature</exception>
502         /// <exception cref="InvalidOperationException">Invalid operation</exception>
503         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
504         /// <since_tizen> 3 </since_tizen>
505         public static string LocaleTimeZone
506         {
507             get
508             {
509                 string timeZone;
510                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone);
511                 if (res != SystemSettingsError.None)
512                 {
513                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeZone system setting.");
514                 }
515                 return timeZone;
516             }
517             set
518             {
519                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimeZone, value);
520                 if (res != SystemSettingsError.None)
521                 {
522                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeZone system setting.");
523                 }
524             }
525         }
526
527         /// <summary>
528         /// Once the system changes time, this event occurs to notify the time change.
529         /// </summary>
530         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
531         /// <privlevel>platform</privlevel>
532         /// <feature>http://tizen.org/feature/systemsetting</feature>
533         /// <exception cref="ArgumentException">Invalid Argument</exception>
534         /// <exception cref="NotSupportedException">Not Supported feature</exception>
535         /// <exception cref="InvalidOperationException">Invalid operation</exception>
536         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
537         /// <since_tizen> 3 </since_tizen>
538         public static int Time
539         {
540             get
541             {
542                 int time;
543                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time);
544                 if (res != SystemSettingsError.None)
545                 {
546                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting.");
547                 }
548                 return time;
549             }
550         }
551         /// <summary>
552         /// Indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound.
553         /// </summary>
554         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
555         /// <privlevel>platform</privlevel>
556         /// <feature>http://tizen.org/feature/systemsetting</feature>
557         /// <exception cref="ArgumentException">Invalid Argument</exception>
558         /// <exception cref="NotSupportedException">Not Supported feature</exception>
559         /// <exception cref="InvalidOperationException">Invalid operation</exception>
560         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
561         /// <since_tizen> 3 </since_tizen>
562         public static bool SoundLockEnabled
563         {
564             get
565             {
566                 bool isSoundLockEnabled;
567                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled);
568                 if (res != SystemSettingsError.None)
569                 {
570                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundLock system setting.");
571                 }
572                 return isSoundLockEnabled;
573             }
574         }
575
576         /// <summary>
577         /// Indicates whether the device is in the silent mode.
578         /// </summary>
579         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
580         /// <privlevel>platform</privlevel>
581         /// <feature>http://tizen.org/feature/systemsetting</feature>
582         /// <exception cref="ArgumentException">Invalid Argument</exception>
583         /// <exception cref="NotSupportedException">Not Supported feature</exception>
584         /// <exception cref="InvalidOperationException">Invalid operation</exception>
585         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
586         /// <since_tizen> 3 </since_tizen>
587         public static bool SoundSilentModeEnabled
588         {
589             get
590             {
591                 bool isSilent;
592                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent);
593                 if (res != SystemSettingsError.None)
594                 {
595                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundSilentMode system setting.");
596                 }
597                 return isSilent;
598             }
599         }
600
601         /// <summary>
602         /// Indicates whether the screen touch sound is enabled on the device.
603         /// </summary>
604         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
605         /// <privlevel>platform</privlevel>
606         /// <feature>http://tizen.org/feature/systemsetting</feature>
607         /// <exception cref="ArgumentException">Invalid Argument</exception>
608         /// <exception cref="NotSupportedException">Not Supported feature</exception>
609         /// <exception cref="InvalidOperationException">Invalid operation</exception>
610         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
611         /// <since_tizen> 3 </since_tizen>
612         public static bool SoundTouchEnabled
613         {
614             get
615             {
616                 bool isTouchSoundEnabled;
617                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled);
618                 if (res != SystemSettingsError.None)
619                 {
620                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundTouch system setting value.");
621                 }
622                 return isTouchSoundEnabled;
623             }
624         }
625
626         /// <summary>
627         /// Indicates whether the rotation control is automatic.
628         /// </summary>
629         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
630         /// <privlevel>platform</privlevel>
631         /// <feature>http://tizen.org/feature/systemsetting</feature>
632         /// <exception cref="ArgumentException">Invalid Argument</exception>
633         /// <exception cref="NotSupportedException">Not Supported feature</exception>
634         /// <exception cref="InvalidOperationException">Invalid operation</exception>
635         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
636         /// <since_tizen> 3 </since_tizen>
637         public static bool DisplayScreenRotationAutoEnabled
638         {
639             get
640             {
641                 bool isRotationAutomatic;
642                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic);
643                 if (res != SystemSettingsError.None)
644                 {
645                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DisplayScreenRotationAuto system setting.");
646                 }
647                 return isRotationAutomatic;
648             }
649         }
650
651         /// <summary>
652         /// Indicates the device name.
653         /// </summary>
654         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
655         /// <privlevel>platform</privlevel>
656         /// <feature>http://tizen.org/feature/systemsetting</feature>
657         /// <exception cref="ArgumentException">Invalid Argument</exception>
658         /// <exception cref="NotSupportedException">Not Supported feature</exception>
659         /// <exception cref="InvalidOperationException">Invalid operation</exception>
660         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
661         /// <since_tizen> 3 </since_tizen>
662         public static string DeviceName
663         {
664             get
665             {
666                 string deviceName;
667                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DeviceName, out deviceName);
668                 if (res != SystemSettingsError.None)
669                 {
670                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DeviceName system setting value.");
671                 }
672                 return deviceName;
673             }
674         }
675         /// <summary>
676         /// Indicates whether the device user has enabled the motion feature.
677         /// </summary>
678         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
679         /// <privlevel>platform</privlevel>
680         /// <feature>http://tizen.org/feature/systemsetting</feature>
681         /// <exception cref="ArgumentException">Invalid Argument</exception>
682         /// <exception cref="NotSupportedException">Not Supported feature</exception>
683         /// <exception cref="InvalidOperationException">Invalid operation</exception>
684         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
685         /// <since_tizen> 3 </since_tizen>
686         public static bool MotionEnabled
687         {
688             get
689             {
690                 bool isMotionEnabled;
691                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionEnabled, out isMotionEnabled);
692                 if (res != SystemSettingsError.None)
693                 {
694                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionEnabled system setting value.");
695                 }
696                 return isMotionEnabled;
697             }
698         }
699
700         /// <summary>
701         /// Indicates whether Wi-Fi related notifications are enabled on the device.
702         /// </summary>
703         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
704         /// <privlevel>platform</privlevel>
705         /// <feature>http://tizen.org/feature/systemsetting</feature>
706         /// <feature>http://tizen.org/feature/network.wifi</feature>
707         /// <exception cref="ArgumentException">Invalid Argument</exception>
708         /// <exception cref="NotSupportedException">Not Supported feature</exception>
709         /// <exception cref="InvalidOperationException">Invalid operation</exception>
710         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
711         /// <since_tizen> 3 </since_tizen>
712         public static bool NetworkWifiNotificationEnabled
713         {
714             get
715             {
716                 bool isWifiNotificationEnabled;
717                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled);
718                 if (res != SystemSettingsError.None)
719                 {
720                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkWifiNotification system setting.");
721                 }
722                 return isWifiNotificationEnabled;
723             }
724         }
725
726         /// <summary>
727         /// Indicates whether the device is in the flight mode.
728         /// </summary>
729         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
730         /// <privlevel>platform</privlevel>
731         /// <feature>http://tizen.org/feature/systemsetting</feature>
732         /// <exception cref="ArgumentException">Invalid Argument</exception>
733         /// <exception cref="NotSupportedException">Not Supported feature</exception>
734         /// <exception cref="InvalidOperationException">Invalid operation</exception>
735         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
736         /// <since_tizen> 3 </since_tizen>
737         public static bool NetworkFlightModeEnabled
738         {
739             get
740             {
741                 bool isFlightModeEnabled;
742                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled);
743                 if (res != SystemSettingsError.None)
744                 {
745                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkFlightMode system setting.");
746                 }
747                 return isFlightModeEnabled;
748             }
749         }
750
751         /// <summary>
752         /// Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600.
753         /// </summary>
754         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
755         /// <privlevel>platform</privlevel>
756         /// <feature>http://tizen.org/feature/systemsetting</feature>
757         /// <exception cref="ArgumentException">Invalid Argument</exception>
758         /// <exception cref="NotSupportedException">Not Supported feature</exception>
759         /// <exception cref="InvalidOperationException">Invalid operation</exception>
760         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
761         /// <since_tizen> 3 </since_tizen>
762         public static int ScreenBacklightTime
763         {
764             get
765             {
766                 int backlightTime;
767                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.ScreenBacklightTime, out backlightTime);
768                 if (res != SystemSettingsError.None)
769                 {
770                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get ScreenBacklightTime system setting.");
771                 }
772                 return backlightTime;
773             }
774             set
775             {
776                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.ScreenBacklightTime, value);
777                 if (res != SystemSettingsError.None)
778                 {
779                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set ScreenBacklightTime system setting.");
780                 }
781             }
782         }
783
784         /// <summary>
785         /// Indicates the file path of the current notification tone set by the user.
786         /// </summary>
787         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
788         /// <privlevel>platform</privlevel>
789         /// <feature>http://tizen.org/feature/systemsetting</feature>
790         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
791         /// <exception cref="ArgumentException">Invalid Argument</exception>
792         /// <exception cref="NotSupportedException">Not Supported feature</exception>
793         /// <exception cref="InvalidOperationException">Invalid operation</exception>
794         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
795         /// <since_tizen> 3 </since_tizen>
796         public static string SoundNotification
797         {
798             get
799             {
800                 string filePath;
801                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.SoundNotification, out filePath);
802                 if (res != SystemSettingsError.None)
803                 {
804                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotification system setting.");
805                 }
806                 return filePath;
807             }
808             set
809             {
810                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.SoundNotification, value);
811                 if (res != SystemSettingsError.None)
812                 {
813                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotification system setting.");
814                 }
815             }
816         }
817
818         /// <summary>
819         /// Indicates the time period for notification repetitions.
820         /// </summary>
821         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
822         /// <privlevel>platform</privlevel>
823         /// <feature>http://tizen.org/feature/systemsetting</feature>
824         /// <exception cref="ArgumentException">Invalid Argument</exception>
825         /// <exception cref="NotSupportedException">Not Supported feature</exception>
826         /// <exception cref="InvalidOperationException">Invalid operation</exception>
827         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
828         /// <since_tizen> 3 </since_tizen>
829         public static int SoundNotificationRepetitionPeriod
830         {
831             get
832             {
833                 int notificationRepetitionPeriod;
834                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, out notificationRepetitionPeriod);
835                 if (res != SystemSettingsError.None)
836                 {
837                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotificationRepetitionPeriod system setting.");
838                 }
839                 return notificationRepetitionPeriod;
840             }
841             set
842             {
843                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, value);
844                 if (res != SystemSettingsError.None)
845                 {
846                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotificationRepetitionPeriod system setting.");
847                 }
848             }
849         }
850
851         /// <summary>
852         /// Indicates the current lock state.
853         /// </summary>
854         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
855         /// <privlevel>platform</privlevel>
856         /// <feature>http://tizen.org/feature/systemsetting</feature>
857         /// <exception cref="ArgumentException">Invalid Argument</exception>
858         /// <exception cref="NotSupportedException">Not Supported feature</exception>
859         /// <exception cref="InvalidOperationException">Invalid operation</exception>
860         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
861         /// <since_tizen> 3 </since_tizen>
862         public static SystemSettingsIdleLockState LockState
863         {
864             get
865             {
866                 int LockState;
867                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.LockState, out LockState);
868                 if (res != SystemSettingsError.None)
869                 {
870                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockState system setting.");
871                 }
872                 return (SystemSettingsIdleLockState)LockState;
873             }
874             set
875             {
876                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.LockState, (int)value);
877                 if (res != SystemSettingsError.None)
878                 {
879                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockState system setting.");
880                 }
881             }
882         }
883
884         /// <summary>
885         /// The current system ADS ID.
886         /// </summary>
887         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
888         /// <privlevel>platform</privlevel>
889         /// <feature>http://tizen.org/feature/systemsetting</feature>
890         /// <exception cref="ArgumentException">Invalid Argument</exception>
891         /// <exception cref="NotSupportedException">Not Supported feature</exception>
892         /// <exception cref="InvalidOperationException">Invalid operation</exception>
893         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
894         /// <since_tizen> 3 </since_tizen>
895         public static string AdsId
896         {
897             get
898             {
899                 string adsId;
900                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId);
901                 if (res != SystemSettingsError.None)
902                 {
903                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AdsId system setting.");
904                 }
905                 return adsId;
906             }
907             set
908             {
909                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.AdsId, value);
910                 if (res != SystemSettingsError.None)
911                 {
912                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AdsId system setting.");
913                 }
914             }
915         }
916
917
918         /// <summary>
919         /// Indicates the time period for notification repetitions.
920         /// </summary>
921         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
922         /// <privlevel>platform</privlevel>
923         /// <feature>http://tizen.org/feature/systemsetting</feature>
924         /// <feature>http://tizen.org/feature/network.telephony</feature>
925         /// <exception cref="ArgumentException">Invalid Argument</exception>
926         /// <exception cref="NotSupportedException">Not Supported feature</exception>
927         /// <exception cref="InvalidOperationException">Invalid operation</exception>
928         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
929         /// <since_tizen> 3 </since_tizen>
930         public static SystemSettingsUdsState UltraDataSave
931         {
932             get
933             {
934                 int UltraDataSave;
935                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave);
936                 if (res != SystemSettingsError.None)
937                 {
938                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UltraDataSave system setting.");
939                 }
940                 return (SystemSettingsUdsState)UltraDataSave;
941             }
942         }
943
944         /// <summary>
945         /// Indicates whether the accessibility TTS is enabled on the device.
946         /// </summary>
947         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
948         /// <privlevel>platform</privlevel>
949         /// <feature>http://tizen.org/feature/systemsetting</feature>
950         /// <exception cref="ArgumentException">Invalid Argument</exception>
951         /// <exception cref="NotSupportedException">Not Supported feature</exception>
952         /// <exception cref="InvalidOperationException">Invalid operation</exception>
953         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
954         /// <since_tizen> 4 </since_tizen>
955         public static bool AccessibilityTtsEnabled
956         {
957             get
958             {
959                 bool isAccessibilityTTSEnabled;
960                 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, out isAccessibilityTTSEnabled);
961                 if (res != SystemSettingsError.None)
962                 {
963                     throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AccessibilityTTS system setting value.");
964                 }
965                 return isAccessibilityTTSEnabled;
966             }
967         }
968
969
970         private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
971         {
972             string path = SystemSettings.IncomingCallRingtone;
973             IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
974             s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
975         };
976         private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
977         /// <summary>
978         /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
979         /// </summary>
980         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
981         /// <privlevel>platform</privlevel>
982         /// <feature>http://tizen.org/feature/systemsetting</feature>
983         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
984         /// <exception cref="ArgumentException">Invalid Argument</exception>
985         /// <exception cref="NotSupportedException">Not Supported feature</exception>
986         /// <exception cref="InvalidOperationException">Invalid operation</exception>
987         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
988         /// <since_tizen> 3 </since_tizen>
989         public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
990         {
991             add
992             {
993                 if (s_incomingCallRingtoneChanged == null)
994                 {
995                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
996                     if (ret != SystemSettingsError.None)
997                     {
998                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
999                     }
1000                 }
1001                 s_incomingCallRingtoneChanged += value;
1002             }
1003
1004             remove
1005             {
1006                 s_incomingCallRingtoneChanged -= value;
1007                 if (s_incomingCallRingtoneChanged == null)
1008                 {
1009                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone);
1010                     if (ret != SystemSettingsError.None)
1011                     {
1012                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1013                     }
1014                 }
1015             }
1016         }
1017
1018         private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1019         {
1020             string path = SystemSettings.WallpaperHomeScreen;
1021             WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1022             s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1023         };
1024         private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1025         /// <summary>
1026         /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1027         /// </summary>
1028         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1029         /// <privlevel>platform</privlevel>
1030         /// <feature>http://tizen.org/feature/systemsetting</feature>
1031         /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1032         /// <exception cref="ArgumentException">Invalid Argument</exception>
1033         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1034         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1035         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1036         /// <since_tizen> 3 </since_tizen>
1037         public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1038         {
1039             add
1040             {
1041                 if (s_wallpaperHomeScreenChanged == null)
1042                 {
1043                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1044                     if (ret != SystemSettingsError.None)
1045                     {
1046                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1047                     }
1048                 }
1049                 s_wallpaperHomeScreenChanged += value;
1050             }
1051
1052             remove
1053             {
1054                 s_wallpaperHomeScreenChanged -= value;
1055                 if (s_wallpaperHomeScreenChanged == null)
1056                 {
1057                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen);
1058                     if (ret != SystemSettingsError.None)
1059                     {
1060                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1061                     }
1062                 }
1063             }
1064         }
1065
1066         private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1067         {
1068             string path = SystemSettings.WallpaperLockScreen;
1069             WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1070             s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1071         };
1072         private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1073         /// <summary>
1074         /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1075         /// </summary>
1076         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1077         /// <privlevel>platform</privlevel>
1078         /// <feature>http://tizen.org/feature/systemsetting</feature>
1079         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1080         /// <exception cref="ArgumentException">Invalid Argument</exception>
1081         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1082         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1083         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1084         /// <since_tizen> 3 </since_tizen>
1085         public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1086         {
1087             add
1088             {
1089                 if (s_wallpaperLockScreenChanged == null)
1090                 {
1091                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1092                     if (ret != SystemSettingsError.None)
1093                     {
1094                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1095                     }
1096                 }
1097                 s_wallpaperLockScreenChanged += value;
1098             }
1099
1100             remove
1101             {
1102                 s_wallpaperLockScreenChanged -= value;
1103                 if (s_wallpaperLockScreenChanged == null)
1104                 {
1105                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen);
1106                     if (ret != SystemSettingsError.None)
1107                     {
1108                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1109                     }
1110                 }
1111             }
1112         }
1113
1114         private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1115         {
1116             SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1117             FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1118             s_fontSizeChanged?.Invoke(null, eventArgs);
1119         };
1120         private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1121         /// <summary>
1122         /// The FontSizeChanged event is triggered when the current system font size is changed.
1123         /// </summary>
1124         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1125         /// <privlevel>platform</privlevel>
1126         /// <feature>http://tizen.org/feature/systemsetting</feature>
1127         /// <exception cref="ArgumentException">Invalid Argument</exception>
1128         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1129         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1130         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1131         /// <since_tizen> 3 </since_tizen>
1132         public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1133         {
1134             add
1135             {
1136                 if (s_fontSizeChanged == null)
1137                 {
1138                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1139                     if (ret != SystemSettingsError.None)
1140                     {
1141                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1142                     }
1143                 }
1144                 s_fontSizeChanged += value;
1145             }
1146
1147             remove
1148             {
1149                 s_fontSizeChanged -= value;
1150                 if (s_fontSizeChanged == null)
1151                 {
1152                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize);
1153                     if (ret != SystemSettingsError.None)
1154                     {
1155                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1156                     }
1157                 }
1158             }
1159         }
1160
1161         private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1162         {
1163             string fontType = SystemSettings.FontType;
1164             FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1165             s_fontTypeChanged?.Invoke(null, eventArgs);
1166         };
1167         private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1168         /// <summary>
1169         /// The FontTypeChanged event is triggered when the current system font type is changed.
1170         /// </summary>
1171         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1172         /// <privlevel>platform</privlevel>
1173         /// <feature>http://tizen.org/feature/systemsetting</feature>
1174         /// <exception cref="ArgumentException">Invalid Argument</exception>
1175         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1176         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1177         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1178         /// <since_tizen> 3 </since_tizen>
1179         public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1180         {
1181             add
1182             {
1183                 if (s_fontTypeChanged == null)
1184                 {
1185                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1186                     if (ret != SystemSettingsError.None)
1187                     {
1188                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1189                     }
1190                 }
1191                 s_fontTypeChanged += value;
1192             }
1193
1194             remove
1195             {
1196                 s_fontTypeChanged -= value;
1197                 if (s_fontTypeChanged == null)
1198                 {
1199                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType);
1200                     if (ret != SystemSettingsError.None)
1201                     {
1202                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1203                     }
1204                 }
1205             }
1206         }
1207
1208         private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1209         {
1210             bool motionActivation = SystemSettings.MotionActivationEnabled;
1211             MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1212             s_motionActivationChanged?.Invoke(null, eventArgs);
1213         };
1214         private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1215         /// <summary>
1216         /// The MotionActivationChanged event is triggered when the motion service status is changed.
1217         /// </summary>
1218         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1219         /// <privlevel>platform</privlevel>
1220         /// <feature>http://tizen.org/feature/systemsetting</feature>
1221         /// <exception cref="ArgumentException">Invalid Argument</exception>
1222         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1223         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1224         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1225         /// <since_tizen> 3 </since_tizen>
1226         public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1227         {
1228             add
1229             {
1230                 if (s_motionActivationChanged == null)
1231                 {
1232                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1233                     if (ret != SystemSettingsError.None)
1234                     {
1235                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1236                     }
1237                 }
1238                 s_motionActivationChanged += value;
1239             }
1240
1241             remove
1242             {
1243                 s_motionActivationChanged -= value;
1244                 if (s_motionActivationChanged == null)
1245                 {
1246                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled);
1247                     if (ret != SystemSettingsError.None)
1248                     {
1249                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1250                     }
1251                 }
1252             }
1253         }
1254
1255         private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1256         {
1257             string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1258             EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1259             s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1260         };
1261         private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1262         /// <summary>
1263         /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1264         /// </summary>
1265         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1266         /// <privlevel>platform</privlevel>
1267         /// <feature>http://tizen.org/feature/systemsetting</feature>
1268         /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1269         /// <exception cref="ArgumentException">Invalid Argument</exception>
1270         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1271         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1272         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1273         /// <since_tizen> 3 </since_tizen>
1274         public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1275         {
1276             add
1277             {
1278                 if (s_emailAlertRingtoneChanged == null)
1279                 {
1280                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1281                     if (ret != SystemSettingsError.None)
1282                     {
1283                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1284                     }
1285                 }
1286                 s_emailAlertRingtoneChanged += value;
1287             }
1288
1289             remove
1290             {
1291                 s_emailAlertRingtoneChanged -= value;
1292                 if (s_emailAlertRingtoneChanged == null)
1293                 {
1294                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone);
1295                     if (ret != SystemSettingsError.None)
1296                     {
1297                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1298                     }
1299                 }
1300             }
1301         }
1302
1303         private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1304         {
1305             bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1306             UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1307             s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1308         };
1309         private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1310         /// <summary>
1311         /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1312         /// </summary>
1313         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1314         /// <privlevel>platform</privlevel>
1315         /// <feature>http://tizen.org/feature/systemsetting</feature>
1316         /// <exception cref="ArgumentException">Invalid Argument</exception>
1317         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1318         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1319         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1320         /// <since_tizen> 3 </since_tizen>
1321         public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1322         {
1323             add
1324             {
1325                 if (s_usbDebuggingSettingChanged == null)
1326                 {
1327                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1328                     if (ret != SystemSettingsError.None)
1329                     {
1330                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1331                     }
1332                 }
1333                 s_usbDebuggingSettingChanged += value;
1334             }
1335
1336             remove
1337             {
1338                 s_usbDebuggingSettingChanged -= value;
1339                 if (s_usbDebuggingSettingChanged == null)
1340                 {
1341                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled);
1342                     if (ret != SystemSettingsError.None)
1343                     {
1344                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1345                     }
1346                 }
1347             }
1348         }
1349
1350         private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1351         {
1352             bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1353             Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1354             s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1355         };
1356         private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1357         /// <summary>
1358         /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1359         /// </summary>
1360         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1361         /// <privlevel>platform</privlevel>
1362         /// <feature>http://tizen.org/feature/systemsetting</feature>
1363         /// <exception cref="ArgumentException">Invalid Argument</exception>
1364         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1365         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1366         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1367         /// <since_tizen> 3 </since_tizen>
1368         public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1369         {
1370             add
1371             {
1372                 if (s_data3GNetworkSettingChanged == null)
1373                 {
1374                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1375                     if (ret != SystemSettingsError.None)
1376                     {
1377                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1378                     }
1379                 }
1380                 s_data3GNetworkSettingChanged += value;
1381             }
1382
1383             remove
1384             {
1385                 s_data3GNetworkSettingChanged -= value;
1386                 if (s_data3GNetworkSettingChanged == null)
1387                 {
1388                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled);
1389                     if (ret != SystemSettingsError.None)
1390                     {
1391                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1392                     }
1393                 }
1394             }
1395         }
1396
1397         private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1398         {
1399             string lockScreenApp = SystemSettings.LockScreenApp;
1400             LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1401             s_lockscreenAppChanged?.Invoke(null, eventArgs);
1402         };
1403         private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1404         /// <summary>
1405         /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1406         /// </summary>
1407         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1408         /// <privlevel>platform</privlevel>
1409         /// <feature>http://tizen.org/feature/systemsetting</feature>
1410         /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1411         /// <exception cref="ArgumentException">Invalid Argument</exception>
1412         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1413         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1414         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1415         /// <since_tizen> 4 </since_tizen>
1416         public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1417         {
1418             add
1419             {
1420                 if (s_lockscreenAppChanged == null)
1421                 {
1422                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1423                     if (ret != SystemSettingsError.None)
1424                     {
1425                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1426                     }
1427                 }
1428                 s_lockscreenAppChanged += value;
1429             }
1430
1431             remove
1432             {
1433                 s_lockscreenAppChanged -= value;
1434                 if (s_lockscreenAppChanged == null)
1435                 {
1436                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp);
1437                     if (ret != SystemSettingsError.None)
1438                     {
1439                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1440                     }
1441                 }
1442             }
1443         }
1444
1445         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1446         {
1447             string localeCountry = SystemSettings.LocaleCountry;
1448             LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1449             s_localeCountryChanged?.Invoke(null, eventArgs);
1450         };
1451         private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1452         /// <summary>
1453         /// The LocaleCountryChanged event is triggered when the current country setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax, is changed.
1454         /// </summary>
1455         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1456         /// <privlevel>platform</privlevel>
1457         /// <feature>http://tizen.org/feature/systemsetting</feature>
1458         /// <exception cref="ArgumentException">Invalid Argument</exception>
1459         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1460         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1461         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1462         /// <since_tizen> 3 </since_tizen>
1463         public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1464         {
1465             add
1466             {
1467                 if (s_localeCountryChanged == null)
1468                 {
1469                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1470                     if (ret != SystemSettingsError.None)
1471                     {
1472                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1473                     }
1474                 }
1475                 s_localeCountryChanged += value;
1476             }
1477
1478             remove
1479             {
1480                 s_localeCountryChanged -= value;
1481                 if (s_localeCountryChanged == null)
1482                 {
1483                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry);
1484                     if (ret != SystemSettingsError.None)
1485                     {
1486                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1487                     }
1488                 }
1489             }
1490         }
1491
1492         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1493         {
1494             string localeLanguage = SystemSettings.LocaleLanguage;
1495             LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1496             s_localeLanguageChanged?.Invoke(null, eventArgs);
1497         };
1498         private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1499         /// <summary>
1500         /// The LocaleLanguageChanged event is triggered when the current language setting in the &lt;LANGUAGE&gt;_&lt;REGION&gt; syntax, is changed.
1501         /// </summary>
1502         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1503         /// <privlevel>platform</privlevel>
1504         /// <feature>http://tizen.org/feature/systemsetting</feature>
1505         /// <exception cref="ArgumentException">Invalid Argument</exception>
1506         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1507         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1508         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1509         /// <since_tizen> 3 </since_tizen>
1510         public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1511         {
1512             add
1513             {
1514                 if (s_localeLanguageChanged == null)
1515                 {
1516                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1517                     if (ret != SystemSettingsError.None)
1518                     {
1519                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1520                     }
1521                 }
1522                 s_localeLanguageChanged += value;
1523             }
1524
1525             remove
1526             {
1527                 s_localeLanguageChanged -= value;
1528                 if (s_localeLanguageChanged == null)
1529                 {
1530                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage);
1531                     if (ret != SystemSettingsError.None)
1532                     {
1533                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1534                     }
1535                 }
1536             }
1537         }
1538
1539         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1540         {
1541             bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1542             LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1543             s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1544         };
1545         private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1546         /// <summary>
1547         /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1548         /// </summary>
1549         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1550         /// <privlevel>platform</privlevel>
1551         /// <feature>http://tizen.org/feature/systemsetting</feature>
1552         /// <exception cref="ArgumentException">Invalid Argument</exception>
1553         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1554         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1555         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1556         /// <since_tizen> 3 </since_tizen>
1557         public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1558         {
1559             add
1560             {
1561                 if (s_localeTimeFormat24HourChanged == null)
1562                 {
1563                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1564                     if (ret != SystemSettingsError.None)
1565                     {
1566                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1567                     }
1568                 }
1569                 s_localeTimeFormat24HourChanged += value;
1570             }
1571
1572             remove
1573             {
1574                 s_localeTimeFormat24HourChanged -= value;
1575                 if (s_localeTimeFormat24HourChanged == null)
1576                 {
1577                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled);
1578                     if (ret != SystemSettingsError.None)
1579                     {
1580                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1581                     }
1582                 }
1583             }
1584         }
1585
1586         private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1587         {
1588             string localeTimeZone = SystemSettings.LocaleTimeZone;
1589             LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1590             s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1591         };
1592         private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1593         /// <summary>
1594         /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1595         /// </summary>
1596         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1597         /// <privlevel>platform</privlevel>
1598         /// <feature>http://tizen.org/feature/systemsetting</feature>
1599         /// <exception cref="ArgumentException">Invalid Argument</exception>
1600         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1601         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1602         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1603         /// <since_tizen> 3 </since_tizen>
1604         public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1605         {
1606             add
1607             {
1608                 if (s_localeTimeZoneChanged == null)
1609                 {
1610                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1611                     if (ret != SystemSettingsError.None)
1612                     {
1613                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1614                     }
1615                 }
1616                 s_localeTimeZoneChanged += value;
1617             }
1618
1619             remove
1620             {
1621                 s_localeTimeZoneChanged -= value;
1622                 if (s_localeTimeZoneChanged == null)
1623                 {
1624                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone);
1625                     if (ret != SystemSettingsError.None)
1626                     {
1627                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1628                     }
1629                 }
1630             }
1631         }
1632
1633         private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1634         {
1635
1636             int time = SystemSettings.Time;
1637             TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1638             s_timeChanged?.Invoke(null, eventArgs);
1639         };
1640         private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1641         /// <summary>
1642         /// The TimeChanged event is triggered when the system time is changed.
1643         /// </summary>
1644         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1645         /// <privlevel>platform</privlevel>
1646         /// <feature>http://tizen.org/feature/systemsetting</feature>
1647         /// <exception cref="ArgumentException">Invalid Argument</exception>
1648         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1649         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1650         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1651         /// <since_tizen> 3 </since_tizen>
1652         public static event EventHandler<TimeChangedEventArgs> TimeChanged
1653         {
1654             add
1655             {
1656                 if (s_timeChanged == null)
1657                 {
1658                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1659                     if (ret != SystemSettingsError.None)
1660                     {
1661                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1662                     }
1663                 }
1664                 s_timeChanged += value;
1665             }
1666
1667             remove
1668             {
1669                 s_timeChanged -= value;
1670                 if (s_timeChanged == null)
1671                 {
1672                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time);
1673                     if (ret != SystemSettingsError.None)
1674                     {
1675                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1676                     }
1677                 }
1678             }
1679         }
1680
1681         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1682         {
1683             bool soundLock = SystemSettings.SoundLockEnabled;
1684             SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1685             s_soundLockChanged?.Invoke(null, eventArgs);
1686         };
1687         private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1688         /// <summary>
1689         /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1690         /// </summary>
1691         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1692         /// <privlevel>platform</privlevel>
1693         /// <feature>http://tizen.org/feature/systemsetting</feature>
1694         /// <exception cref="ArgumentException">Invalid Argument</exception>
1695         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1696         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1697         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1698         /// <since_tizen> 3 </since_tizen>
1699         public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1700         {
1701             add
1702             {
1703                 if (s_soundLockChanged == null)
1704                 {
1705                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1706                     if (ret != SystemSettingsError.None)
1707                     {
1708                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1709                     }
1710                 }
1711                 s_soundLockChanged += value;
1712             }
1713
1714             remove
1715             {
1716                 s_soundLockChanged -= value;
1717                 if (s_soundLockChanged == null)
1718                 {
1719                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled);
1720                     if (ret != SystemSettingsError.None)
1721                     {
1722                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1723                     }
1724                 }
1725             }
1726         }
1727
1728         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1729         {
1730             bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1731             SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1732             s_soundSilentModeChanged?.Invoke(null, eventArgs);
1733         };
1734         private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1735         /// <summary>
1736         /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1737         /// </summary>
1738         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1739         /// <privlevel>platform</privlevel>
1740         /// <feature>http://tizen.org/feature/systemsetting</feature>
1741         /// <exception cref="ArgumentException">Invalid Argument</exception>
1742         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1743         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1744         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1745         /// <since_tizen> 3 </since_tizen>
1746         public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1747         {
1748             add
1749             {
1750                 if (s_soundSilentModeChanged == null)
1751                 {
1752                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1753                     if (ret != SystemSettingsError.None)
1754                     {
1755                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1756                     }
1757                 }
1758                 s_soundSilentModeChanged += value;
1759             }
1760
1761             remove
1762             {
1763                 s_soundSilentModeChanged -= value;
1764                 if (s_soundSilentModeChanged == null)
1765                 {
1766                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled);
1767                     if (ret != SystemSettingsError.None)
1768                     {
1769                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1770                     }
1771                 }
1772             }
1773         }
1774
1775         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1776         {
1777             bool soundTouch = SystemSettings.SoundTouchEnabled;
1778             SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1779             s_soundTouchChanged?.Invoke(null, eventArgs);
1780         };
1781         private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1782         /// <summary>
1783         /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1784         /// </summary>
1785         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1786         /// <privlevel>platform</privlevel>
1787         /// <feature>http://tizen.org/feature/systemsetting</feature>
1788         /// <exception cref="ArgumentException">Invalid Argument</exception>
1789         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1790         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1791         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1792         /// <since_tizen> 3 </since_tizen>
1793         public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1794         {
1795             add
1796             {
1797                 if (s_soundTouchChanged == null)
1798                 {
1799                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1800                     if (ret != SystemSettingsError.None)
1801                     {
1802                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1803                     }
1804                 }
1805                 s_soundTouchChanged += value;
1806             }
1807
1808             remove
1809             {
1810                 s_soundTouchChanged -= value;
1811                 if (s_soundTouchChanged == null)
1812
1813                 {
1814                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled);
1815                     if (ret != SystemSettingsError.None)
1816                     {
1817                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1818                     }
1819                 }
1820             }
1821         }
1822
1823         private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1824         {
1825             bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
1826             DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
1827             s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
1828         };
1829         private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
1830         /// <summary>
1831         /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
1832         /// </summary>
1833         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1834         /// <privlevel>platform</privlevel>
1835         /// <feature>http://tizen.org/feature/systemsetting</feature>
1836         /// <exception cref="ArgumentException">Invalid Argument</exception>
1837         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1838         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1839         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1840         /// <since_tizen> 3 </since_tizen>
1841         public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
1842         {
1843             add
1844             {
1845                 if (s_displayScreenRotationAutoChanged == null)
1846                 {
1847                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
1848                     if (ret != SystemSettingsError.None)
1849                     {
1850                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1851                     }
1852                 }
1853                 s_displayScreenRotationAutoChanged += value;
1854             }
1855
1856             remove
1857             {
1858                 s_displayScreenRotationAutoChanged -= value;
1859                 if (s_displayScreenRotationAutoChanged == null)
1860                 {
1861                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled);
1862                     if (ret != SystemSettingsError.None)
1863                     {
1864                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1865                     }
1866                 }
1867             }
1868         }
1869
1870         private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1871         {
1872             string deviceName = SystemSettings.DeviceName;
1873             DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
1874             s_deviceNameChanged?.Invoke(null, eventArgs);
1875         };
1876         private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
1877         /// <summary>
1878         /// The DeviceNameChanged event is triggered when the device name is changed.
1879         /// </summary>
1880         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1881         /// <privlevel>platform</privlevel>
1882         /// <feature>http://tizen.org/feature/systemsetting</feature>
1883         /// <exception cref="ArgumentException">Invalid Argument</exception>
1884         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1885         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1886         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1887         /// <since_tizen> 3 </since_tizen>
1888         public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
1889         {
1890             add
1891             {
1892                 if (s_deviceNameChanged == null)
1893                 {
1894                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
1895                     if (ret != SystemSettingsError.None)
1896                     {
1897                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1898                     }
1899                 }
1900                 s_deviceNameChanged += value;
1901             }
1902
1903             remove
1904             {
1905                 s_deviceNameChanged -= value;
1906                 if (s_deviceNameChanged == null)
1907                 {
1908                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName);
1909                     if (ret != SystemSettingsError.None)
1910                     {
1911                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1912                     }
1913                 }
1914             }
1915         }
1916
1917         private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1918         {
1919             bool motionEnabled = SystemSettings.MotionEnabled;
1920             MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
1921             s_motionSettingChanged?.Invoke(null, eventArgs);
1922         };
1923         private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
1924         /// <summary>
1925         /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
1926         /// </summary>
1927         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1928         /// <privlevel>platform</privlevel>
1929         /// <feature>http://tizen.org/feature/systemsetting</feature>
1930         /// <exception cref="ArgumentException">Invalid Argument</exception>
1931         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1932         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1933         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1934         /// <since_tizen> 3 </since_tizen>
1935         public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
1936         {
1937             add
1938             {
1939                 if (s_motionSettingChanged == null)
1940                 {
1941                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
1942                     if (ret != SystemSettingsError.None)
1943                     {
1944                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1945                     }
1946                 }
1947                 s_motionSettingChanged += value;
1948             }
1949
1950             remove
1951             {
1952                 s_motionSettingChanged -= value;
1953                 if (s_motionSettingChanged == null)
1954                 {
1955                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled);
1956                     if (ret != SystemSettingsError.None)
1957                     {
1958                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1959                     }
1960                 }
1961             }
1962         }
1963
1964         private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1965         {
1966             bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
1967             NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
1968             s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
1969         };
1970         private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
1971         /// <summary>
1972         /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
1973         /// </summary>
1974         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1975         /// <privlevel>platform</privlevel>
1976         /// <feature>http://tizen.org/feature/systemsetting</feature>
1977         /// <feature>http://tizen.org/feature/network.wifi</feature>
1978         /// <exception cref="ArgumentException">Invalid Argument</exception>
1979         /// <exception cref="NotSupportedException">Not Supported feature</exception>
1980         /// <exception cref="InvalidOperationException">Invalid operation</exception>
1981         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1982         /// <since_tizen> 3 </since_tizen>
1983         public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
1984         {
1985             add
1986             {
1987                 if (s_networkWifiNotificationChanged == null)
1988                 {
1989                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
1990                     if (ret != SystemSettingsError.None)
1991                     {
1992                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1993                     }
1994                 }
1995                 s_networkWifiNotificationChanged += value;
1996             }
1997
1998             remove
1999             {
2000                 s_networkWifiNotificationChanged -= value;
2001                 if (s_networkWifiNotificationChanged == null)
2002                 {
2003                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled);
2004                     if (ret != SystemSettingsError.None)
2005                     {
2006                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2007                     }
2008                 }
2009             }
2010         }
2011
2012         private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2013         {
2014             bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2015             NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2016             s_networkFlightModeChanged?.Invoke(null, eventArgs);
2017         };
2018         private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2019         /// <summary>
2020         /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2021         /// </summary>
2022         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2023         /// <privlevel>platform</privlevel>
2024         /// <feature>http://tizen.org/feature/systemsetting</feature>
2025         /// <exception cref="ArgumentException">Invalid Argument</exception>
2026         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2027         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2028         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2029         /// <since_tizen> 3 </since_tizen>
2030         public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2031         {
2032             add
2033             {
2034                 if (s_networkFlightModeChanged == null)
2035                 {
2036                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2037                     if (ret != SystemSettingsError.None)
2038                     {
2039                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2040                     }
2041                 }
2042                 s_networkFlightModeChanged += value;
2043             }
2044
2045             remove
2046             {
2047                 s_networkFlightModeChanged -= value;
2048                 if (s_networkFlightModeChanged == null)
2049                 {
2050                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled);
2051                     if (ret != SystemSettingsError.None)
2052                     {
2053                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2054                     }
2055                 }
2056             }
2057         }
2058
2059         private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2060         {
2061             int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2062             ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2063             s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2064         };
2065         private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2066         /// <summary>
2067         /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2068         /// </summary>
2069         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2070         /// <privlevel>platform</privlevel>
2071         /// <feature>http://tizen.org/feature/systemsetting</feature>
2072         /// <exception cref="ArgumentException">Invalid Argument</exception>
2073         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2074         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2075         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2076         /// <since_tizen> 3 </since_tizen>
2077         public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2078         {
2079             add
2080             {
2081                 if (s_screenBacklightTimeChanged == null)
2082                 {
2083                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2084                     if (ret != SystemSettingsError.None)
2085                     {
2086                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2087                     }
2088                 }
2089                 s_screenBacklightTimeChanged += value;
2090             }
2091
2092             remove
2093             {
2094                 s_screenBacklightTimeChanged -= value;
2095                 if (s_screenBacklightTimeChanged == null)
2096                 {
2097                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime);
2098                     if (ret != SystemSettingsError.None)
2099                     {
2100                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2101                     }
2102                 }
2103             }
2104         }
2105
2106         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2107         {
2108             string soundNotification = SystemSettings.SoundNotification;
2109             SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2110             s_soundNotificationChanged?.Invoke(null, eventArgs);
2111         };
2112         private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2113         /// <summary>
2114         /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2115         /// </summary>
2116         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2117         /// <privlevel>platform</privlevel>
2118         /// <feature>http://tizen.org/feature/systemsetting</feature>
2119         /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2120         /// <exception cref="ArgumentException">Invalid Argument</exception>
2121         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2122         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2123         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2124         /// <since_tizen> 3 </since_tizen>
2125         public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2126         {
2127             add
2128             {
2129                 if (s_soundNotificationChanged == null)
2130                 {
2131                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2132                     if (ret != SystemSettingsError.None)
2133                     {
2134                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2135                     }
2136                 }
2137                 s_soundNotificationChanged += value;
2138             }
2139
2140             remove
2141             {
2142                 s_soundNotificationChanged -= value;
2143                 if (s_soundNotificationChanged == null)
2144                 {
2145                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification);
2146                     if (ret != SystemSettingsError.None)
2147                     {
2148                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2149                     }
2150                 }
2151             }
2152         }
2153
2154         private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2155         {
2156             int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2157             SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2158             s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2159         };
2160         private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2161         /// <summary>
2162         /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2163         /// </summary>
2164         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2165         /// <privlevel>platform</privlevel>
2166         /// <feature>http://tizen.org/feature/systemsetting</feature>
2167         /// <exception cref="ArgumentException">Invalid Argument</exception>
2168         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2169         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2170         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2171         /// <since_tizen> 3 </since_tizen>
2172         public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2173         {
2174             add
2175             {
2176                 if (s_soundNotificationRepetitionPeriodChanged == null)
2177                 {
2178                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2179                     if (ret != SystemSettingsError.None)
2180                     {
2181                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2182                     }
2183                 }
2184                 s_soundNotificationRepetitionPeriodChanged += value;
2185             }
2186
2187             remove
2188             {
2189                 s_soundNotificationRepetitionPeriodChanged -= value;
2190                 if (s_soundNotificationRepetitionPeriodChanged == null)
2191                 {
2192                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod);
2193                     if (ret != SystemSettingsError.None)
2194                     {
2195                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2196                     }
2197                 }
2198             }
2199         }
2200
2201         private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2202         {
2203             SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2204             LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2205             s_lockStateChanged?.Invoke(null, eventArgs);
2206         };
2207         private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2208         /// <summary>
2209         /// The LockStateChanged event is triggered when the current lock state is changed.
2210         /// </summary>
2211         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2212         /// <privlevel>platform</privlevel>
2213         /// <feature>http://tizen.org/feature/systemsetting</feature>
2214         /// <exception cref="ArgumentException">Invalid Argument</exception>
2215         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2216         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2217         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2218         /// <since_tizen> 3 </since_tizen>
2219         public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2220         {
2221             add
2222             {
2223                 if (s_lockStateChanged == null)
2224                 {
2225                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2226                     if (ret != SystemSettingsError.None)
2227                     {
2228                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2229                     }
2230                 }
2231                 s_lockStateChanged += value;
2232             }
2233
2234             remove
2235             {
2236                 s_lockStateChanged -= value;
2237                 if (s_lockStateChanged == null)
2238                 {
2239                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState);
2240                     if (ret != SystemSettingsError.None)
2241                     {
2242                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2243                     }
2244                 }
2245             }
2246         }
2247
2248         private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2249         {
2250             string adsId = SystemSettings.AdsId;
2251             AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2252             s_adsIdChanged?.Invoke(null, eventArgs);
2253         };
2254         private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2255         /// <summary>
2256         /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2257         /// </summary>
2258         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2259         /// <privlevel>platform</privlevel>
2260         /// <feature>http://tizen.org/feature/systemsetting</feature>
2261         /// <exception cref="ArgumentException">Invalid Argument</exception>
2262         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2263         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2264         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2265         /// <since_tizen> 3 </since_tizen>
2266         public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2267         {
2268             add
2269             {
2270                 if (s_adsIdChanged == null)
2271                 {
2272                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2273                     if (ret != SystemSettingsError.None)
2274                     {
2275                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2276                     }
2277                 }
2278                 s_adsIdChanged += value;
2279             }
2280
2281             remove
2282             {
2283                 s_adsIdChanged -= value;
2284                 if (s_adsIdChanged == null)
2285                 {
2286                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId);
2287                     if (ret != SystemSettingsError.None)
2288                     {
2289                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2290                     }
2291                 }
2292             }
2293         }
2294
2295         private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2296         {
2297             SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2298             UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2299             s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2300         };
2301         private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2302         /// <summary>
2303         /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2304         /// </summary>
2305         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2306         /// <privlevel>platform</privlevel>
2307         /// <feature>http://tizen.org/feature/systemsetting</feature>
2308         /// <feature>http://tizen.org/feature/network.telephony</feature>
2309         /// <exception cref="ArgumentException">Invalid Argument</exception>
2310         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2311         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2312         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2313         /// <since_tizen> 3 </since_tizen>
2314         public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2315         {
2316             add
2317             {
2318                 if (s_ultraDataSaveChanged == null)
2319                 {
2320                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2321                     if (ret != SystemSettingsError.None)
2322                     {
2323                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2324                     }
2325                 }
2326                 s_ultraDataSaveChanged += value;
2327             }
2328
2329             remove
2330             {
2331                 s_ultraDataSaveChanged -= value;
2332                 if (s_ultraDataSaveChanged == null)
2333                 {
2334                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave);
2335                     if (ret != SystemSettingsError.None)
2336                     {
2337                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2338                     }
2339                 }
2340             }
2341         }
2342
2343         private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2344         {
2345             string ultraDataSavePackageList = "None";
2346             UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2347             s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2348         };
2349         private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2350         /// <summary>
2351         /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2352         /// </summary>
2353         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2354         /// <privlevel>platform</privlevel>
2355         /// <feature>http://tizen.org/feature/systemsetting</feature>
2356         /// <feature>http://tizen.org/feature/network.telephony</feature>
2357         /// <exception cref="ArgumentException">Invalid Argument</exception>
2358         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2359         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2360         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2361         /// <since_tizen> 3 </since_tizen>
2362         public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2363         {
2364             add
2365             {
2366                 if (s_ultraDataSavePackageListChanged == null)
2367                 {
2368                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2369                     if (ret != SystemSettingsError.None)
2370                     {
2371                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2372                     }
2373                 }
2374                 s_ultraDataSavePackageListChanged += value;
2375             }
2376
2377             remove
2378             {
2379                 s_ultraDataSavePackageListChanged -= value;
2380                 if (s_ultraDataSavePackageListChanged == null)
2381                 {
2382                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList);
2383                     if (ret != SystemSettingsError.None)
2384                     {
2385                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2386                     }
2387                 }
2388             }
2389         }
2390
2391         private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2392         {
2393             bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2394             AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2395             s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2396         };
2397         private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2398         /// <summary>
2399         /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2400         /// </summary>
2401         /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2402         /// <privlevel>platform</privlevel>
2403         /// <feature>http://tizen.org/feature/systemsetting</feature>
2404         /// <exception cref="ArgumentException">Invalid Argument</exception>
2405         /// <exception cref="NotSupportedException">Not Supported feature</exception>
2406         /// <exception cref="InvalidOperationException">Invalid operation</exception>
2407         /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2408         /// <since_tizen> 4 </since_tizen>
2409         public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2410         {
2411             add
2412             {
2413                 if (s_accessibilityTtsChanged == null)
2414                 {
2415                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2416                     if (ret != SystemSettingsError.None)
2417                     {
2418                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2419                     }
2420                 }
2421                 s_accessibilityTtsChanged += value;
2422             }
2423
2424             remove
2425             {
2426                 s_accessibilityTtsChanged -= value;
2427                 if (s_accessibilityTtsChanged == null)
2428
2429                 {
2430                     SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled);
2431                     if (ret != SystemSettingsError.None)
2432                     {
2433                         throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2434                     }
2435                 }
2436             }
2437         }
2438
2439     }
2440 }
2441