Added TimeChanged get value API and modified exception.
[platform/core/csapi/system-settings.git] / Tizen.System.SystemSettings / Tizen.System.SystemSettings / SystemSettingsEventArgs.cs
old mode 100644 (file)
new mode 100755 (executable)
index 9acb5b6..c0a5a04
@@ -1,6 +1,22 @@
-using System;
-
-namespace Tizen.System.SystemSettings
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Tizen.System
 {
     /// <summary>
     /// EventArgs type for the event IncomingCallRingtoneChanged
@@ -8,17 +24,6 @@ namespace Tizen.System.SystemSettings
     public class IncomingCallRingtoneChangedEventArgs : EventArgs
     {
         private readonly string _incomingCallRingtone = null;
-        /// <summary>
-        /// The enum for IncomingCallRingtone system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.IncomingCallRingtone;
-            }
-        }
-
         internal IncomingCallRingtoneChangedEventArgs(string val)
         {
             _incomingCallRingtone = val;
@@ -42,17 +47,6 @@ namespace Tizen.System.SystemSettings
     public class WallpaperHomeScreenChangedEventArgs : EventArgs
     {
         private readonly string _wallpaperHomeScreen = null;
-        /// <summary>
-        /// The enum for WallpaperHomeScreen system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.WallpaperHomeScreen;
-            }
-        }
-
         internal WallpaperHomeScreenChangedEventArgs(string val)
         {
             _wallpaperHomeScreen = val;
@@ -76,17 +70,6 @@ namespace Tizen.System.SystemSettings
     public class WallpaperLockScreenChangedEventArgs : EventArgs
     {
         private readonly string _wallpaperLockScreen = null;
-        /// <summary>
-        /// The enum for WallpaperLockScreen system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.WallpaperLockScreen;
-            }
-        }
-
         internal WallpaperLockScreenChangedEventArgs(string val)
         {
             _wallpaperLockScreen = val;
@@ -110,16 +93,6 @@ namespace Tizen.System.SystemSettings
     public class FontSizeChangedEventArgs : EventArgs
     {
         private readonly SystemSettingsFontSize _fontSize;
-        /// <summary>
-        /// The enum for FontSize system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.FontSize;
-            }
-        }
         internal FontSizeChangedEventArgs(SystemSettingsFontSize val)
         {
             _fontSize = val;
@@ -143,16 +116,6 @@ namespace Tizen.System.SystemSettings
     public class FontTypeChangedEventArgs : EventArgs
     {
         private readonly string _fontType = null;
-        /// <summary>
-        /// The enum for FontType system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.FontType;
-            }
-        }
         internal FontTypeChangedEventArgs(string val)
         {
             _fontType = val;
@@ -176,16 +139,6 @@ namespace Tizen.System.SystemSettings
     public class MotionActivationSettingChangedEventArgs : EventArgs
     {
         private readonly bool _motionActivation;
-        /// <summary>
-        /// The enum for MotionActivation system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.MotionActivationEnabled;
-            }
-        }
         internal MotionActivationSettingChangedEventArgs(bool val)
         {
             _motionActivation = val;
@@ -209,16 +162,6 @@ namespace Tizen.System.SystemSettings
     public class EmailAlertRingtoneChangedEventArgs : EventArgs
     {
         private readonly string _emailAlertRingtone = null;
-        /// <summary>
-        /// The enum for EmailAlertRingtone system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.EmailAlertRingtone;
-            }
-        }
         internal EmailAlertRingtoneChangedEventArgs(string val)
         {
             _emailAlertRingtone = val;
@@ -242,16 +185,6 @@ namespace Tizen.System.SystemSettings
     public class UsbDebuggingSettingChangedEventArgs : EventArgs
     {
         private readonly bool _usbDebuggingEnabled;
-        /// <summary>
-        /// The enum for UsbDebuggingEnabled system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.UsbDebuggingEnabled;
-            }
-        }
         internal UsbDebuggingSettingChangedEventArgs(bool val)
         {
             _usbDebuggingEnabled = val;
@@ -275,16 +208,6 @@ namespace Tizen.System.SystemSettings
     public class Data3GNetworkSettingChangedEventArgs : EventArgs
     {
         private readonly bool _data3GNetworkEnabled;
-        /// <summary>
-        /// The enum for Data3GNetworkEnabled system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.Data3GNetworkEnabled;
-            }
-        }
         internal Data3GNetworkSettingChangedEventArgs(bool val)
         {
             _data3GNetworkEnabled = val;
@@ -308,16 +231,6 @@ namespace Tizen.System.SystemSettings
     public class LockscreenAppChangedEventArgs : EventArgs
     {
         private readonly string _lockscreenApp = null;
-        /// <summary>
-        /// The enum for LockscreenApp system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.LockscreenApp;
-            }
-        }
         internal LockscreenAppChangedEventArgs(string val)
         {
             _lockscreenApp = val;
@@ -336,61 +249,18 @@ namespace Tizen.System.SystemSettings
     }
 
     /// <summary>
-    /// EventArgs type for the event DefaultFontTypeChanged
-    /// </summary>
-    public class DefaultFontTypeChangedEventArgs : EventArgs
-    {
-        private readonly string _defaultFontType = null;
-        /// <summary>
-        /// The enum for DefaultFontType system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.DefaultFontType;
-            }
-        }
-        internal DefaultFontTypeChangedEventArgs(string val)
-        {
-            _defaultFontType = val;
-        }
-
-        /// <summary>
-        /// The current system default font type
-        /// </summary>
-        public string Value
-        {
-            get
-            {
-                return _defaultFontType;
-            }
-        }
-    }
-
-    /// <summary>
     /// EventArgs type for the event LocaleCountryChanged
     /// </summary>
     public class LocaleCountryChangedEventArgs : EventArgs
     {
         private readonly string _localeCountry = null;
-        /// <summary>
-        /// The enum for LocaleCountry system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.LocaleCountry;
-            }
-        }
         internal LocaleCountryChangedEventArgs(string val)
         {
             _localeCountry = val;
         }
 
         /// <summary>
-        /// Indicates the current country setting in the <LANGUAGE>_<REGION> syntax.
+        /// Indicates the current country setting in the \<LANGUAGE\>_\<REGION\> syntax.
         /// The country setting is in the ISO 639-2 format, and the region setting is in the ISO 3166-1 alpha-2 format
         /// </summary>
         public string Value
@@ -408,23 +278,13 @@ namespace Tizen.System.SystemSettings
     public class LocaleLanguageChangedEventArgs : EventArgs
     {
         private readonly string _localeLanguage = null;
-        /// <summary>
-        /// The enum for LocaleLanguage system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.LocaleLanguage;
-            }
-        }
         internal LocaleLanguageChangedEventArgs(string val)
         {
             _localeLanguage = val;
         }
 
         /// <summary>
-        /// Indicates the current language setting in the <LANGUAGE>_<REGION> syntax.
+        /// Indicates the current language setting in the \<LANGUAGE\>_\<REGION\> syntax.
         /// The language setting is in the ISO 639-2 format and the region setting is in the ISO 3166-1 alpha-2 format
         /// </summary>
         public string Value
@@ -442,16 +302,6 @@ namespace Tizen.System.SystemSettings
     public class LocaleTimeFormat24HourSettingChangedEventArgs : EventArgs
     {
         private readonly bool _localeTimeFormat24Hour;
-        /// <summary>
-        /// The enum for LocaleTimeFormat24Hour system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.LocaleTimeFormat24HourEnabled;
-            }
-        }
         internal LocaleTimeFormat24HourSettingChangedEventArgs(bool val)
         {
             _localeTimeFormat24Hour = val;
@@ -475,16 +325,6 @@ namespace Tizen.System.SystemSettings
     public class LocaleTimeZoneChangedEventArgs : EventArgs
     {
         private readonly string _localeTimeZone = null;
-        /// <summary>
-        /// The enum for LocaleTimeZone system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.LocaleTimeZone;
-            }
-        }
         internal LocaleTimeZoneChangedEventArgs(string val)
         {
             _localeTimeZone = val;
@@ -507,14 +347,16 @@ namespace Tizen.System.SystemSettings
     /// </summary>
     public class TimeChangedEventArgs : EventArgs
     {
-        /// <summary>
-        /// The enum for Time system setting event
-        /// </summary>
-        public SystemSettingsKeys Key
+        private readonly int _time;
+        internal TimeChangedEventArgs(int val)
+        {
+            _time = val;
+        }
+        public int Value
         {
             get
             {
-                return SystemSettingsKeys.Time;
+                return _time;
             }
         }
     }
@@ -525,16 +367,6 @@ namespace Tizen.System.SystemSettings
     public class SoundLockSettingChangedEventArgs : EventArgs
     {
         private readonly bool _soundLock;
-        /// <summary>
-        /// The enum for SoundLock system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.SoundLockEnabled;
-            }
-        }
         internal SoundLockSettingChangedEventArgs(bool val)
         {
             _soundLock = val;
@@ -558,16 +390,6 @@ namespace Tizen.System.SystemSettings
     public class SoundSilentModeSettingChangedEventArgs : EventArgs
     {
         private readonly bool _soundSilentMode;
-        /// <summary>
-        /// The enum for SoundSilentMode system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.SoundSilentModeEnabled;
-            }
-        }
         internal SoundSilentModeSettingChangedEventArgs(bool val)
         {
             _soundSilentMode = val;
@@ -591,16 +413,6 @@ namespace Tizen.System.SystemSettings
     public class SoundTouchSettingChangedEventArgs : EventArgs
     {
         private readonly bool _soundTouch;
-        /// <summary>
-        /// The enum for SoundTouch system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.SoundTouchEnabled;
-            }
-        }
         internal SoundTouchSettingChangedEventArgs(bool val)
         {
             _soundTouch = val;
@@ -624,16 +436,6 @@ namespace Tizen.System.SystemSettings
     public class DisplayScreenRotationAutoSettingChangedEventArgs : EventArgs
     {
         private readonly bool _displayScreenRotationAuto;
-        /// <summary>
-        /// The enum for DisplayScreenRotationAuto system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.DisplayScreenRotationAutoEnabled;
-            }
-        }
         internal DisplayScreenRotationAutoSettingChangedEventArgs(bool val)
         {
             _displayScreenRotationAuto = val;
@@ -657,16 +459,6 @@ namespace Tizen.System.SystemSettings
     public class DeviceNameChangedEventArgs : EventArgs
     {
         private readonly string _deviceName = null;
-        /// <summary>
-        /// The enum for DeviceName system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.DeviceName;
-            }
-        }
         internal DeviceNameChangedEventArgs(string val)
         {
             _deviceName = val;
@@ -690,16 +482,6 @@ namespace Tizen.System.SystemSettings
     public class MotionSettingChangedEventArgs : EventArgs
     {
         private readonly bool _motionEnabled;
-        /// <summary>
-        /// The enum for MotionEnabled system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.MotionEnabled;
-            }
-        }
         internal MotionSettingChangedEventArgs(bool val)
         {
             _motionEnabled = val;
@@ -723,16 +505,6 @@ namespace Tizen.System.SystemSettings
     public class NetworkWifiNotificationSettingChangedEventArgs : EventArgs
     {
         private readonly bool _networkWifiNotification;
-        /// <summary>
-        /// The enum for NetworkWifiNotification system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.NetworkWifiNotificationEnabled;
-            }
-        }
         internal NetworkWifiNotificationSettingChangedEventArgs(bool val)
         {
             _networkWifiNotification = val;
@@ -756,16 +528,6 @@ namespace Tizen.System.SystemSettings
     public class NetworkFlightModeSettingChangedEventArgs : EventArgs
     {
         private readonly bool _networkFlightMode;
-        /// <summary>
-        /// The enum for NetworkFlightMode system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.NetworkFlightModeEnabled;
-            }
-        }
         internal NetworkFlightModeSettingChangedEventArgs(bool val)
         {
             _networkFlightMode = val;
@@ -789,16 +551,6 @@ namespace Tizen.System.SystemSettings
     public class ScreenBacklightTimeChangedEventArgs : EventArgs
     {
         private readonly int _screenBacklightTime;
-        /// <summary>
-        /// The enum for ScreenBacklightTime system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.ScreenBacklightTime;
-            }
-        }
         internal ScreenBacklightTimeChangedEventArgs(int val)
         {
             _screenBacklightTime = val;
@@ -822,16 +574,6 @@ namespace Tizen.System.SystemSettings
     public class SoundNotificationChangedEventArgs : EventArgs
     {
         private readonly string _soundNotification = null;
-        /// <summary>
-        /// The enum for SoundNotification system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.SoundNotification;
-            }
-        }
         internal SoundNotificationChangedEventArgs(string val)
         {
             _soundNotification = val;
@@ -855,16 +597,6 @@ namespace Tizen.System.SystemSettings
     public class SoundNotificationRepetitionPeriodChangedEventArgs : EventArgs
     {
         private readonly int _soundNotificationRepetitionPeriod;
-        /// <summary>
-        /// The enum for SoundNotificationRepetitionPeriod system setting key
-        /// </summary>
-        public SystemSettingsKeys Key
-        {
-            get
-            {
-                return SystemSettingsKeys.SoundNotificationRepetitionPeriod;
-            }
-        }
         internal SoundNotificationRepetitionPeriodChangedEventArgs(int val)
         {
             _soundNotificationRepetitionPeriod = val;
@@ -888,29 +620,88 @@ namespace Tizen.System.SystemSettings
     public class LockStateChangedEventArgs : EventArgs
     {
         private readonly SystemSettingsIdleLockState _lockState;
+        internal LockStateChangedEventArgs(SystemSettingsIdleLockState val)
+        {
+            _lockState = val;
+        }
+
         /// <summary>
-        /// The enum for LockState system setting key
+        /// Indicates the current lock state
         /// </summary>
-        public SystemSettingsKeys Key
+        public SystemSettingsIdleLockState Value
         {
             get
             {
-                return SystemSettingsKeys.LockState;
+                return _lockState;
             }
         }
-        internal LockStateChangedEventArgs(SystemSettingsIdleLockState val)
+    }
+
+    /// <summary>
+    /// EventArgs type for the event AdsIdChanged
+    /// </summary>
+    public class AdsIdChangedEventArgs : EventArgs
+    {
+        private readonly string _adsId = null;
+        internal AdsIdChangedEventArgs(string val)
         {
-            _lockState = val;
+            _adsId = val;
         }
 
         /// <summary>
         /// Indicates the current lock state
         /// </summary>
-        public SystemSettingsIdleLockState Value
+        public string Value
         {
             get
             {
-                return _lockState;
+                return _adsId;
+            }
+        }
+    }
+
+    /// <summary>
+    /// EventArgs type for the event UltraDataSaveChanged
+    /// </summary>
+    public class UltraDataSaveChangedEventArgs : EventArgs
+    {
+        private readonly SystemSettingsUdsState _ultraDataSave = SystemSettingsUdsState.UdsOff;
+        internal UltraDataSaveChangedEventArgs(SystemSettingsUdsState val)
+        {
+            _ultraDataSave = val;
+        }
+
+        /// <summary>
+        /// Indicates the current lock state
+        /// </summary>
+        public SystemSettingsUdsState Value
+        {
+            get
+            {
+                return _ultraDataSave;
+            }
+        }
+    }
+
+    /// <summary>
+    /// EventArgs type for the event UltraDataSavePackageListChanged
+    /// </summary>
+    public class UltraDataSavePackageListChangedEventArgs : EventArgs
+    {
+        private readonly string _ultraDataSavePackageList = null;
+        internal UltraDataSavePackageListChangedEventArgs(string val)
+        {
+            _ultraDataSavePackageList = val;
+        }
+
+        /// <summary>
+        /// Indicates the current lock state
+        /// </summary>
+        public string Value
+        {
+            get
+            {
+                return _ultraDataSavePackageList;
             }
         }
     }