From 727ab359c5add4d1154e2019fcb6c189cda65625 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Wed, 2 Nov 2016 10:44:48 +0900 Subject: [PATCH 01/16] Changed license Boilerplate for source code Change-Id: I1ead0b120ac10197aefd247bddf9677ff24b993d Signed-off-by: jinwang.an --- .../Interop/Interop.SystemSettings.cs | 23 ++++++++++++++-------- .../Properties/AssemblyInfo.cs | 18 ++++++++++++++++- .../Tizen.System.SystemSettings/SystemSettings.cs | 18 ++++++++++++++++- .../SystemSettingsEnums.cs | 17 +++++++++++++++- .../SystemSettingsEventArgs.cs | 18 ++++++++++++++++- .../SystemSettingsExceptionFactory.cs | 18 ++++++++++++++++- 6 files changed, 99 insertions(+), 13 deletions(-) diff --git a/Tizen.System.SystemSettings/Interop/Interop.SystemSettings.cs b/Tizen.System.SystemSettings/Interop/Interop.SystemSettings.cs index df56956..3925cd5 100644 --- a/Tizen.System.SystemSettings/Interop/Interop.SystemSettings.cs +++ b/Tizen.System.SystemSettings/Interop/Interop.SystemSettings.cs @@ -1,11 +1,18 @@ -/// Copyright 2016 by Samsung Electronics, Inc., -/// -/// This software is the confidential and proprietary information -/// of Samsung Electronics, Inc. ("Confidential Information"). You -/// shall not disclose such Confidential Information and shall use -/// it only in accordance with the terms of the license agreement -/// you entered into with Samsung. - +/* + * 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; using System.Runtime.InteropServices; diff --git a/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs b/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs index c914bff..90a5652 100644 --- a/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs +++ b/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs @@ -1,4 +1,20 @@ -using System.Reflection; +/* + * 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs index 659eb24..232e063 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -1,4 +1,20 @@ -using System; +/* + * 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 { diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs index 9e58959..b9f2519 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -1,4 +1,19 @@ - +/* + * 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. + */ + namespace Tizen.System { /// diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs index 650a641..a19b56d 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs @@ -1,4 +1,20 @@ -using System; +/* + * 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 { diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs index c291e8a..39805ee 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs @@ -1,4 +1,20 @@ -using System; +/* + * 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 { -- 2.7.4 From 4fb0ef892068deab2f9fa4d52ac8a12195736006 Mon Sep 17 00:00:00 2001 From: MyoungJune Park Date: Thu, 15 Dec 2016 09:49:35 +0900 Subject: [PATCH 02/16] add Arm64, i586 Exclude - current dontnet is supported on armv7l and x86_64. - other arch type is not supported fo now. Change-Id: Ifb1d0b19493b31446fd4c72c59ce18e957e556a9 Signed-off-by: MyoungJune Park --- packaging/csapi-system-settings.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index c414f1e..ecfa411 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -6,6 +6,8 @@ %define BUILDCONF Release %endif +ExcludeArch: %{ix86} aarch64 + Name: csapi-system-settings Summary: Tizen System Settings API for C# Version: 1.0.1 -- 2.7.4 From 53b0d5a77854ffbb5afc4021d42c4d5f2f6be866 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Mon, 19 Dec 2016 19:22:50 +0900 Subject: [PATCH 03/16] Apply dotnet RPM macros Change-Id: Id349ead4e15ef9a65c6a5ccccb848a25c387028f Signed-off-by: WonYoung Choi --- packaging/csapi-system-settings.spec | 53 +++++++----------------------------- 1 file changed, 10 insertions(+), 43 deletions(-) diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index ecfa411..861c6bf 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -1,13 +1,3 @@ -%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework} - -%if 0%{?tizen_build_devel_mode} -%define BUILDCONF Debug -%else -%define BUILDCONF Release -%endif - -ExcludeArch: %{ix86} aarch64 - Name: csapi-system-settings Summary: Tizen System Settings API for C# Version: 1.0.1 @@ -19,59 +9,36 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest AutoReqProv: no - -BuildRequires: mono-compiler -BuildRequires: mono-devel +ExcludeArch: aarch64 %ix86 BuildRequires: dotnet-build-tools # C# API Requires BuildRequires: csapi-tizen-nuget +%define Assemblies Tizen.System.SystemSettings + %description -Tizen System Settings API for C# +%{summary} + +%dotnet_import_sub_packages %prep %setup -q cp %{SOURCE1} . -%define Assemblies Tizen.System.SystemSettings - %build for ASM in %{Assemblies}; do -# NuGet Restore -find $ASM/*.project.json -exec nuget restore {} \; -# Build -find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \; -# NuGet Pack -nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF} +%dotnet_build $ASM +%dotnet_pack $ASM/$ASM.nuspec %{version} done %install -# Runtime Binary -mkdir -p %{buildroot}%{dotnet_assembly_path} for ASM in %{Assemblies}; do -%if 0%{?_with_corefx} - install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path} -%else - install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path} -%endif +%dotnet_install $ASM done -# NuGet -mkdir -p %{buildroot}/nuget -install -p -m 644 *.nupkg %{buildroot}/nuget %files %manifest %{name}.manifest %license LICENSE -%attr(644,root,root) %{dotnet_assembly_path}/*.dll - -%package nuget -Summary: NuGet package for %{name} -Group: Development/Libraries - -%description nuget -NuGet package for %{name} - -%files nuget -/nuget/*.nupkg +%attr(644,root,root) %{dotnet_assembly_files} \ No newline at end of file -- 2.7.4 From 53448fb3b30af6d5e2e534f7b454c3268014e710 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Tue, 10 Jan 2017 17:06:11 +0900 Subject: [PATCH 04/16] Remove %ix86 in .spec file. To support %ix86 build. Change-Id: I51da5cc2de8848f69dca21d448c1488c371f96e9 Signed-off-by: jinwang.an --- packaging/csapi-system-settings.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index 861c6bf..7337626 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -9,7 +9,7 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest AutoReqProv: no -ExcludeArch: aarch64 %ix86 +ExcludeArch: aarch64 BuildRequires: dotnet-build-tools @@ -41,4 +41,4 @@ done %files %manifest %{name}.manifest %license LICENSE -%attr(644,root,root) %{dotnet_assembly_files} \ No newline at end of file +%attr(644,root,root) %{dotnet_assembly_files} -- 2.7.4 From b18d0ba832c7f45be83d9bc523d0e49481f05aea Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Wed, 1 Feb 2017 11:01:03 +0900 Subject: [PATCH 05/16] Update content of nuspec file Change-Id: Ia5c054c9e8946259e678764497d2ae45ef184200 Signed-off-by: WonYoung Choi --- .../Tizen.System.SystemSettings.nuspec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec index d0084cb..49092b4 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec @@ -1,14 +1,19 @@ - Tizen.System.SystemSettings - $version$ - Tizen Developers - System Settings API for Tizen.Net + Tizen.System.SystemSettings + $version$ + Samsung Electronics + false + https://www.apache.org/licenses/LICENSE-2.0 + https://www.tizen.org/ + https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png + © Samsung Electronics Co., Ltd All Rights Reserved + System Settings API for Tizen.Net - + -- 2.7.4 From 4901d63edff92f30172da687b177d20f40699d7e Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Wed, 8 Mar 2017 19:33:29 +0900 Subject: [PATCH 06/16] Delete "Net45" configuration and files. Change-Id: Ie9007d2da0a62dbe179453e7b23052a525c34cb0 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings.Net45.csproj | 68 ---------------------- .../Tizen.System.SystemSettings.Net45.project.json | 11 ---- .../Tizen.System.SystemSettings.nuspec | 1 - packaging/csapi-system-settings.spec | 2 +- 4 files changed, 1 insertion(+), 81 deletions(-) delete mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj delete mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj deleted file mode 100644 index 1f76dd4..0000000 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj +++ /dev/null @@ -1,68 +0,0 @@ - - - - Debug - AnyCPU - {9F66DBF9-243A-44C9-953B-28F01DD743DE} - Library - Properties - Tizen.System.SystemSettings - Tizen.System.SystemSettings - 512 - v4.5 - - - true - full - false - bin\Debug\Net45\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\Net45\ - TRACE - prompt - 4 - - - true - - - Tizen.System.SystemSettings.snk - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json deleted file mode 100644 index ab1a0ee..0000000 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "Tizen": "1.0.1" - }, - "frameworks": { - "net45": {} - }, - "runtimes": { - "win": {} - } -} diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec index d0084cb..a3f987d 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec @@ -11,6 +11,5 @@ - diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index 7337626..5723388 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -1,6 +1,6 @@ Name: csapi-system-settings Summary: Tizen System Settings API for C# -Version: 1.0.1 +Version: 1.0.2 Release: 1 Group: Development/Libraries License: Apache-2.0 -- 2.7.4 From 1d6ecd5d07cf00b3f300a7eba64d414a840976a6 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Tue, 28 Mar 2017 19:27:22 +0900 Subject: [PATCH 07/16] Removed key of eventArgs. Change-Id: I866a69d4dd30efe5f1d45a037ca476e4a1eff096 Signed-off-by: jinwang.an --- .../SystemSettingsEventArgs.cs | 273 --------------------- 1 file changed, 273 deletions(-) mode change 100644 => 100755 Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs old mode 100644 new mode 100755 index a19b56d..db29622 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs @@ -24,17 +24,6 @@ namespace Tizen.System public class IncomingCallRingtoneChangedEventArgs : EventArgs { private readonly string _incomingCallRingtone = null; - /// - /// The enum for IncomingCallRingtone system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.IncomingCallRingtone; - } - } - internal IncomingCallRingtoneChangedEventArgs(string val) { _incomingCallRingtone = val; @@ -58,17 +47,6 @@ namespace Tizen.System public class WallpaperHomeScreenChangedEventArgs : EventArgs { private readonly string _wallpaperHomeScreen = null; - /// - /// The enum for WallpaperHomeScreen system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.WallpaperHomeScreen; - } - } - internal WallpaperHomeScreenChangedEventArgs(string val) { _wallpaperHomeScreen = val; @@ -92,17 +70,6 @@ namespace Tizen.System public class WallpaperLockScreenChangedEventArgs : EventArgs { private readonly string _wallpaperLockScreen = null; - /// - /// The enum for WallpaperLockScreen system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.WallpaperLockScreen; - } - } - internal WallpaperLockScreenChangedEventArgs(string val) { _wallpaperLockScreen = val; @@ -126,16 +93,6 @@ namespace Tizen.System public class FontSizeChangedEventArgs : EventArgs { private readonly SystemSettingsFontSize _fontSize; - /// - /// The enum for FontSize system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.FontSize; - } - } internal FontSizeChangedEventArgs(SystemSettingsFontSize val) { _fontSize = val; @@ -159,16 +116,6 @@ namespace Tizen.System public class FontTypeChangedEventArgs : EventArgs { private readonly string _fontType = null; - /// - /// The enum for FontType system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.FontType; - } - } internal FontTypeChangedEventArgs(string val) { _fontType = val; @@ -192,16 +139,6 @@ namespace Tizen.System public class MotionActivationSettingChangedEventArgs : EventArgs { private readonly bool _motionActivation; - /// - /// The enum for MotionActivation system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.MotionActivationEnabled; - } - } internal MotionActivationSettingChangedEventArgs(bool val) { _motionActivation = val; @@ -225,16 +162,6 @@ namespace Tizen.System public class EmailAlertRingtoneChangedEventArgs : EventArgs { private readonly string _emailAlertRingtone = null; - /// - /// The enum for EmailAlertRingtone system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.EmailAlertRingtone; - } - } internal EmailAlertRingtoneChangedEventArgs(string val) { _emailAlertRingtone = val; @@ -258,16 +185,6 @@ namespace Tizen.System public class UsbDebuggingSettingChangedEventArgs : EventArgs { private readonly bool _usbDebuggingEnabled; - /// - /// The enum for UsbDebuggingEnabled system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.UsbDebuggingEnabled; - } - } internal UsbDebuggingSettingChangedEventArgs(bool val) { _usbDebuggingEnabled = val; @@ -291,16 +208,6 @@ namespace Tizen.System public class Data3GNetworkSettingChangedEventArgs : EventArgs { private readonly bool _data3GNetworkEnabled; - /// - /// The enum for Data3GNetworkEnabled system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.Data3GNetworkEnabled; - } - } internal Data3GNetworkSettingChangedEventArgs(bool val) { _data3GNetworkEnabled = val; @@ -324,16 +231,6 @@ namespace Tizen.System public class LockscreenAppChangedEventArgs : EventArgs { private readonly string _lockscreenApp = null; - /// - /// The enum for LockscreenApp system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.LockscreenApp; - } - } internal LockscreenAppChangedEventArgs(string val) { _lockscreenApp = val; @@ -357,16 +254,6 @@ namespace Tizen.System public class LocaleCountryChangedEventArgs : EventArgs { private readonly string _localeCountry = null; - /// - /// The enum for LocaleCountry system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.LocaleCountry; - } - } internal LocaleCountryChangedEventArgs(string val) { _localeCountry = val; @@ -391,16 +278,6 @@ namespace Tizen.System public class LocaleLanguageChangedEventArgs : EventArgs { private readonly string _localeLanguage = null; - /// - /// The enum for LocaleLanguage system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.LocaleLanguage; - } - } internal LocaleLanguageChangedEventArgs(string val) { _localeLanguage = val; @@ -425,16 +302,6 @@ namespace Tizen.System public class LocaleTimeFormat24HourSettingChangedEventArgs : EventArgs { private readonly bool _localeTimeFormat24Hour; - /// - /// The enum for LocaleTimeFormat24Hour system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.LocaleTimeFormat24HourEnabled; - } - } internal LocaleTimeFormat24HourSettingChangedEventArgs(bool val) { _localeTimeFormat24Hour = val; @@ -458,16 +325,6 @@ namespace Tizen.System public class LocaleTimeZoneChangedEventArgs : EventArgs { private readonly string _localeTimeZone = null; - /// - /// The enum for LocaleTimeZone system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.LocaleTimeZone; - } - } internal LocaleTimeZoneChangedEventArgs(string val) { _localeTimeZone = val; @@ -490,16 +347,6 @@ namespace Tizen.System /// public class TimeChangedEventArgs : EventArgs { - /// - /// The enum for Time system setting event - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.Time; - } - } internal TimeChangedEventArgs() { } @@ -511,16 +358,6 @@ namespace Tizen.System public class SoundLockSettingChangedEventArgs : EventArgs { private readonly bool _soundLock; - /// - /// The enum for SoundLock system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.SoundLockEnabled; - } - } internal SoundLockSettingChangedEventArgs(bool val) { _soundLock = val; @@ -544,16 +381,6 @@ namespace Tizen.System public class SoundSilentModeSettingChangedEventArgs : EventArgs { private readonly bool _soundSilentMode; - /// - /// The enum for SoundSilentMode system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.SoundSilentModeEnabled; - } - } internal SoundSilentModeSettingChangedEventArgs(bool val) { _soundSilentMode = val; @@ -577,16 +404,6 @@ namespace Tizen.System public class SoundTouchSettingChangedEventArgs : EventArgs { private readonly bool _soundTouch; - /// - /// The enum for SoundTouch system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.SoundTouchEnabled; - } - } internal SoundTouchSettingChangedEventArgs(bool val) { _soundTouch = val; @@ -610,16 +427,6 @@ namespace Tizen.System public class DisplayScreenRotationAutoSettingChangedEventArgs : EventArgs { private readonly bool _displayScreenRotationAuto; - /// - /// The enum for DisplayScreenRotationAuto system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.DisplayScreenRotationAutoEnabled; - } - } internal DisplayScreenRotationAutoSettingChangedEventArgs(bool val) { _displayScreenRotationAuto = val; @@ -643,16 +450,6 @@ namespace Tizen.System public class DeviceNameChangedEventArgs : EventArgs { private readonly string _deviceName = null; - /// - /// The enum for DeviceName system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.DeviceName; - } - } internal DeviceNameChangedEventArgs(string val) { _deviceName = val; @@ -676,16 +473,6 @@ namespace Tizen.System public class MotionSettingChangedEventArgs : EventArgs { private readonly bool _motionEnabled; - /// - /// The enum for MotionEnabled system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.MotionEnabled; - } - } internal MotionSettingChangedEventArgs(bool val) { _motionEnabled = val; @@ -709,16 +496,6 @@ namespace Tizen.System public class NetworkWifiNotificationSettingChangedEventArgs : EventArgs { private readonly bool _networkWifiNotification; - /// - /// The enum for NetworkWifiNotification system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.NetworkWifiNotificationEnabled; - } - } internal NetworkWifiNotificationSettingChangedEventArgs(bool val) { _networkWifiNotification = val; @@ -742,16 +519,6 @@ namespace Tizen.System public class NetworkFlightModeSettingChangedEventArgs : EventArgs { private readonly bool _networkFlightMode; - /// - /// The enum for NetworkFlightMode system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.NetworkFlightModeEnabled; - } - } internal NetworkFlightModeSettingChangedEventArgs(bool val) { _networkFlightMode = val; @@ -775,16 +542,6 @@ namespace Tizen.System public class ScreenBacklightTimeChangedEventArgs : EventArgs { private readonly int _screenBacklightTime; - /// - /// The enum for ScreenBacklightTime system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.ScreenBacklightTime; - } - } internal ScreenBacklightTimeChangedEventArgs(int val) { _screenBacklightTime = val; @@ -808,16 +565,6 @@ namespace Tizen.System public class SoundNotificationChangedEventArgs : EventArgs { private readonly string _soundNotification = null; - /// - /// The enum for SoundNotification system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.SoundNotification; - } - } internal SoundNotificationChangedEventArgs(string val) { _soundNotification = val; @@ -841,16 +588,6 @@ namespace Tizen.System public class SoundNotificationRepetitionPeriodChangedEventArgs : EventArgs { private readonly int _soundNotificationRepetitionPeriod; - /// - /// The enum for SoundNotificationRepetitionPeriod system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.SoundNotificationRepetitionPeriod; - } - } internal SoundNotificationRepetitionPeriodChangedEventArgs(int val) { _soundNotificationRepetitionPeriod = val; @@ -874,16 +611,6 @@ namespace Tizen.System public class LockStateChangedEventArgs : EventArgs { private readonly SystemSettingsIdleLockState _lockState; - /// - /// The enum for LockState system setting key - /// - public SystemSettingsKeys Key - { - get - { - return SystemSettingsKeys.LockState; - } - } internal LockStateChangedEventArgs(SystemSettingsIdleLockState val) { _lockState = val; -- 2.7.4 From cc7b8e01db5a54c15d0a2e3d7e42a0a714b8eb0c Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Thu, 6 Apr 2017 13:19:50 +0900 Subject: [PATCH 08/16] Modify APIs description. - Removed "(Since 2.4)" strings. Change-Id: Ic43feba97d033e5232d6e4c1d9d2a737ca22f1f5 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettings.cs | 4 ++-- .../Tizen.System.SystemSettings/SystemSettingsEnums.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs index 232e063..a15f290 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -202,7 +202,7 @@ namespace Tizen.System } } /// - /// Indicates whether the USB debugging is enabled (Since 2.4) + /// Indicates whether the USB debugging is enabled /// public static bool UsbDebuggingEnabled { @@ -227,7 +227,7 @@ namespace Tizen.System } /// - /// Indicates whether the 3G data network is enabled (Since 2.4) + /// Indicates whether the 3G data network is enabled /// public static bool Data3GNetworkEnabled { diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs index b9f2519..f7ed0ce 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -50,11 +50,11 @@ namespace Tizen.System /// EmailAlertRingtone, /// - /// (bool) Indicates whether the USB debugging is enabled (Since 2.4) + /// (bool) Indicates whether the USB debugging is enabled /// UsbDebuggingEnabled, /// - /// (bool) Indicates whether the 3G data network is enabled (Since 2.4) + /// (bool) Indicates whether the 3G data network is enabled /// Data3GNetworkEnabled, /// -- 2.7.4 From 851b4e014423eda5e6e72a34bd781bd8ce01b478 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Wed, 19 Apr 2017 15:33:20 +0900 Subject: [PATCH 09/16] Inherit int for enum type. - To fix crash while upcall from Native C language to C#. Change-Id: Ice4ea8fbf114d91660c057723908817500ab9a1d Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettingsEnums.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs index f7ed0ce..e1add1b 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -19,12 +19,12 @@ namespace Tizen.System /// /// Enumeration for all available system settings /// - public enum SystemSettingsKeys + public enum SystemSettingsKeys : int { /// /// (string) The file path of the current ringtone /// - IncomingCallRingtone, + IncomingCallRingtone = 0, /// /// (string) The file path of the current home screen wallpaper /// -- 2.7.4 From 0a2f00402b5ead7f63dc260ba0b4e60021561cf4 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Wed, 19 Apr 2017 21:26:10 +0900 Subject: [PATCH 10/16] Added ADS_ID, Ultra Data Save API for C# Change-Id: I9efea162beecbfab9b35c8b102ba539c55e3b731 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettings.cs | 168 +++++++++++++++++++++ .../SystemSettingsEnums.cs | 32 +++- .../SystemSettingsEventArgs.cs | 69 +++++++++ 3 files changed, 268 insertions(+), 1 deletion(-) mode change 100644 => 100755 Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs old mode 100644 new mode 100755 index a15f290..dfe18f7 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -632,6 +632,51 @@ namespace Tizen.System } } + /// + /// The current system ADS ID + /// + public static string AdsId + { + get + { + string adsId; + SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId); + if (res != SystemSettingsError.None) + { + Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get AdsId system setting value."); + } + return adsId; + } + set + { + SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.AdsId, value); + if (res != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AdsId system setting."); + } + } + } + + + /// + /// Indicates the time period for notification repetitions. + /// + public static SystemSettingsUdsState UltraDataSave + { + get + { + int UltraDataSave; + SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave); + if (res != SystemSettingsError.None) + { + Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get UltraDataSave system setting value."); + } + return (SystemSettingsUdsState)UltraDataSave; + } + } + + + private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) => { string path = SystemSettings.IncomingCallRingtone; @@ -1738,6 +1783,129 @@ namespace Tizen.System } } } + + private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) => + { + string adsId = SystemSettings.AdsId; + AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId); + s_adsIdChanged?.Invoke(null, eventArgs); + }; + private static event EventHandler s_adsIdChanged; + /// + /// AdsIdChanged event is triggered when the current ADS ID state is changed + /// + /// + /// A AdsIdChangedEventArgs object that contains the key & changed value + public static event EventHandler AdsIdChanged + { + add + { + if (s_adsIdChanged == null) + { + SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero); + if (ret != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling"); + } + } + s_adsIdChanged += value; + } + + remove + { + s_adsIdChanged -= value; + if (s_adsIdChanged == null) + { + SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId); + if (ret != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling"); + } + } + } + } + + private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) => + { + SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave; + UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave); + s_ultraDataSaveChanged?.Invoke(null, eventArgs); + }; + private static event EventHandler s_ultraDataSaveChanged; + /// + /// UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed + /// + /// + /// A UltraDataSaveChangedEventArgs object that contains the key & changed value + public static event EventHandler UltraDataSaveChanged + { + add + { + if (s_ultraDataSaveChanged == null) + { + SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero); + if (ret != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling"); + } + } + s_ultraDataSaveChanged += value; + } + + remove + { + s_ultraDataSaveChanged -= value; + if (s_ultraDataSaveChanged == null) + { + SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave); + if (ret != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling"); + } + } + } + } + + private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) => + { + string ultraDataSavePackageList = "None"; + UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList); + s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs); + }; + private static event EventHandler s_ultraDataSavePackageListChanged; + /// + /// UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed + /// + /// + /// A UltraDataSavePackageListChangedEventArgs object that contains the key & changed value + public static event EventHandler UltraDataSavePackageListChanged + { + add + { + if (s_ultraDataSavePackageListChanged == null) + { + SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero); + if (ret != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling"); + } + } + s_ultraDataSavePackageListChanged += value; + } + + remove + { + s_ultraDataSavePackageListChanged -= value; + if (s_ultraDataSavePackageListChanged == null) + { + SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList); + if (ret != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling"); + } + } + } + } } } diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs index e1add1b..e707ebd 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -137,7 +137,19 @@ namespace Tizen.System /// /// (int) Indicates the current lock state /// - LockState + LockState, + /// + /// (string) Indicates Ads ID for each device + /// + AdsId, + /// + /// (int) Indicates Ultra Data Save status, one of #system_settings_uds_state_e values + /// + UltraDataSave, + /// + /// (string) Indicates Ultra Data Save Package List (Since 4.0), the list is a string containing whitelisted package names separated with semicolons (;) + /// + UltraDataSavePackageList } /// /// Enumeration for Idle Lock State. @@ -183,4 +195,22 @@ namespace Tizen.System /// Giant } + /// + /// Enumeration for ultra data save + /// + public enum SystemSettingsUdsState + { + /// + /// UDS Off + /// + UdsOff = 0, + /// + /// UDS On + /// + UdsOn, + /// + /// UDS On and the app is whitelisted + /// + UdsOnWhitelisted, + } } diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs index db29622..ff03859 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs @@ -627,4 +627,73 @@ namespace Tizen.System } } } + + /// + /// EventArgs type for the event AdsIdChanged + /// + public class AdsIdChangedEventArgs : EventArgs + { + private readonly string _adsId = null; + internal AdsIdChangedEventArgs(string val) + { + _adsId = val; + } + + /// + /// Indicates the current lock state + /// + public string Value + { + get + { + return _adsId; + } + } + } + + /// + /// EventArgs type for the event UltraDataSaveChanged + /// + public class UltraDataSaveChangedEventArgs : EventArgs + { + private readonly SystemSettingsUdsState _ultraDataSave = SystemSettingsUdsState.UdsOff; + internal UltraDataSaveChangedEventArgs(SystemSettingsUdsState val) + { + _ultraDataSave = val; + } + + /// + /// Indicates the current lock state + /// + public SystemSettingsUdsState Value + { + get + { + return _ultraDataSave; + } + } + } + + /// + /// EventArgs type for the event UltraDataSavePackageListChanged + /// + public class UltraDataSavePackageListChangedEventArgs : EventArgs + { + private readonly string _ultraDataSavePackageList = null; + internal UltraDataSavePackageListChangedEventArgs(string val) + { + _ultraDataSavePackageList = val; + } + + /// + /// Indicates the current lock state + /// + public string Value + { + get + { + return _ultraDataSavePackageList; + } + } + } } -- 2.7.4 From f3d9e47079a42aa59bddb55c997cc06890d91185 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Thu, 20 Apr 2017 20:01:09 +0900 Subject: [PATCH 11/16] Inherit int data type for enum type - SystemSettingsIdleLockState - SystemSettingsFontSize - SystemSettingsUdsState Change-Id: I63dccc07ac1144f2556c2d0ca873ad8c0dd772a5 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettingsEnums.cs | 6 +++--- packaging/csapi-system-settings.spec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs old mode 100644 new mode 100755 index e707ebd..1b2bc20 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -154,7 +154,7 @@ namespace Tizen.System /// /// Enumeration for Idle Lock State. /// - public enum SystemSettingsIdleLockState + public enum SystemSettingsIdleLockState : int { /// /// Device is unlocked @@ -172,7 +172,7 @@ namespace Tizen.System /// /// Enumeration for font size. /// - public enum SystemSettingsFontSize + public enum SystemSettingsFontSize : int { /// /// A small size @@ -198,7 +198,7 @@ namespace Tizen.System /// /// Enumeration for ultra data save /// - public enum SystemSettingsUdsState + public enum SystemSettingsUdsState : int { /// /// UDS Off diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index 5723388..7dfe837 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -1,6 +1,6 @@ Name: csapi-system-settings Summary: Tizen System Settings API for C# -Version: 1.0.2 +Version: 1.0.3 Release: 1 Group: Development/Libraries License: Apache-2.0 -- 2.7.4 From ee602fce3a69f99d53b5e4abfee134d1acad02ed Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Thu, 27 Apr 2017 16:33:37 +0900 Subject: [PATCH 12/16] Added NotSupportedException. Change-Id: I96be7744d5d7ffdb25a10d8ec95e4d73ab7b6038 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettings.cs | 58 +++++++++++----------- .../SystemSettingsExceptionFactory.cs | 3 +- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs index dfe18f7..d400954 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -38,7 +38,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.IncomingCallRingtone, out filePath); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get IncomingCallRingtone system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get IncomingCallRingtone system setting."); } return filePath; } @@ -63,7 +63,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperHomeScreen, out filePath); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get WallpaperHomeScreen system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperHomeScreen system setting."); } return filePath; } @@ -88,7 +88,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperLockScreen, out filePath); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get WallpaperLockScreen system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperLockScreen system setting."); } return filePath; } @@ -113,7 +113,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.FontSize, out fontSize); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get FontSize system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontSize system setting."); } return (SystemSettingsFontSize)fontSize; } @@ -138,7 +138,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.FontType, out fontType); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get FontType system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontType system setting."); } return fontType; } @@ -163,7 +163,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get MotionActivation system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionActivation system setting."); } return isMotionServiceActivated; } @@ -188,7 +188,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.EmailAlertRingtone, out filePath); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get EmailAlertRingtone system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get EmailAlertRingtone system setting."); } return filePath; } @@ -212,7 +212,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, out isusbDebuggingEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get UsbDebuggingEnabled system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UsbDebuggingEnabled system setting."); } return isusbDebuggingEnabled; } @@ -237,7 +237,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, out is3GDataEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get Data3GNetworkEnabled system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Data3GNetworkEnabled system setting."); } return is3GDataEnabled; } @@ -262,7 +262,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LockscreenApp, out pkgName); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LockscreenApp system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockscreenApp system setting."); } return pkgName; } @@ -287,7 +287,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DefaultFontType, out defaultFontType); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get DefaultFontType system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DefaultFontType system setting value."); } return defaultFontType; } @@ -306,7 +306,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleCountry, out countrySetting); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleCountry system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleCountry system setting."); } return countrySetting; } @@ -333,7 +333,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleLanguage, out languageSetting); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleLanguage system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleLanguage system setting."); } return languageSetting; } @@ -359,7 +359,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleTimeFormat24Hour system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeFormat24Hour system setting."); } return is24HrFormat; } @@ -384,7 +384,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleTimeZone system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeZone system setting."); } return timeZone; } @@ -408,7 +408,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundLock system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundLock system setting."); } return isSoundLockEnabled; } @@ -425,7 +425,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundSilentMode system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundSilentMode system setting."); } return isSilent; } @@ -442,7 +442,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundTouch system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundTouch system setting value."); } return isTouchSoundEnabled; } @@ -459,7 +459,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get DisplayScreenRotationAuto system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DisplayScreenRotationAuto system setting."); } return isRotationAutomatic; } @@ -476,7 +476,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DeviceName, out deviceName); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get DeviceName system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DeviceName system setting value."); } return deviceName; } @@ -492,7 +492,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionEnabled, out isMotionEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get MotionEnabled system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionEnabled system setting value."); } return isMotionEnabled; } @@ -509,7 +509,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get NetworkWifiNotification system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkWifiNotification system setting."); } return isWifiNotificationEnabled; } @@ -526,7 +526,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get NetworkFlightMode system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkFlightMode system setting."); } return isFlightModeEnabled; } @@ -543,7 +543,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.ScreenBacklightTime, out backlightTime); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get ScreenBacklightTime system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get ScreenBacklightTime system setting."); } return backlightTime; } @@ -568,7 +568,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.SoundNotification, out filePath); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundNotification system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotification system setting."); } return filePath; } @@ -593,7 +593,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, out notificationRepetitionPeriod); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundNotificationRepetitionPeriod system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotificationRepetitionPeriod system setting."); } return notificationRepetitionPeriod; } @@ -618,7 +618,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.LockState, out LockState); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LockState system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockState system setting."); } return (SystemSettingsIdleLockState)LockState; } @@ -643,7 +643,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get AdsId system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AdsId system setting."); } return adsId; } @@ -669,7 +669,7 @@ namespace Tizen.System SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave); if (res != SystemSettingsError.None) { - Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get UltraDataSave system setting value."); + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UltraDataSave system setting."); } return (SystemSettingsUdsState)UltraDataSave; } diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs index 39805ee..0ff6f0b 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs @@ -47,7 +47,8 @@ namespace Tizen.System case SystemSettingsError.PermissionDenied: //fall through case SystemSettingsError.NotSupported: - //fall through + exp = new NotSupportedException(msg); + break; case SystemSettingsError.LockScreenAppPasswordMode: //fall through default: -- 2.7.4 From 6d88f6978637d19db31b4c5f9d40121dd826aeda Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Thu, 11 May 2017 19:58:18 +0900 Subject: [PATCH 13/16] Added TimeChanged get value API and modified exception. Change-Id: Icc6b60ad130fddc0d4499d892a770ec36c973045 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettings.cs | 22 ++++++++++++++++++++-- .../SystemSettingsEventArgs.cs | 11 ++++++++++- .../SystemSettingsExceptionFactory.cs | 6 +++--- packaging/csapi-system-settings.spec | 2 +- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs index d400954..b0ec8e8 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -397,6 +397,23 @@ namespace Tizen.System } } } + + /// + /// Once System changes time, this event occurs to notify time change. + /// + public static int Time + { + get + { + int time; + SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time); + if (res != SystemSettingsError.None) + { + throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting."); + } + return time; + } + } /// /// Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound /// @@ -1253,8 +1270,9 @@ namespace Tizen.System private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) => { - //bool motionActivation = SystemSettings.Time; - TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(); + + int time = SystemSettings.Time; + TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time); s_timeChanged?.Invoke(null, eventArgs); }; private static event EventHandler s_timeChanged; diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs index ff03859..c0a5a04 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs @@ -347,8 +347,17 @@ namespace Tizen.System /// public class TimeChangedEventArgs : EventArgs { - internal TimeChangedEventArgs() + private readonly int _time; + internal TimeChangedEventArgs(int val) { + _time = val; + } + public int Value + { + get + { + return _time; + } } } diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs index 0ff6f0b..039ff41 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsExceptionFactory.cs @@ -40,15 +40,15 @@ namespace Tizen.System case SystemSettingsError.InvalidParameter: exp = new ArgumentException(msg); break; + case SystemSettingsError.NotSupported: + exp = new NotSupportedException(msg); + break; case SystemSettingsError.OutOfMemory: //fall through case SystemSettingsError.IoError: //fall through case SystemSettingsError.PermissionDenied: //fall through - case SystemSettingsError.NotSupported: - exp = new NotSupportedException(msg); - break; case SystemSettingsError.LockScreenAppPasswordMode: //fall through default: diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index 7dfe837..b870a4b 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -1,6 +1,6 @@ Name: csapi-system-settings Summary: Tizen System Settings API for C# -Version: 1.0.3 +Version: 1.0.4 Release: 1 Group: Development/Libraries License: Apache-2.0 -- 2.7.4 From 6defb2fb919df4e2fd92bc90b694a0d2e047799a Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Wed, 24 May 2017 13:18:52 +0900 Subject: [PATCH 14/16] Added comment about TimeChangedEventArgs property. Change-Id: I888e22bafbfa31eb84a755a192298a4b0597b4e0 Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettingsEventArgs.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs index c0a5a04..dca5003 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs @@ -352,6 +352,10 @@ namespace Tizen.System { _time = val; } + + /// + /// Indicates the current time + /// public int Value { get -- 2.7.4 From 67e3f0aa87e81f93d44f610dd04311bfd12e2662 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Mon, 29 May 2017 18:11:02 +0900 Subject: [PATCH 15/16] Fixed comment for doxygen. - use < and > in the summary instead of \< and \> - explicit link request to 'system_settings_uds_state_e' could not be resolved Change-Id: Ia1f438f804bde7a478c18ec1fedea29935fa780a Signed-off-by: jinwang.an --- .../Tizen.System.SystemSettings/SystemSettings.cs | 8 ++++---- .../Tizen.System.SystemSettings/SystemSettingsEnums.cs | 6 +++--- .../Tizen.System.SystemSettings/SystemSettingsEventArgs.cs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs index b0ec8e8..1b4398f 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -294,7 +294,7 @@ namespace Tizen.System } /// - /// Indicates the current country setting in the \_\ 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 /// @@ -321,7 +321,7 @@ namespace Tizen.System } /// - /// Indicates the current language setting in the \_\ 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. /// @@ -1112,7 +1112,7 @@ namespace Tizen.System }; private static event EventHandler s_localeCountryChanged; /// - /// LocaleCountryChanged event is triggered when the current country setting in the \_\ syntax, is changed + /// LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed /// /// /// A LocaleCountryChangedEventArgs object that contains the key & changed value @@ -1153,7 +1153,7 @@ namespace Tizen.System }; private static event EventHandler s_localeLanguageChanged; /// - /// LocaleLanguageChanged event is triggered when the current language setting in the \_\ syntax, is changed + /// LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed /// /// /// A LocaleLanguageChangedEventArgs object that contains the key & changed value diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs index 1b2bc20..e935db5 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -66,13 +66,13 @@ namespace Tizen.System /// DefaultFontType, /// - /// (string) Indicates the current country setting in the \_\ syntax. + /// (string) 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 /// LocaleCountry, /// - /// (string) Indicates the current language setting in the \_\ syntax. + /// (string) 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. /// @@ -143,7 +143,7 @@ namespace Tizen.System /// AdsId, /// - /// (int) Indicates Ultra Data Save status, one of #system_settings_uds_state_e values + /// (int) Indicates Ultra Data Save status, one of #SystemSettingsUdsState values /// UltraDataSave, /// diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs index dca5003..0cdd7ae 100755 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEventArgs.cs @@ -260,7 +260,7 @@ namespace Tizen.System } /// - /// Indicates the current country setting in the \_\ 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 /// public string Value @@ -284,7 +284,7 @@ namespace Tizen.System } /// - /// Indicates the current language setting in the \_\ 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 /// public string Value -- 2.7.4 From 42439992208f31e1ff24cfaf289cb91140f08ed5 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Thu, 8 Jun 2017 09:47:25 +0900 Subject: [PATCH 16/16] Merge packaging information to csproj Change-Id: I2fcc58232499019dc9dbc0fc5fc435abfb6d8562 Signed-off-by: WonYoung Choi --- .../Properties/AssemblyInfo.cs | 52 ------------- .../Tizen.System.SystemSettings.csproj | 88 +++++----------------- .../Tizen.System.SystemSettings.nuspec | 20 ----- .../Tizen.System.SystemSettings.project.json | 9 --- .../Tizen.System.SystemSettings.sln | 22 ++++++ packaging/csapi-system-settings.spec | 2 +- 6 files changed, 41 insertions(+), 152 deletions(-) delete mode 100644 Tizen.System.SystemSettings/Properties/AssemblyInfo.cs delete mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec delete mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json create mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.sln diff --git a/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs b/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs deleted file mode 100644 index 90a5652..0000000 --- a/Tizen.System.SystemSettings/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Tizen.System.SystemSettings")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Samsung Electronics")] -[assembly: AssemblyProduct("Tizen.System.SystemSettings")] -[assembly: AssemblyCopyright("Copyright (c) 2016 Samsung Electronics Co., Ltd")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("09d03c33-2fce-4c18-bec8-f585a865a4b4")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj index c2a7bfc..747a6fe 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj @@ -1,77 +1,25 @@ - - + + - Debug - AnyCPU - {09D03C33-2FCE-4C18-BEC8-F585A865A4B4} - Library - Properties - Tizen.System.SystemSettings - Tizen.System.SystemSettings - 512 - - - .NETStandard - v1.3 - .NETStandard,Version=v1.3 - false - true - $(NoWarn);1701;1702 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true + 1.0.4 + Samsung Electronics + © Samsung Electronics Co., Ltd All Rights Reserved + System Settings API for Tizen .NET + https://www.tizen.org/ + https://www.apache.org/licenses/LICENSE-2.0 + https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png + + netstandard1.3 + True + True Tizen.System.SystemSettings.snk + true + - - - - - - - - - - - + - - - - - - <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) - <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) - true - - \ No newline at end of file + + diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec deleted file mode 100644 index 3c476da..0000000 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec +++ /dev/null @@ -1,20 +0,0 @@ - - - - Tizen.System.SystemSettings - $version$ - Samsung Electronics - false - https://www.apache.org/licenses/LICENSE-2.0 - https://www.tizen.org/ - https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png - © Samsung Electronics Co., Ltd All Rights Reserved - System Settings API for Tizen.Net - - - - - - - - diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json deleted file mode 100644 index db7436c..0000000 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "dependencies": { - "NETStandard.Library": "1.6.0", - "Tizen": "1.0.1" - }, - "frameworks": { - "netstandard1.3": {} - } -} diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.sln b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.sln new file mode 100644 index 0000000..b618a4b --- /dev/null +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.SystemSettings", "Tizen.System.SystemSettings.csproj", "{E18BFE2D-2C89-45D2-B31B-BE5C81B6CAAC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E18BFE2D-2C89-45D2-B31B-BE5C81B6CAAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E18BFE2D-2C89-45D2-B31B-BE5C81B6CAAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E18BFE2D-2C89-45D2-B31B-BE5C81B6CAAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E18BFE2D-2C89-45D2-B31B-BE5C81B6CAAC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index b870a4b..749fa39 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.spec @@ -30,7 +30,7 @@ cp %{SOURCE1} . %build for ASM in %{Assemblies}; do %dotnet_build $ASM -%dotnet_pack $ASM/$ASM.nuspec %{version} +%dotnet_pack $ASM done %install -- 2.7.4