From: DotnetBuild Date: Mon, 25 Sep 2017 15:00:31 +0000 (+0900) Subject: Release 4.0.0-preview1-00249 X-Git-Tag: accepted/tizen/unified/20170926.062035^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b19949173c4096ba45f84ff10031fe8fe3f4b0a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Release 4.0.0-preview1-00249 --- diff --git a/packaging/csapi-tizenfx.spec b/packaging/csapi-tizenfx.spec index 54235cf..ad59663 100644 --- a/packaging/csapi-tizenfx.spec +++ b/packaging/csapi-tizenfx.spec @@ -9,7 +9,7 @@ Name: csapi-tizenfx Summary: Assemblies of Tizen .NET -Version: 4.0.0.243 +Version: 4.0.0.249 Release: 1 Group: Development/Libraries License: Apache-2.0 @@ -144,7 +144,7 @@ rm -fr %{_tizenfx_bin_path} export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true ./build.sh --full ./build.sh --dummy -./build.sh --pack 4.0.0-preview1-00243 +./build.sh --pack 4.0.0-preview1-00249 %install mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH} diff --git a/pkg/PlatformFileList.txt b/pkg/PlatformFileList.txt index 4ce840b..8aaa14f 100644 --- a/pkg/PlatformFileList.txt +++ b/pkg/PlatformFileList.txt @@ -30,7 +30,6 @@ Tizen.Content.Download.dll #common #mobile #mobile-emul Tizen.Content.MediaContent.dll #common #mobile #mobile-emul #tv #ivi #wearable Tizen.Content.MimeType.dll #common #mobile #mobile-emul #tv #ivi #wearable Tizen.Context.dll #mobile #mobile-emul #wearable -Tizen.Convergence.dll #common #mobile #mobile-emul #ivi #wearable Tizen.dll #common #mobile #mobile-emul #tv #ivi #wearable Tizen.Location.dll #mobile #mobile-emul #tv #ivi #wearable Tizen.Location.Geofence.dll #mobile #mobile-emul diff --git a/pkg/PublicModuleList.txt b/pkg/PublicModuleList.txt index 0327770..2e9e56b 100755 --- a/pkg/PublicModuleList.txt +++ b/pkg/PublicModuleList.txt @@ -27,7 +27,6 @@ Tizen.Content.Download Tizen.Content.MediaContent Tizen.Content.MimeType Tizen.Context -Tizen.Convergence Tizen.Location Tizen.Location.Geofence Tizen.Log diff --git a/src/ElmSharp/ElmSharp/Image.cs b/src/ElmSharp/ElmSharp/Image.cs old mode 100644 new mode 100755 index 4f40932..3f1bc1c --- a/src/ElmSharp/ElmSharp/Image.cs +++ b/src/ElmSharp/ElmSharp/Image.cs @@ -332,6 +332,11 @@ namespace ElmSharp } } + /// + /// Gets the inlined image object of the image widget. + /// This property allows one to get the underlying EvasObject of type Image from this elementary widget. It can be useful to do things like save the image to a file, etc. + /// + /// Be careful to not manipulate it, as it is under the control of widget. public EvasImage ImageObject { get diff --git a/src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/MessagePort.cs b/src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/MessagePort.cs index dc44e9d..b1bd818 100755 --- a/src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/MessagePort.cs +++ b/src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/MessagePort.cs @@ -266,7 +266,7 @@ namespace Tizen.Applications.Messages { MessagePortErrorFactory.ThrowException((int)MessagePortError.InvalidOperation, "Should start listen before send"); } - if (message == null) + if (message == null || message.SafeBundleHandle == null || message.SafeBundleHandle.IsInvalid) { MessagePortErrorFactory.ThrowException((int)MessagePortError.InvalidParameter, "message is null", "Message"); } diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs index 3b4e7c4..6fe1311 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs @@ -105,10 +105,10 @@ namespace Tizen.Applications.Shortcut widgetAddResult = new Interop.Shortcut.ResultCallback(WidgetAddResultCallback); } - err = Interop.Shortcut.AddToWidget(shortcut.ShortcutName, shortcut.WidgetSize, shortcut.WidgetId, shortcut.IconPath, shortcut.Period, Convert.ToInt32(shortcut.IsAllowDuplicate), null, IntPtr.Zero); + err = Interop.Shortcut.AddToWidget(shortcut.ShortcutName, shortcut.WidgetSize, shortcut.WidgetId, shortcut.IconPath, shortcut.Period, Convert.ToInt32(shortcut.IsAllowDuplicate), widgetAddResult, IntPtr.Zero); if (err != Interop.Shortcut.ErrorCode.None) { - throw ShortcutErrorFactory.GetException(err, "unable to add shortcut"); + throw ShortcutErrorFactory.GetException(err, "unable to add widget"); } } catch (Exception e) diff --git a/src/Tizen.Applications.WatchApplication/Interop/Interop.Watch.cs b/src/Tizen.Applications.WatchApplication/Interop/Interop.Watch.cs index b4ffa33..2177e6e 100755 --- a/src/Tizen.Applications.WatchApplication/Interop/Interop.Watch.cs +++ b/src/Tizen.Applications.WatchApplication/Interop/Interop.Watch.cs @@ -39,6 +39,7 @@ internal static partial class Interop OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory, InvalidContext = -0x01100000 | 0x01, NoSuchFile = Tizen.Internals.Errors.ErrorCode.NoSuchFile, + NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported, AlreadyRunning = Tizen.Internals.Errors.ErrorCode.AlreadyInProgress } @@ -153,6 +154,5 @@ internal static partial class Interop [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_region_format")] internal static extern Tizen.Internals.Errors.ErrorCode AppEventGetRegionFormat(IntPtr handle, out string region); - } -} +} \ No newline at end of file diff --git a/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.csproj b/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.csproj old mode 100644 new mode 100755 index e56b74e..d0d923b --- a/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.csproj +++ b/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.csproj @@ -7,6 +7,7 @@ + diff --git a/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.sln b/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.sln index 63347eb..9ede788 100755 --- a/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.sln +++ b/src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.12 +VisualStudioVersion = 15.0.26730.10 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.WatchApplication", "Tizen.Applications.WatchApplication.csproj", "{8BF860DC-DCBC-4889-938F-7515C5282D95}" EndProject @@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Common", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "..\ElmSharp\ElmSharp.csproj", "{66EC3D92-AD41-4906-A1A9-3C414B2107F5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", "..\Tizen.System.Information\Tizen.System.Information.csproj", "{F3138394-755D-4055-9561-999823C76BD2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,8 +41,15 @@ Global {66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Debug|Any CPU.Build.0 = Debug|Any CPU {66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.ActiveCfg = Release|Any CPU {66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.Build.0 = Release|Any CPU + {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C24ED662-71DD-4A20-8F6E-C0A16FC8DE1C} + EndGlobalSection EndGlobal diff --git a/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchApplication.cs b/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchApplication.cs index 43cdbca..b02f1a4 100755 --- a/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchApplication.cs +++ b/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchApplication.cs @@ -159,8 +159,10 @@ namespace Tizen.Applications /// Gets the current time /// /// WatchTime + /// http://tizen.org/feature/watch_app /// Thrown when failed to get current time because of invalid parameter. /// Thrown when failed to get current time because memory is not enough. + /// Thrown when the method is not supported. /// /// /// class MyApp : WatchApplication @@ -191,6 +193,8 @@ namespace Tizen.Applications throw new InvalidOperationException("Failed to get current time. err : " + err); else if (err == Interop.Watch.ErrorCode.OutOfMemory) throw new OutOfMemoryException("Failed to get current time. err : " + err); + else if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get current time. err : " + err); } return new WatchTime(handle); } @@ -199,7 +203,9 @@ namespace Tizen.Applications /// Gets the type of periodic ambient tick. /// /// AmbientTickType + /// http://tizen.org/feature/watch_app /// Thrown when failed to get ambient tick type. + /// Thrown when the method is not supported. /// /// /// class MyApp : WatchApplication @@ -227,7 +233,10 @@ namespace Tizen.Applications if(err != Interop.Watch.ErrorCode.None) { - throw new InvalidOperationException("Failed to get ambient tick type. err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get ambient tick type. err : " + err); + else + throw new InvalidOperationException("Failed to get ambient tick type. err : " + err); } return ambientTickType; @@ -239,7 +248,9 @@ namespace Tizen.Applications /// If SetAmbientTickType is not called, OnAmbientTick will be called every minute. /// /// the type of ambient tick + /// http://tizen.org/feature/watch_app /// Thrown when failed to set ambient tick type. + /// Thrown when the method is not supported. /// /// /// class MyApp : WatchApplication @@ -264,7 +275,10 @@ namespace Tizen.Applications if(err != Interop.Watch.ErrorCode.None) { - throw new InvalidOperationException("Failed to set ambient tick type. err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to set ambient tick type. err : " + err); + else + throw new InvalidOperationException("Failed to set ambient tick type. err : " + err); } } @@ -275,7 +289,9 @@ namespace Tizen.Applications /// /// Ticks the number of ticks per given resolution type /// Type of the resolution type + /// http://tizen.org/feature/watch_app /// Thrown when failed to set time tick frequency. + /// Thrown when the method is not supported. /// /// /// class MyApp : WatchApplication @@ -300,7 +316,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - throw new InvalidOperationException("Failed to set time tick frequency. err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to set time tick frequency. err : " + err); + else + throw new InvalidOperationException("Failed to set time tick frequency. err : " + err); } } @@ -309,7 +328,9 @@ namespace Tizen.Applications /// /// Ticks the number of ticks per given resolution type /// Type of the resolution type + /// http://tizen.org/feature/watch_app /// Thrown when failed to get time tick frequency. + /// Thrown when the method is not supported. /// /// /// class MyApp : WatchApplication @@ -336,7 +357,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - throw new InvalidOperationException("Failed to get time tick frequency. err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get time tick frequency. err : " + err); + else + throw new InvalidOperationException("Failed to get time tick frequency. err : " + err); } } } diff --git a/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchTime.cs b/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchTime.cs index 94ce435..e39434c 100755 --- a/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchTime.cs +++ b/src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchTime.cs @@ -34,6 +34,8 @@ namespace Tizen.Applications /// /// The information of year /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Year { get @@ -43,7 +45,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Year err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Year. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Year err : " + err); } return year; } @@ -52,6 +57,8 @@ namespace Tizen.Applications /// /// The information fo month /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Month { get @@ -61,7 +68,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Month err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Month. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Month err : " + err); } return month; } @@ -70,6 +80,8 @@ namespace Tizen.Applications /// /// The information of day /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Day { get @@ -79,7 +91,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Day err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Day. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Day err : " + err); } return day; } @@ -88,6 +103,8 @@ namespace Tizen.Applications /// /// The information of day of week /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int DayOfWeek { get @@ -97,7 +114,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Second err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get DayOfWeek. err : " + err); + else + Log.Error(LOGTAG, "Failed to get DayOfWeek err : " + err); } return dayOfWeek; } @@ -106,6 +126,8 @@ namespace Tizen.Applications /// /// The information of hour /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Hour { get @@ -115,7 +137,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Hour err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Hour. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Hour err : " + err); } return hour; } @@ -124,6 +149,8 @@ namespace Tizen.Applications /// /// The information of hour for 24 hour form /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Hour24 { get @@ -133,7 +160,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Hour24 err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Hour24. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Hour24 err : " + err); } return hour24; } @@ -142,6 +172,8 @@ namespace Tizen.Applications /// /// The information of Minute /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Minute { get @@ -151,7 +183,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Minute err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Minute. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Minute err : " + err); } return minute; } @@ -160,6 +195,8 @@ namespace Tizen.Applications /// /// The information of second /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Second { get @@ -169,7 +206,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Second err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Second. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Second err : " + err); } return second; } @@ -178,6 +218,8 @@ namespace Tizen.Applications /// /// The information of millisecond /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public int Millisecond { get @@ -187,7 +229,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Second err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get Millisecond. err : " + err); + else + Log.Error(LOGTAG, "Failed to get Millisecond err : " + err); } return ms; } @@ -196,6 +241,8 @@ namespace Tizen.Applications /// /// The information of timezone /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public string TimeZone { get @@ -205,7 +252,10 @@ namespace Tizen.Applications if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get Second err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get TimeZone. err : " + err); + else + Log.Error(LOGTAG, "Failed to get TimeZone err : " + err); } return zone; } @@ -214,19 +264,22 @@ namespace Tizen.Applications /// /// The information of UTC time stamp /// + /// http://tizen.org/feature/watch_app + /// Thrown when the property is not supported. public DateTime UtcTimestamp { get { long ts = 0; - Interop.Watch.ErrorCode err = Interop.Watch.WatchTimeGetUtcTimestamp(_handle, out ts); if (err != Interop.Watch.ErrorCode.None) { - Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err); + if (err == Interop.Watch.ErrorCode.NotSupported) + throw new NotSupportedException("Failed to get UtcTimestamp. err : " + err); + else + Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err); } - return (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddSeconds(ts).ToLocalTime(); } } diff --git a/src/Tizen.Convergence/Interop/Interop.Common.cs b/src/Tizen.Convergence/Interop/Interop.Common.cs deleted file mode 100755 index bad120b..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Common.cs +++ /dev/null @@ -1,41 +0,0 @@ -// 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. - -using System; -using System.Runtime.InteropServices; - -internal static partial class Interop -{ - internal abstract class TizenSafeHandle : SafeHandle - { - public abstract void Destroy(); - - public TizenSafeHandle() : base(IntPtr.Zero, true) - { - } - - public TizenSafeHandle(IntPtr handle) : base(handle, true) - { - } - - public override bool IsInvalid - { - get - { - return handle == IntPtr.Zero; - } - } - - protected override bool ReleaseHandle() - { - Destroy(); - SetHandle(IntPtr.Zero); - return true; - } - } -} diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Channel.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Channel.cs deleted file mode 100755 index 4a8a282..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Channel.cs +++ /dev/null @@ -1,67 +0,0 @@ -// 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. - -using System; -using System.Runtime.InteropServices; -using Tizen; -using Tizen.Convergence; - -internal static partial class Interop -{ - internal static partial class Internal - { - internal static partial class ConvChannel - { - [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_create")] - internal static extern int Create(out ConvChannelHandle /* conv_channel_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_destroy")] - internal static extern int Destroy(IntPtr /* conv_channel_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_get_string")] - internal static extern int GetString(ConvChannelHandle /* conv_channel_h */ handle, string key, out IntPtr value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_set_string")] - internal static extern int SetString(ConvChannelHandle /* conv_channel_h */ handle, string key, string value); - } - - internal class ConvChannelHandle : TizenSafeHandle - { - private bool _ownsHandle = true; - - public ConvChannelHandle(): base() - { - - } - - public ConvChannelHandle(IntPtr handle) - : base(handle) - { - } - - public ConvChannelHandle(IntPtr handle, bool ownsHandle) - : base(handle) - { - _ownsHandle = ownsHandle; - } - - public override void Destroy() - { - if (_ownsHandle && handle != IntPtr.Zero) - { - var err = ConvChannel.Destroy(this.handle); - if (err != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to destroy conv channel handle"); - throw ErrorFactory.GetException(err); - } - } - } - } - } -} diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Device.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Device.cs deleted file mode 100755 index cbee849..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Device.cs +++ /dev/null @@ -1,62 +0,0 @@ -// 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. - -using System; -using System.Runtime.InteropServices; -using Tizen; -using Tizen.Convergence; - -internal static partial class Interop -{ - internal static partial class Internal - { - internal static partial class ConvDevice - { - [DllImport(Libraries.Convergence, EntryPoint = "conv_device_clone")] - internal static extern int Clone(IntPtr /* conv_device_h */ originalHandle, out ConvDeviceHandle /* conv_device_h */ targetHandle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_device_destroy")] - internal static extern int Destroy(IntPtr /* conv_device_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_device_get_property_string")] - internal static extern int GetPropertyString(ConvDeviceHandle /* conv_device_h */ handle, string key, out IntPtr value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_device_foreach_service")] - internal static extern int ForeachService(ConvDeviceHandle /* conv_device_h */ handle, ConvServiceForeachCallback cb, IntPtr /* void */ userData); - - [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)] - internal delegate void ConvServiceForeachCallback(IntPtr serviceHandle, IntPtr /* void */ userData); - } - - internal class ConvDeviceHandle : TizenSafeHandle - { - public ConvDeviceHandle() : base() - { - - } - - public ConvDeviceHandle(IntPtr handle) - : base(handle) - { - } - - public override void Destroy() - { - if (handle != IntPtr.Zero) - { - var err = ConvDevice.Destroy(this.handle); - if (err != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to destroy conv device handle"); - throw ErrorFactory.GetException(err); - } - } - } - } - } -} diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Manager.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Manager.cs deleted file mode 100755 index cfdc9e5..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Manager.cs +++ /dev/null @@ -1,79 +0,0 @@ -// 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. - -using System; -using System.Runtime.InteropServices; -using Tizen; -using Tizen.Convergence; - -internal static partial class Interop -{ - internal static partial class Internal - { - public enum ConvDiscoveryResult - { - /// - /// Discovery Error - /// - Error = -1, - /// - /// Discovery Success - /// - Success = 0, - /// - /// Discovery finished - /// - Finished, - /// - /// Discovery lost - /// - Lost, - } - - internal static partial class ConvManager - { - [DllImport(Libraries.Convergence, EntryPoint = "conv_create")] - internal static extern int ConvCreate(out ConvManagerHandle /* conv_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_destroy")] - internal static extern int ConvDestroy(IntPtr /* conv_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_start")] - internal static extern int ConvDiscoveryStart(ConvManagerHandle /* conv_h */ handle, int timeoutSeconds, ConvDiscoveryCallback callback, IntPtr /* void */ userData); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_stop")] - internal static extern int ConvDiscoveryStop(ConvManagerHandle /* conv_h */ handle); - - [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)] - internal delegate void ConvDiscoveryCallback(IntPtr /* conv_device_h */ deviceHandle, ConvDiscoveryResult /* conv_discovery_result_e */ result, IntPtr /* void */ userData); - } - - internal class ConvManagerHandle : TizenSafeHandle - { - public ConvManagerHandle() : base() - { - - } - - public ConvManagerHandle(IntPtr handle) - : base(handle) - { - } - - public override void Destroy() - { - var err = ConvManager.ConvDestroy(this.handle); - if (err != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to destroy conv manager handle"); - throw ErrorFactory.GetException(err); - } - } - } - } -} \ No newline at end of file diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Payload.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Payload.cs deleted file mode 100755 index 902e5e0..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Payload.cs +++ /dev/null @@ -1,79 +0,0 @@ -// 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. - -using System; -using System.Runtime.InteropServices; -using Tizen; -using Tizen.Convergence; - -internal static partial class Interop -{ - internal static partial class Internal - { - internal static partial class ConvPayload - { - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_create")] - internal static extern int Create(out ConvPayloadHandle /* conv_payload_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_destroy")] - internal static extern int Destroy(IntPtr /* conv_payload_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_string")] - internal static extern int SetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, string value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_string")] - internal static extern int GetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, out IntPtr value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_byte")] - internal static extern int SetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, int length, byte[] value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_byte")] - internal static extern int GetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, out int length, out IntPtr value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_binary")] - internal static extern int SetBinary(ConvPayloadHandle /* conv_payload_h */ handle, int length, byte[] value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_binary")] - internal static extern int GetBinary(ConvPayloadHandle /* conv_payload_h */ handle, out int length, out IntPtr value); - } - - internal class ConvPayloadHandle : TizenSafeHandle - { - private bool _ownsHandle = true; - - public ConvPayloadHandle(): base() - { - - } - - public ConvPayloadHandle(IntPtr handle) - : base(handle) - { - } - - public ConvPayloadHandle(IntPtr handle, bool ownsHandle) - : base(handle) - { - _ownsHandle = ownsHandle; - } - - public override void Destroy() - { - if (_ownsHandle && handle != IntPtr.Zero) - { - var err = ConvPayload.Destroy(this.handle); - if (err != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to destroy conv payload handle"); - throw ErrorFactory.GetException(err); - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Service.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Service.cs deleted file mode 100755 index e99233a..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Service.cs +++ /dev/null @@ -1,107 +0,0 @@ -// 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. - -using System; -using System.Runtime.InteropServices; -using Tizen; -using Tizen.Convergence; - -internal static partial class Interop -{ - internal static partial class Internal - { - internal enum ServiceType - { - /// - /// Undefined service - /// - None = -1, - - /// - /// App-to-app communication service - /// - AppCommunication = 0, - - /// - /// Remote app-control service - /// - RemoteAppControl, - } - - internal static partial class ConvService - { - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_create")] - internal static extern int Create(out ConvServiceHandle /* conv_service_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_clone")] - internal static extern int Clone(IntPtr /* conv_service_h */ originalHandle, out ConvServiceHandle /* conv_service_h */ targetHandle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_destroy")] - internal static extern int Destroy(IntPtr /* conv_service_h */ handle); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_property_string")] - internal static extern int GetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, out IntPtr value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_property_string")] - internal static extern int SetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, string value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_type")] - internal static extern int GetType(IntPtr /* conv_service_h */ handle, out int /* conv_service_e */ value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_type")] - internal static extern int SetType(ConvServiceHandle /* conv_service_h */ handle, int /* conv_service_e */ value); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_start")] - internal static extern int Start(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_read")] - internal static extern int Read(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_publish")] - internal static extern int Publish(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_stop")] - internal static extern int Stop(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_listener_cb")] - internal static extern int SetListenerCb(ConvServiceHandle /* conv_service_h */ handle, ConvServiceListenerCallback callback, IntPtr /* void */ userData); - - [DllImport(Libraries.Convergence, EntryPoint = "conv_service_unset_listener_cb")] - internal static extern int UnsetListenerCb(ConvServiceHandle /* conv_service_h */ handle); - - [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)] - internal delegate void ConvServiceListenerCallback(IntPtr /* conv_service_h */ serviceHandle, IntPtr channelHandle, int error, IntPtr result, IntPtr /* void */ userData); - } - - internal class ConvServiceHandle : TizenSafeHandle - { - public ConvServiceHandle(): base() - { - - } - - public ConvServiceHandle(IntPtr handle) - : base(handle) - { - } - - public override void Destroy() - { - if (handle != IntPtr.Zero) - { - var err = ConvService.Destroy(this.handle); - if (err != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to destroy conv service handle"); - throw ErrorFactory.GetException(err); - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Tizen.Convergence/Interop/Interop.Libc.cs b/src/Tizen.Convergence/Interop/Interop.Libc.cs deleted file mode 100755 index 13c7170..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Libc.cs +++ /dev/null @@ -1,27 +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; -using System.Runtime.InteropServices; - -internal static partial class Interop -{ - internal static partial class Libc - { - [DllImport(Libraries.Libc, EntryPoint = "free", CallingConvention = CallingConvention.Cdecl)] - internal static extern int Free(IntPtr ptr); - } -} diff --git a/src/Tizen.Convergence/Interop/Interop.Libraries.cs b/src/Tizen.Convergence/Interop/Interop.Libraries.cs deleted file mode 100755 index 072ed2f..0000000 --- a/src/Tizen.Convergence/Interop/Interop.Libraries.cs +++ /dev/null @@ -1,28 +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. - */ - -internal static partial class Interop -{ - /// - /// Wrapper class for maintaining names of dependent native libraries. - /// - internal static partial class Libraries - { - public const string Convergence = "libd2d-conv-manager.so.0"; - public const string Glib = "libglib-2.0.so.0"; - public const string Libc = "libc.so.6"; - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence.csproj b/src/Tizen.Convergence/Tizen.Convergence.csproj deleted file mode 100644 index 7f4584f..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - - - - - - - - diff --git a/src/Tizen.Convergence/Tizen.Convergence.sln b/src/Tizen.Convergence/Tizen.Convergence.sln deleted file mode 100755 index 6468f53..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence.sln +++ /dev/null @@ -1,34 +0,0 @@ - -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.Convergence", "Tizen.Convergence.csproj", "{2678DBBD-A00B-45EC-970B-10177D421F37}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\Tizen\Tizen.csproj", "{7E7B653C-4119-43C6-A753-7FF659836862}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\Tizen.Log\Tizen.Log.csproj", "{0860A84B-7FAD-434F-9EEB-D59D0FEC145E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2678DBBD-A00B-45EC-970B-10177D421F37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2678DBBD-A00B-45EC-970B-10177D421F37}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2678DBBD-A00B-45EC-970B-10177D421F37}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2678DBBD-A00B-45EC-970B-10177D421F37}.Release|Any CPU.Build.0 = Release|Any CPU - {7E7B653C-4119-43C6-A753-7FF659836862}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E7B653C-4119-43C6-A753-7FF659836862}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E7B653C-4119-43C6-A753-7FF659836862}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E7B653C-4119-43C6-A753-7FF659836862}.Release|Any CPU.Build.0 = Release|Any CPU - {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0860A84B-7FAD-434F-9EEB-D59D0FEC145E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalAppCommunicationService.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalAppCommunicationService.cs deleted file mode 100755 index 64b5658..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalAppCommunicationService.cs +++ /dev/null @@ -1,163 +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; -using System.ComponentModel; -using Tizen.Internals.Errors; - -namespace Tizen.Convergence -{ - /// - /// The class provides APIs to support App to App communication service which relies on a remote server. - /// The initialization and execution of a server app (the app on the side with the Remote Server, e.g. TV) and a client app (e.g. the app on the mobile or wearable device) are slightly different. - /// On the server side an instance of the App Communication Service should be created and started by the app. Note, on the client side the service handle shouldn’t be created, but obtained during discovery. - /// For more information, refer Tizen D2D convergence specification - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalAppCommunicationService : InternalService - { - /// - /// The constructor - /// - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - public InternalAppCommunicationService() : - base(Interop.Internal.ServiceType.AppCommunication) - { - - } - - internal InternalAppCommunicationService(IntPtr serviceHandle) : - base(serviceHandle) - { - - } - - /// - /// Starts and initiates the service - /// - /// Channel to specify a logical session for the service - /// Contains additional data for start request. Refer D2D Convergence specification for more information - /// http://tizen.org/privilege/internet - /// http://tizen.org/privilege/bluetooth - /// http://tizen.org/privilege/d2d.datasharing - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown when the request is not supported as per Tizen D2D convergence specification - /// Thrown when any of the arugments are null - /// The result of the request is delivered through this event - public void Start(InternalChannel channel, InternalPayload payload) - { - if (channel == null) - { - throw new ArgumentNullException(); - } - - Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle; - int ret = Interop.Internal.ConvService.Start(_serviceHandle, channel._channelHandle, handle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Interop: Failed to start app communication service:" + ErrorFacts.GetErrorMessage(ret)); - throw ErrorFactory.GetException(ret); - } - } - - /// - /// Reads data from the channel opened on the service - /// - /// Channel representing a logical session on the service - /// Contains additional data for start request. Refer D2D Convergence specification for more information - /// http://tizen.org/privilege/internet - /// http://tizen.org/privilege/bluetooth - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown when the request is not supported as per Tizen D2D convergence specification - /// Thrown when any of the arugments are null - /// The result of the request is delivered through this event - public void Read(InternalChannel channel, InternalPayload payload) - { - if (channel == null) - { - throw new ArgumentNullException(); - } - - Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle; - int ret = Interop.Internal.ConvService.Read(_serviceHandle, channel._channelHandle, handle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Interop: Failed to read app communication service:" + ErrorFacts.GetErrorMessage(ret)); - throw ErrorFactory.GetException(ret); - } - } - - /// - /// Publishes a message to the remote server application - /// - /// Channel representing a logical session on the service - /// Contains additional data for start request. Refer D2D Convergence specification for more information - /// http://tizen.org/privilege/internet - /// http://tizen.org/privilege/bluetooth - /// http://tizen.org/privilege/d2d.datasharing - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown when the request is not supported as per Tizen D2D convergence specification - /// Thrown when any of the arugments are null - /// The result of the request is delivered through this event - public void Publish(InternalChannel channel, InternalPayload payload) - { - if (channel == null) - { - throw new ArgumentNullException(); - } - - Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle; - int ret = Interop.Internal.ConvService.Publish(_serviceHandle, channel._channelHandle, handle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Interop: Failed to publish app communication service:" + ErrorFacts.GetErrorMessage(ret)); - throw ErrorFactory.GetException(ret); - } - } - - /// - /// Stops the channel opened on the remote server application - /// - /// Channel representing a logical session on the service - /// Contains additional data for start request. Refer D2D Convergence specification for more information - /// http://tizen.org/privilege/internet - /// http://tizen.org/privilege/bluetooth - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown when the request is not supported as per Tizen D2D convergence specification - /// Thrown when any of the arugments are null - /// The result of the request is delivered through this event - public void Stop(InternalChannel channel, InternalPayload payload) - { - if (channel == null) - { - throw new ArgumentNullException(); - } - - Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle; - int ret = Interop.Internal.ConvService.Stop(_serviceHandle, channel._channelHandle, handle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Interop: Failed to start stop communication service:" + ErrorFacts.GetErrorMessage(ret)); - throw ErrorFactory.GetException(ret); - } - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalChannel.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalChannel.cs deleted file mode 100755 index 72b00ec..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalChannel.cs +++ /dev/null @@ -1,116 +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; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// The Channel class provies a logical session for communicating with AppCommunicationService. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalChannel : IDisposable - { - internal Interop.Internal.ConvChannelHandle _channelHandle; - internal const string ChannelUriKey = "uri"; - internal const string ChannelIdKey = "channel_id"; - - /// - /// The constructor - /// - /// Uri of the server side app - /// Unique identifier - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Throws when the arguments passed are null - public InternalChannel(string uri, string id) - { - if (uri == null || id == null) - { - throw new ArgumentNullException(); - } - - int ret = Interop.Internal.ConvChannel.Create(out _channelHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create channel"); - throw ErrorFactory.GetException(ret); - } - - ret = Interop.Internal.ConvChannel.SetString(_channelHandle, ChannelUriKey, uri); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create channel"); - throw ErrorFactory.GetException(ret); - } - - ret = Interop.Internal.ConvChannel.SetString(_channelHandle, ChannelIdKey, id); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create channel"); - throw ErrorFactory.GetException(ret); - } - - Uri = uri; - Id = id; - } - - internal InternalChannel(IntPtr channelHandle) - { - _channelHandle = new Interop.Internal.ConvChannelHandle(channelHandle, false); - - IntPtr stringPtr = IntPtr.Zero; - int ret = Interop.Internal.ConvChannel.GetString(_channelHandle, ChannelUriKey, out stringPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create channel"); - throw ErrorFactory.GetException(ret); - } - Uri = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - - ret = Interop.Internal.ConvChannel.GetString(_channelHandle, ChannelIdKey, out stringPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create channel"); - throw ErrorFactory.GetException(ret); - } - - Id = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - } - - /// - /// Uri of the server side app - /// - public string Uri { get; } - - /// - /// Unique identifier - /// - public string Id { get; } - - /// - /// The dispose method - /// - public void Dispose() - { - _channelHandle.Dispose(); - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalDevice.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalDevice.cs deleted file mode 100755 index 0676fca..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalDevice.cs +++ /dev/null @@ -1,116 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// The class encapsulates a D2D convergence compliant device information - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalDevice : IDisposable - { - internal const string DeviceIdKey = "device_id"; - internal const string DeviceNameKey = "device_name"; - internal const string DeviceTypeKey = "device_type"; - internal Interop.Internal.ConvDeviceHandle _deviceHandle; - internal List _services = new List(); - - /// - /// The Unique ID of the device - /// - public string Id { get;} - - /// - /// Name of the device - /// - public string Name { get;} - - /// - /// The profile of the device - /// - public string Type { get; } - - /// - /// List of services supported by the device - /// - public IEnumerable Services - { - get - { - return _services; - } - } - - internal InternalDevice(IntPtr deviceHandle) - { - int ret = Interop.Internal.ConvDevice.Clone(deviceHandle, out _deviceHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to clone device"); - throw ErrorFactory.GetException(ret); - } - - IntPtr stringPtr = IntPtr.Zero; - ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceIdKey, out stringPtr); - if (ret == (int)ConvErrorCode.None) - { - Id = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - } - - ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceNameKey, out stringPtr); - if (ret == (int)ConvErrorCode.None) - { - Name = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - } - - ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceTypeKey, out stringPtr); - if (ret != (int)ConvErrorCode.None) - { - Type = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - } - - Log.Debug(ErrorFactory.LogTag, "Device ID ,Name, and Type:[" + Id +"," + Name +"," + Type +"]"); - - Interop.Internal.ConvDevice.ConvServiceForeachCallback cb = (IntPtr serviceHandle, IntPtr userData) => - { - _services.Add(InternalService.GetService(serviceHandle)); - }; - - ret = Interop.Internal.ConvDevice.ForeachService(_deviceHandle, cb, IntPtr.Zero); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to get device services"); - throw ErrorFactory.GetException(ret); - } - } - - /// - /// The dispose method - /// - public void Dispose() - { - _deviceHandle.Dispose(); - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFinder.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFinder.cs deleted file mode 100755 index aea5f89..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFinder.cs +++ /dev/null @@ -1,133 +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; -using Tizen; -using System.Threading; -using System.Threading.Tasks; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// DeviceFinder provides API to find all nearby Tizen D2D convergence compliant devices - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalDeviceFinder : IDisposable - { - internal Interop.Internal.ConvManagerHandle _convManagerHandle; - - /// - /// The constructor - /// - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - public InternalDeviceFinder() - { - int ret = Interop.Internal.ConvManager.ConvCreate(out _convManagerHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create conv manager handle"); - throw ErrorFactory.GetException(ret); - } - - } - - /// - /// DeviceFound event is triggered when a device is found during discovery procedure - /// - public event EventHandler DeviceFound; - - /// - /// Starts the discovery of nearby devices - /// - /// Seconds for discovery timeout. 0 will use default timeout value - /// Cancellation token required to cancel the current discovery - /// http://tizen.org/privilege/internet - /// http://tizen.org/privilege/bluetooth - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown when the request is not supported as per Tizen D2D convergence specification - /// Devices found are delivered through this event - /// Task with discovery result - public async Task StartFindingAsync(int timeOut, CancellationToken cancellationToken = default(CancellationToken)) - { - var task = new TaskCompletionSource(); - Interop.Internal.ConvManager.ConvDiscoveryCallback discoveredCb = (IntPtr deviceHandle, Interop.Internal.ConvDiscoveryResult result, IntPtr userData) => - { - Log.Debug(ErrorFactory.LogTag, "discovery callback called with result:[" + result + "]"); - switch (result) - { - case Interop.Internal.ConvDiscoveryResult.Success: - { - InternalDevice device = new InternalDevice(deviceHandle); - InternalDeviceFoundEventArgs deviceFoundEventArgs = new InternalDeviceFoundEventArgs() - { - Device = device - }; - DeviceFound?.Invoke(this, deviceFoundEventArgs); - break; - } - case Interop.Internal.ConvDiscoveryResult.Error: - { - task.TrySetException(new InvalidOperationException("Discovery error occured")); - break; - } - case Interop.Internal.ConvDiscoveryResult.Lost: - { - task.TrySetException(new InvalidOperationException("Discovery Lost")); - break; - } - case Interop.Internal.ConvDiscoveryResult.Finished: - { - Log.Debug(ErrorFactory.LogTag, "discovery process finished"); - task.TrySetResult(true); - break; - } - } - }; - int ret = Interop.Internal.ConvManager.ConvDiscoveryStart(_convManagerHandle, timeOut, discoveredCb, IntPtr.Zero); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to start finding devices"); - throw ErrorFactory.GetException(ret); - } - - if (cancellationToken != CancellationToken.None) - { - cancellationToken.Register(() => - { - int error = Interop.Internal.ConvManager.ConvDiscoveryStop(_convManagerHandle); - if (error != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to stop finding devices" + Internals.Errors.ErrorFacts.GetErrorMessage(error)); - throw ErrorFactory.GetException(error); - } - task.TrySetCanceled(); - }); - } - await task.Task; - } - - /// - /// The dispose method - /// - public void Dispose() - { - _convManagerHandle.Dispose(); - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFoundEventArgs.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFoundEventArgs.cs deleted file mode 100755 index 60c3df0..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFoundEventArgs.cs +++ /dev/null @@ -1,35 +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; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// Contains arguments for the event DeviceFound. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalDeviceFoundEventArgs : EventArgs - { - internal InternalDeviceFoundEventArgs() { } - - /// - /// The device found - /// - public InternalDevice Device { get; internal set; } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalErrorFactory.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalErrorFactory.cs deleted file mode 100755 index 8954997..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalErrorFactory.cs +++ /dev/null @@ -1,71 +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; -using Tizen.Internals.Errors; -using System.Threading.Tasks; -using System.Threading; - -namespace Tizen.Convergence -{ - internal enum ConvErrorCode - { - None = ErrorCode.None, - OutOfMemory = ErrorCode.OutOfMemory, - InvalidParameter = ErrorCode.InvalidParameter, - InvalidOperation = ErrorCode.InvalidOperation, - NoData = ErrorCode.NoData, - NotSupported = ErrorCode.NotSupported, - PermissionDenied = ErrorCode.PermissionDenied, - } - - internal class ErrorFactory - { - internal static string LogTag = "Tizen.Convergence"; - - internal static Exception GetException(int error) - { - if ((ConvErrorCode)error == ConvErrorCode.OutOfMemory) - { - return new OutOfMemoryException("Out of memory"); - } - else if ((ConvErrorCode)error == ConvErrorCode.InvalidParameter) - { - return new ArgumentException("Invalid parameter"); - } - else if ((ConvErrorCode)error == ConvErrorCode.InvalidOperation) - { - return new InvalidOperationException("Invalid operation"); - } - else if ((ConvErrorCode)error == ConvErrorCode.NotSupported) - { - return new NotSupportedException("Unsupported feature http://tizen.org/feature/convergence.d2d"); - } - else if ((ConvErrorCode)error == ConvErrorCode.PermissionDenied) - { - return new UnauthorizedAccessException("Permission denied. (http://tizen.org/privilege/internet, http://tizen.org/privilege/bluetooth, http://tizen.org/privilege/d2d.datasharing)"); - } - else if ((ConvErrorCode)error == ConvErrorCode.NoData) - { - return new InvalidOperationException("The payload is empty"); - } - else - { - return new Exception("Unknown error"); - } - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalPayload.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalPayload.cs deleted file mode 100755 index d5df0a8..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalPayload.cs +++ /dev/null @@ -1,219 +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; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// Represents a payload used in Tizen D2D convergence - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalPayload : IDisposable - { - internal Interop.Internal.ConvPayloadHandle _payloadHandle; - - /// - /// The constructor - /// - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - public InternalPayload() - { - int ret = Interop.Internal.ConvPayload.Create(out _payloadHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create payload"); - throw ErrorFactory.GetException(ret); - } - } - - internal InternalPayload(IntPtr payloadHandle) - { - _payloadHandle = new Interop.Internal.ConvPayloadHandle(payloadHandle, false); - } - - /// - /// Adds a key-value pair to payload - /// - /// The key of the attribute - /// The value of the attribute - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown if the arguments passed are null - public void Set(string key, string value) - { - if(key == null || value == null) - { - throw new ArgumentNullException(); - } - - int ret = 0; - if (value is string) - { - ret = Interop.Internal.ConvPayload.SetString(_payloadHandle, key, value); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to add string to payload"); - throw ErrorFactory.GetException(ret); - } - } - } - - /// - /// Adds a key-value pair to payload - /// - /// The key of the attribute - /// The value of the attribute - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown if the arguments passed are null - public void Set(string key, byte[] value) - { - if (key == null || value == null) - { - throw new ArgumentNullException(); - } - - int ret = 0; - ret = Interop.Internal.ConvPayload.SetByte(_payloadHandle, key, value.Length, value); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to add string to payload"); - throw ErrorFactory.GetException(ret); - } - } - - - /// - /// Sets binary to payload. - /// - /// The binary to set - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown if the arguments passed are null - public void Set(byte[] value) - { - if (value == null) - { - throw new ArgumentNullException(); - } - - int ret = 0; - ret = Interop.Internal.ConvPayload.SetBinary(_payloadHandle, value.Length, value); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to add binary to payload"); - throw ErrorFactory.GetException(ret); - } - } - - /// - /// Gets the value of the key from payload - /// - /// The key of the attribute - /// The value of the attribute - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown if the arguments passed are null - /// Thrown if the key is not found - public void Get(string key, out string value) - { - if (key == null) - { - throw new ArgumentNullException(); - } - - IntPtr stringPtr = IntPtr.Zero; - int ret = 0; - ret = Interop.Internal.ConvPayload.GetString(_payloadHandle, key, out stringPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to add string to payload"); - throw ErrorFactory.GetException(ret); - } - - value = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - } - - /// - /// Gets the value of the key from payload - /// - /// The key of the attribute - /// The value of the attribute - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - /// Thrown if the arguments passed are null - /// Thrown if the key is not found - public void Get(string key, out byte[] value) - { - if (key == null) - { - throw new ArgumentNullException(); - } - - int ret = 0; - IntPtr byteArrayPtr; - int byteArraySize; - ret = Interop.Internal.ConvPayload.GetByte(_payloadHandle, key, out byteArraySize, out byteArrayPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to add string to payload"); - throw ErrorFactory.GetException(ret); - } - - byte[] byteArray = new byte[byteArraySize]; - Marshal.Copy(byteArrayPtr, byteArray, 0, byteArraySize); - value = byteArray; - Interop.Libc.Free(byteArrayPtr); - } - - /// - /// Gets binary from payload - /// - /// The result value - /// http://tizen.org/feature/convergence.d2d - /// Thrown if the required feature is not supported. - public void Get(out byte[] value) - { - int ret = 0; - IntPtr byteArrayPtr; - int byteArraySize; - ret = Interop.Internal.ConvPayload.GetBinary(_payloadHandle, out byteArraySize, out byteArrayPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to get binary from payload"); - throw ErrorFactory.GetException(ret); - } - - byte[] byteArray = new byte[byteArraySize]; - Marshal.Copy(byteArrayPtr, byteArray, 0, byteArraySize); - value = byteArray; - Interop.Libc.Free(byteArrayPtr); - } - - /// - /// The dispose method - /// - public void Dispose() - { - _payloadHandle.Dispose(); - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalService.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalService.cs deleted file mode 100755 index 6740231..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalService.cs +++ /dev/null @@ -1,192 +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; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// The class abstracts the features provided by Tizen D2D Convergence. - /// - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public abstract class InternalService : IDisposable - { - internal Interop.Internal.ConvServiceHandle _serviceHandle; - internal const string ServiceIdKey = "service_id"; - internal const string ServiceVersionKey = "service_version"; - - private event EventHandler _serviceEventOccured; - - internal InternalService(Interop.Internal.ServiceType type) - { - int ret = Interop.Internal.ConvService.Create(out _serviceHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create service handle"); - throw ErrorFactory.GetException(ret); - } - - ret = Interop.Internal.ConvService.SetType(_serviceHandle, (int)type); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to create service handle"); - throw ErrorFactory.GetException(ret); - } - } - - internal InternalService(IntPtr existingServiceHandle) - { - int ret = Interop.Internal.ConvService.Clone(existingServiceHandle, out _serviceHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to clone device"); - throw ErrorFactory.GetException(ret); - } - - IntPtr stringPtr = IntPtr.Zero; - ret = Interop.Internal.ConvService.GetPropertyString(_serviceHandle, ServiceIdKey, out stringPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to get service Id"); - throw ErrorFactory.GetException(ret); - } - - Id = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - - ret = Interop.Internal.ConvService.GetPropertyString(_serviceHandle, ServiceVersionKey, out stringPtr); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to get service version"); - throw ErrorFactory.GetException(ret); - } - - Version = Marshal.PtrToStringAnsi(stringPtr); - Interop.Libc.Free(stringPtr); - } - - /// - /// The ID of the service - /// - public string Id { get; } - - /// - /// The Version of the service - /// - public string Version { get; } - - /// - /// The event handler for Service Events(Start/Publish/Read/Stop) - /// - public event EventHandler ServiceEventOccurred - { - add - { - if (_serviceEventOccured == null) - { - RegisterServiceEventListener(); - } - _serviceEventOccured += value; - } - remove - { - _serviceEventOccured -= value; - if (_serviceEventOccured == null) - { - UnregisterServiceEventListener(); - } - } - } - - /// - /// The event handler for service error events - /// - public event EventHandler ServiceErrorOccured; - - /// - /// The dispose method - /// - public void Dispose() - { - _serviceHandle.Dispose(); - } - - internal static InternalService GetService(IntPtr serviceHandle) - { - InternalService service = null; - int serviceType; - int ret = Interop.Internal.ConvService.GetType(serviceHandle, out serviceType); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to get service version"); - throw ErrorFactory.GetException(ret); - } - if (serviceType == (int)Interop.Internal.ServiceType.AppCommunication) - { - service = new InternalAppCommunicationService(serviceHandle); - } - - return service; - } - - private void RegisterServiceEventListener() - { - int ret = Interop.Internal.ConvService.SetListenerCb(_serviceHandle, serviceEventsCb, IntPtr.Zero); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to set listener for service events"); - throw ErrorFactory.GetException(ret); - } - } - - private void UnregisterServiceEventListener() - { - int ret = Interop.Internal.ConvService.UnsetListenerCb(_serviceHandle); - if (ret != (int)ConvErrorCode.None) - { - Log.Error(ErrorFactory.LogTag, "Failed to unset listener for service events"); - throw ErrorFactory.GetException(ret); - } - } - - private void serviceEventsCb(IntPtr serviceHandle, IntPtr channelHandle, int error, IntPtr resultPayloadHandle, IntPtr userData) - { - Log.Debug(ErrorFactory.LogTag, "service event occured. error code :[" + error + "]"); - - if (error == (int)ConvErrorCode.None) - { - var channel = (channelHandle == IntPtr.Zero) ? null : new InternalChannel(channelHandle); - var payload = (resultPayloadHandle == IntPtr.Zero) ? null : new InternalPayload(resultPayloadHandle); - _serviceEventOccured?.Invoke(this, new InternalServiceEventOccuredEventArgs() - { - Payload = payload, - Channel = channel - }); - } - else - { - var eventArgs = new InternalServiceErrorOccuredEventArgs() - { - Exception = ErrorFactory.GetException(error) - }; - ServiceErrorOccured?.Invoke(this, eventArgs); - } - } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalServiceErrorOccuredEventArgs.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalServiceErrorOccuredEventArgs.cs deleted file mode 100755 index 104a05b..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalServiceErrorOccuredEventArgs.cs +++ /dev/null @@ -1,35 +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; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// Contains arguments for the event ServiceErrorOccured. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalServiceErrorOccuredEventArgs : EventArgs - { - internal InternalServiceErrorOccuredEventArgs() { } - - /// - /// The exception - /// - public Exception Exception { get; internal set; } - } -} diff --git a/src/Tizen.Convergence/Tizen.Convergence/InternalServiceEventOccuredEventArgs.cs b/src/Tizen.Convergence/Tizen.Convergence/InternalServiceEventOccuredEventArgs.cs deleted file mode 100755 index e07c9e3..0000000 --- a/src/Tizen.Convergence/Tizen.Convergence/InternalServiceEventOccuredEventArgs.cs +++ /dev/null @@ -1,40 +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; -using System.ComponentModel; - -namespace Tizen.Convergence -{ - /// - /// Contains arguments for ServiceEventOccured - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class InternalServiceEventOccuredEventArgs : EventArgs - { - internal InternalServiceEventOccuredEventArgs() { } - - /// - /// The channel on which the event occured - /// - public InternalChannel Channel { get; internal set; } - - /// - /// The payload containing the result - /// - public InternalPayload Payload { get; internal set; } - } -} diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/NamespaceDoc.cs b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/NamespaceDoc.cs index 42e91c1..6960e7f 100644 --- a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/NamespaceDoc.cs +++ b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/NamespaceDoc.cs @@ -4,4 +4,5 @@ /// /// The Tizen.PhonenumberUtils namespace provides a class for parsing, formatting and normalizing phone numbers. /// +/// 4 namespace Tizen.PhonenumberUtils {} diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs index c410568..9368f8c 100644 --- a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs +++ b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtils.cs @@ -21,10 +21,18 @@ namespace Tizen.PhonenumberUtils /// /// The PhonenumberUtils class provides methods for parsing, formatting and normalizing phone numbers. /// + /// 4 public class PhonenumberUtils : IDisposable { private bool disposed = false; + /// + /// Creates a PhonenumberUtils. + /// + /// http://tizen.org/feature/network.telephony + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// 4 public PhonenumberUtils() { int ret; @@ -46,6 +54,7 @@ namespace Tizen.PhonenumberUtils /// Releases all resources used by the PhonenumberUtils. /// It should be called after finished using of the object. /// + /// 4 public void Dispose() { Dispose(true); @@ -74,10 +83,12 @@ namespace Tizen.PhonenumberUtils /// The region of number /// The language of location /// The location string + /// http://tizen.org/feature/network.telephony /// Thrown when method failed due to invalid operation - /// Thrown when phonenumber-utils is not supported + /// Thrown when feature is not supported /// Thrown when input coordinates are invalid /// Thrown when failed due to out of memory + /// 4 public string GetLocationFromNumber(string number, Region region, Language language) { int ret; @@ -99,10 +110,12 @@ namespace Tizen.PhonenumberUtils /// The number /// The region of number /// The formatted number string + /// http://tizen.org/feature/network.telephony /// Thrown when method failed due to invalid operation - /// Thrown when phonenumber-utils is not supported + /// Thrown when feature is not supported /// Thrown when input coordinates are invalid /// Thrown when failed due to out of memory + /// 4 public string GetFormattedNumber(string number, Region region) { int ret; @@ -126,7 +139,7 @@ namespace Tizen.PhonenumberUtils /// http://tizen.org/privilege/telephony /// http://tizen.org/feature/network.telephony /// Thrown when method failed due to invalid operation - /// Thrown when phonenumber-utils is not supported + /// Thrown when feature is not supported /// Thrown when input coordinates are invalid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges @@ -134,6 +147,7 @@ namespace Tizen.PhonenumberUtils /// Normalized number starts with plus('+') and country code, and excludes the separators such as dash or space. /// It is a format of E.164 standard including the country code based on current network. /// + /// 4 public string GetNormalizedNumber(string number) { int ret; diff --git a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs index 8710866..b1294cf 100644 --- a/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs +++ b/src/Tizen.PhonenumberUtils/Tizen.PhonenumberUtils/PhonenumberUtilsEnumerations.cs @@ -19,6 +19,7 @@ namespace Tizen.PhonenumberUtils /// /// Enumeration for language type. /// + /// 4 public enum Language { /// @@ -144,13 +145,13 @@ namespace Tizen.PhonenumberUtils /// /// Current System Value /// - System, - Max + System } /// /// Enumeration for region type. /// + /// 4 public enum Region { /// @@ -1132,7 +1133,6 @@ namespace Tizen.PhonenumberUtils /// /// Current System Value /// - System, - Max + System } } diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsDatabase.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsDatabase.cs index b5a529b..4693574 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsDatabase.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsDatabase.cs @@ -28,6 +28,7 @@ namespace Tizen.Pims.Contacts /// /// This class allows user to access/create/update db operations for contacts information. /// + /// 4 public class ContactsDatabase { private Object thisLock = new Object(); @@ -44,6 +45,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for contacts database status. /// + /// 4 public enum DBStatus { /// @@ -59,6 +61,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contacts search range. /// + /// 4 [Flags] public enum SearchRanges { @@ -87,6 +90,7 @@ namespace Tizen.Pims.Contacts /// /// Occurs when contacts database status is changed. /// + /// 4 public event EventHandler DBStatusChanged { add @@ -139,6 +143,7 @@ namespace Tizen.Pims.Contacts /// The current contacts database version. /// /// The current contacts database version. + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public int Version { @@ -158,6 +163,7 @@ namespace Tizen.Pims.Contacts /// The last successful changed contacts database version on the current connection. /// /// The last successful changed contacts database version on the current connection. + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public int LastChangeVersion { @@ -177,6 +183,7 @@ namespace Tizen.Pims.Contacts /// The contacts database status. /// /// The contacts database status. + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public DBStatus Status { @@ -199,11 +206,13 @@ namespace Tizen.Pims.Contacts /// The ID of inserted record /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public int Insert(ContactsRecord record) { @@ -224,11 +233,13 @@ namespace Tizen.Pims.Contacts /// The inserted record ID array /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public int[] Insert(ContactsList list) { @@ -255,11 +266,13 @@ namespace Tizen.Pims.Contacts /// The record associated with the record ID /// http://tizen.org/privilege/contact.read /// http://tizen.org/privilege/callhistory.read + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsRecord Get(string viewUri, int recordId) @@ -280,11 +293,13 @@ namespace Tizen.Pims.Contacts /// The record to update /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public void Update(ContactsRecord record) { @@ -302,11 +317,13 @@ namespace Tizen.Pims.Contacts /// The record list /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public void Update(ContactsList list) { @@ -325,11 +342,13 @@ namespace Tizen.Pims.Contacts /// The record ID to delete /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Delete(string viewUri, int recordId) @@ -349,11 +368,13 @@ namespace Tizen.Pims.Contacts /// The record IDs to delete /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Delete(string viewUri, int[] idArray) @@ -373,11 +394,13 @@ namespace Tizen.Pims.Contacts /// the record ID to be replaced /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public void Replace(ContactsRecord record, int recordId) { @@ -396,11 +419,13 @@ namespace Tizen.Pims.Contacts /// The record IDs to be replaced /// http://tizen.org/privilege/contact.write /// http://tizen.org/privilege/callhistory.write + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public void Replace(ContactsList list, int[] idArray) { @@ -423,11 +448,13 @@ namespace Tizen.Pims.Contacts /// /// http://tizen.org/privilege/contact.read /// http://tizen.org/privilege/callhistory.read + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsList GetAll(string viewUri, int offset, int limit) @@ -453,11 +480,13 @@ namespace Tizen.Pims.Contacts /// /// http://tizen.org/privilege/contact.read /// http://tizen.org/privilege/callhistory.read + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public ContactsList GetRecordsWithQuery(ContactsQuery query, int offset, int limit) { @@ -482,11 +511,13 @@ namespace Tizen.Pims.Contacts /// The record list /// /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation - /// Thrown when an invoked method is not supported + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsList GetChangesByVersion(string viewUri, int addressBookId, int contactsDBVersion, out int currentDBVersion) @@ -514,6 +545,13 @@ namespace Tizen.Pims.Contacts /// The number to limit results(value 0 is used for get all records) /// The record list /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsList Search(string viewUri, string keyword, int offset, int limit) @@ -540,6 +578,14 @@ namespace Tizen.Pims.Contacts /// The index from which to get results /// The number to limit results(value 0 used for get all records) /// The record list + /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public ContactsList Search(ContactsQuery query, string keyword, int offset, int limit) { @@ -566,6 +612,14 @@ namespace Tizen.Pims.Contacts /// The number to limit results(value 0 is used for get all records) /// The search range, it should be a element of SearchRange or bitwise OR operation of them /// The record list + /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsList Search(string viewUri, string keyword, int offset, int limit, int range) @@ -596,6 +650,14 @@ namespace Tizen.Pims.Contacts /// The text which is inserted into the fragment after the keyword(If NULL, default is "]") /// The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") /// The record list + /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsList Search(string viewUri, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber) @@ -626,6 +688,14 @@ namespace Tizen.Pims.Contacts /// The text which is inserted into the fragment after the keyword(If NULL, default is "]") /// The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") /// The record list + /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public ContactsList Search(ContactsQuery query, string keyword, int offset, int limit, string startMatch, string endMatch, int tokenNumber) { @@ -656,6 +726,14 @@ namespace Tizen.Pims.Contacts /// The text which is inserted into the fragment after the keyword(If NULL, default is "]") /// The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") /// The record list + /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsList Search(string viewUri, string keyword, int offset, int limit, int range, string startMatch, string endMatch, int tokenNumber) @@ -675,6 +753,7 @@ namespace Tizen.Pims.Contacts /// /// The view URI /// The count of records + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public int GetCount(string viewUri) @@ -694,6 +773,7 @@ namespace Tizen.Pims.Contacts /// /// The query used for filtering the results /// The count of records + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public int GetCount(ContactsQuery query) { @@ -712,6 +792,15 @@ namespace Tizen.Pims.Contacts /// /// The view URI of records whose changes are monitored /// The EventHandler to register + /// http://tizen.org/privilege/contact.read + /// http://tizen.org/privilege/callhistory.read + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// Thrown when application does not have proper privileges + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void AddDBChangedEventHandler(string viewUri, EventHandler DBChanged) { @@ -732,7 +821,7 @@ namespace Tizen.Pims.Contacts } EventHandler handler = null; - if (!_eventHandlerMap.TryGetValue(viewUri, out handler)) + if (!_eventHandlerMap.TryGetValue(viewUri, out handler)) _eventHandlerMap.Add(viewUri, null); _eventHandlerMap[viewUri] = handler + DBChanged; @@ -743,6 +832,12 @@ namespace Tizen.Pims.Contacts /// /// The view URI of records whose changes are monitored /// The EventHandler to deregister + /// http://tizen.org/feature/contact + /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// Thrown when one of the arguments provided to a method is not valid + /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void RemoveDBChangedEventHandler(string viewUri, EventHandler DBChanged) { diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsFilter.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsFilter.cs index 826a73c..06a620e 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsFilter.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsFilter.cs @@ -22,6 +22,7 @@ namespace Tizen.Pims.Contacts /// /// A filter includes the conditions for the search /// + /// 4 public class ContactsFilter:IDisposable { internal IntPtr _filterHandle; @@ -33,9 +34,11 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsFilter(string viewUri, uint propertyId, StringMatchType matchType, string matchValue) { @@ -62,9 +65,11 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue) { @@ -91,9 +96,11 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, long matchValue) { @@ -120,9 +127,11 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, double matchValue) { @@ -148,9 +157,11 @@ namespace Tizen.Pims.Contacts /// The view URI of a filter /// The property ID to add a condition /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsFilter(string viewUri, uint propertyId, bool matchValue) { @@ -173,6 +184,7 @@ namespace Tizen.Pims.Contacts /// /// Destructor /// + /// 4 ~ContactsFilter() { Dispose(false); @@ -181,6 +193,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for the filter match type of a string. /// + /// 4 public enum StringMatchType { /// @@ -212,6 +225,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for the filter match type of an integer. /// + /// 4 public enum IntegerMatchType { /// @@ -247,6 +261,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for a filter operator. /// + /// 4 public enum LogicalOperator { /// @@ -266,6 +281,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsFilter. /// /// Disposing by User + /// 4 protected virtual void Dispose(bool disposing) { if (disposing) @@ -291,6 +307,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsFilter. /// It should be called after finished using of the object. /// + /// 4 public void Dispose() { Dispose(true); @@ -305,8 +322,10 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddCondition(LogicalOperator logicalOperator, uint propertyId, StringMatchType matchType, string matchValue) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); @@ -331,8 +350,10 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, int matchValue) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); @@ -357,8 +378,10 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, long matchValue) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); @@ -383,8 +406,10 @@ namespace Tizen.Pims.Contacts /// The property ID to add a condition /// The match flag /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, double matchValue) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); @@ -408,8 +433,10 @@ namespace Tizen.Pims.Contacts /// The operator type /// The property ID to add a condition /// The match value - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddCondition(LogicalOperator logicalOperator, uint propertyId, bool matchValue) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); @@ -432,8 +459,10 @@ namespace Tizen.Pims.Contacts /// /// The operator type /// The child filter - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddFilter(LogicalOperator logicalOperator, ContactsFilter filter) { int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator); diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsList.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsList.cs index fc62de1..577bd69 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsList.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsList.cs @@ -21,6 +21,7 @@ namespace Tizen.Pims.Contacts /// /// A list of records with the same type /// + /// 4 public class ContactsList:IDisposable { private Int64 _memoryPressure = 20; @@ -43,8 +44,10 @@ namespace Tizen.Pims.Contacts /// /// Creates a contacts record list. /// - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when failed due to out of memory + /// 4 public ContactsList() { int error = Interop.List.ContactsListCreate(out _listHandle); @@ -59,6 +62,7 @@ namespace Tizen.Pims.Contacts /// /// Destructor /// + /// 4 ~ContactsList() { Dispose(false); @@ -68,6 +72,7 @@ namespace Tizen.Pims.Contacts /// The count of contact entity. /// /// The count of contact entity. + /// 4 public int Count { get @@ -89,6 +94,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsList. /// /// Disposing by User + /// 4 protected virtual void Dispose(bool disposing) { if (disposing) @@ -115,6 +121,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsList. /// It should be called after finished using of the object. /// + /// 4 public void Dispose() { Dispose(true); @@ -126,8 +133,10 @@ namespace Tizen.Pims.Contacts /// Adds a record to the contacts list. /// /// The record to add - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddRecord(ContactsRecord record) { int error = Interop.List.ContactsListAdd(_listHandle, record._recordHandle); @@ -144,8 +153,10 @@ namespace Tizen.Pims.Contacts /// Removes a record from the contacts list. /// /// The record to remove - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void RemoveRecord(ContactsRecord record) { int error = Interop.List.ContactsListRemove(_listHandle, record._recordHandle); @@ -164,6 +175,9 @@ namespace Tizen.Pims.Contacts /// /// contacts record /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported + /// 4 public ContactsRecord GetCurrentRecord() { IntPtr handle; @@ -182,6 +196,9 @@ namespace Tizen.Pims.Contacts /// /// When the cursor is already at the first position, it returns false. /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported + /// 4 public bool MovePrevious() { int error = Interop.List.ContactsListPrev(_listHandle); @@ -208,6 +225,9 @@ namespace Tizen.Pims.Contacts /// /// When the cursor is already at the last position, it returns false. /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported + /// 4 public bool MoveNext() { int error = Interop.List.ContactsListNext(_listHandle); @@ -231,6 +251,9 @@ namespace Tizen.Pims.Contacts /// /// Moves a contacts list to the first position. /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported + /// 4 public void MoveFirst() { int error = Interop.List.ContactsListFirst(_listHandle); @@ -244,6 +267,9 @@ namespace Tizen.Pims.Contacts /// /// Moves a contacts list to the last position. /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported + /// 4 public void MoveLast() { int error = Interop.List.ContactsListLast(_listHandle); diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsManager.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsManager.cs index 903c86f..517988d 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsManager.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsManager.cs @@ -22,6 +22,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for name display order. /// + /// 4 public enum ContactDisplayOrder { /// @@ -37,6 +38,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for name sorting order. /// + /// 4 public enum ContactSortingOrder { /// @@ -52,6 +54,7 @@ namespace Tizen.Pims.Contacts /// /// A class for managing contact information. It allows applications to access contacts database. /// + /// 4 public class ContactsManager : IDisposable { private ContactsDatabase _db = null; @@ -62,7 +65,10 @@ namespace Tizen.Pims.Contacts /// /// Creates a ContactsManager. /// + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation + /// Thrown when feature is not supported + /// 4 public ContactsManager() { int error = Interop.Service.Connect(); @@ -77,6 +83,7 @@ namespace Tizen.Pims.Contacts /// /// Destructor /// + /// 4 ~ContactsManager() { Dispose(false); @@ -89,6 +96,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsManager. /// /// Disposing by User + /// 4 protected virtual void Dispose(bool disposing) { if (disposing) @@ -114,6 +122,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsManager. /// It should be called after finished using of the object. /// + /// 4 public void Dispose() { Dispose(true); @@ -128,6 +137,7 @@ namespace Tizen.Pims.Contacts /// (event) NameDisplayOrderChanged is raised when changing setting value of contacts name display order /// /// http://tizen.org/privilege/contact.read + /// 4 public event EventHandler NameDisplayOrderChanged { add @@ -178,6 +188,7 @@ namespace Tizen.Pims.Contacts /// (event) NameSortingOrderChanged is raised when changing setting value of contacts name sorting order /// /// http://tizen.org/privilege/contact.read + /// 4 public event EventHandler NameSortingOrderChanged { add @@ -228,6 +239,7 @@ namespace Tizen.Pims.Contacts /// A ContactsDatabase /// /// A ContactsDatabase + /// 4 public ContactsDatabase Database { get @@ -245,6 +257,7 @@ namespace Tizen.Pims.Contacts /// /// http://tizen.org/privilege/contact.read /// http://tizen.org/privilege/contact.write + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public ContactDisplayOrder NameDisplayOrder { @@ -277,6 +290,7 @@ namespace Tizen.Pims.Contacts /// /// http://tizen.org/privilege/contact.read /// http://tizen.org/privilege/contact.write + /// 4 [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public ContactSortingOrder NameSortingOrder { diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs index 4bb4efd..4676a9d 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs @@ -26,6 +26,7 @@ namespace Tizen.Pims.Contacts /// A query is used to retrieve person, group, speed dial, and log data which satisfies a given criteria, such as an integer property being greater than a given value, or a string property containing a given substring. /// A query needs a filter which can set the conditions for the search. /// + /// 4 public class ContactsQuery : IDisposable { internal IntPtr _queryHandle; @@ -34,9 +35,11 @@ namespace Tizen.Pims.Contacts /// Creates a query. /// /// The view URI of a query - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsQuery(string viewUri) { @@ -56,6 +59,7 @@ namespace Tizen.Pims.Contacts /// /// Destructor /// + /// 4 ~ContactsQuery() { Dispose(false); @@ -67,6 +71,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsQuery. /// /// Disposing by User + /// 4 protected virtual void Dispose(bool disposing) { if (disposing) @@ -92,6 +97,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsQuery. /// It should be called after finished using of the object. /// + /// 4 public void Dispose() { Dispose(true); @@ -103,7 +109,10 @@ namespace Tizen.Pims.Contacts /// Adds property IDs for projection. /// /// The property ID array + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void SetProjection(uint[] propertyIdArray) { if (propertyIdArray == null) @@ -123,6 +132,9 @@ namespace Tizen.Pims.Contacts /// Sets the "distinct" option for projection. /// /// If true it is set, otherwise if false it is unset + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported + /// 4 public void SetDistinct(bool set) { int error = Interop.Query.ContactsQuerySetDistinct(_queryHandle, set); @@ -137,7 +149,10 @@ namespace Tizen.Pims.Contacts /// Sets the filter for a query. /// /// The filter + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void SetFilter(ContactsFilter filter) { int error = Interop.Query.ContactsQuerySetFilter(_queryHandle, filter._filterHandle); @@ -153,7 +168,10 @@ namespace Tizen.Pims.Contacts /// /// The property ID to sort /// If true it sorts in the ascending order, otherwise if false it sorts in the descending order + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void SetSort(uint propertyId, bool isAscending) { int error = Interop.Query.ContactsQuerySetSort(_queryHandle, propertyId, isAscending); diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsRecord.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsRecord.cs index 47dd62b..464cad3 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsRecord.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsRecord.cs @@ -28,6 +28,7 @@ namespace Tizen.Pims.Contacts /// A record can be a complex set of data, containing other data. For example, a contact record contains the address property, which is a reference to an address record. /// An address record belongs to a contact record, and its ContactId property is set to the identifier of the corresponding contact. In this case, the address is the child record of the contact and the contact is the parent record. /// + /// 4 public class ContactsRecord : IDisposable { private string _uri = null; @@ -85,9 +86,11 @@ namespace Tizen.Pims.Contacts /// Creates a record. /// /// The view URI - /// Thrown when an invoked method is not supported + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// 4 [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public ContactsRecord(string viewUri) { @@ -104,6 +107,7 @@ namespace Tizen.Pims.Contacts /// /// Destructor /// + /// 4 ~ContactsRecord() { Dispose(false); @@ -113,6 +117,7 @@ namespace Tizen.Pims.Contacts /// The URI of the record /// /// The URI of the record + /// 4 [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] public string Uri { @@ -129,6 +134,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsRecord. /// /// Disposing by User + /// 4 protected virtual void Dispose(bool disposing) { if (disposing) @@ -154,6 +160,7 @@ namespace Tizen.Pims.Contacts /// Releases all resources used by the ContactsRecord. /// It should be called after finished using of the object. /// + /// 4 public void Dispose() { Dispose(true); @@ -165,7 +172,10 @@ namespace Tizen.Pims.Contacts /// Makes a clone of a record. /// /// A cloned record + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when failed due to out of memory + /// 4 public ContactsRecord Clone() { IntPtr _clonedRecordHandle; @@ -185,7 +195,10 @@ namespace Tizen.Pims.Contacts /// /// The value of the property corresponding to property id. /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public T Get(uint propertyId) { object parsedValue = null; @@ -255,9 +268,12 @@ namespace Tizen.Pims.Contacts /// /// Sets a value of the property to a record. /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// The property ID /// The value to set /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void Set(uint propertyId, T value) { if (typeof(T) == typeof(string)) @@ -322,7 +338,10 @@ namespace Tizen.Pims.Contacts /// /// The property ID /// The child record to add to parent record + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void AddChildRecord(uint propertyId, ContactsRecord childRecord) { int error = Interop.Record.AddChildRecord(_recordHandle, propertyId, childRecord._recordHandle); @@ -339,7 +358,10 @@ namespace Tizen.Pims.Contacts /// /// The property ID /// The child record to remove from parent record + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public void RemoveChildRecord(uint propertyId, ContactsRecord childRecord) { int error = Interop.Record.RemoveChildRecord(_recordHandle, propertyId, childRecord._recordHandle); @@ -356,7 +378,10 @@ namespace Tizen.Pims.Contacts /// /// The property ID /// The number of child records corresponding to property ID + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public int GetChildRecordCount(uint propertyId) { int count = 0; @@ -375,7 +400,10 @@ namespace Tizen.Pims.Contacts /// The property ID /// The index of child record /// The record + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public ContactsRecord GetChildRecord(uint propertyId, int index) { IntPtr handle; @@ -396,7 +424,10 @@ namespace Tizen.Pims.Contacts /// /// The record list /// + /// http://tizen.org/feature/contact + /// Thrown when feature is not supported /// Thrown when one of the arguments provided to a method is not valid + /// 4 public ContactsList CloneChildRecordList(uint propertyId) { IntPtr listHandle; diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsVcard.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsVcard.cs index 8a7b7c0..4ea6ff0 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsVcard.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsVcard.cs @@ -25,6 +25,7 @@ namespace Tizen.Pims.Contacts /// /// The contacts record /// true to continue with the next iteration of the loop, otherwise false to break out of the loop + /// 4 public delegate bool ParseCallback(ContactsRecord record); /// @@ -33,6 +34,7 @@ namespace Tizen.Pims.Contacts /// /// It's based on the vCard v3.0 specification /// + /// 4 public static class ContactsVcard { /// @@ -43,8 +45,11 @@ namespace Tizen.Pims.Contacts /// The vCard stream. /// /// http://tizen.org/privilege/contact.read + /// http://tizen.org/feature/contact /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// Thrown when feature is not supported + /// 4 public static string Compose(ContactsRecord record) { int error = 0; @@ -83,8 +88,11 @@ namespace Tizen.Pims.Contacts /// /// The contacts list /// + /// http://tizen.org/feature/contact /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// Thrown when feature is not supported + /// 4 public static ContactsList Parse(string stream) { IntPtr listHandle; @@ -104,9 +112,12 @@ namespace Tizen.Pims.Contacts /// /// The file path of vCard stream file /// The callback function to invoke + /// http://tizen.org/feature/contact /// Thrown when method failed due to invalid operation /// Thrown when one of the arguments provided to a method is not valid /// Thrown when failed due to out of memory + /// Thrown when feature is not supported + /// 4 public static void ParseForEach(string path, ParseCallback callback) { Interop.Vcard.ContactsVcardParseCallback cb = (IntPtr handle, IntPtr data) => diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsViews.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsViews.cs index 0620b5a..b3fd512 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsViews.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsViews.cs @@ -29,6 +29,7 @@ namespace Tizen.Pims.Contacts /// A "record" represents a single row of the views. /// A record can have basic properties of five types: integer, string, boolean, long, double. /// + /// 4 namespace ContactsViews { internal static class Property @@ -363,12 +364,12 @@ namespace Tizen.Pims.Contacts PhonelogNormalizedAddress = (Phonelog | DataTypeString | ReadOnly) + 7, PhonelogCleanedAddress = (Phonelog | DataTypeString | ReadOnly) + 8, PhonelogAddressFilter = (Phonelog | DataTypeString | ReadOnly) + 9, - PhonelogSIMSlotNo = (Phonelog | DataTypeInt) + 10, + PhonelogSimSlotNo = (Phonelog | DataTypeInt) + 10, /* phonelog_stat */ PhonelogStatLogCount = (PhonelogStat | DataTypeInt | ReadOnly), PhonelogStatLogType = (PhonelogStat | DataTypeInt | ReadOnly) + 1, - PhonelogStatSIMSlotNo = (PhonelogStat | DataTypeInt | ReadOnly) + 2, + PhonelogStatSimSlotNo = (PhonelogStat | DataTypeInt | ReadOnly) + 2, /* updated_info : read only */ UpdateInfoId = (UpdateInfo | DataTypeInt), @@ -388,6 +389,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for contact change state. /// + /// 4 public enum ChangeType { /// @@ -407,6 +409,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Address book record. /// + /// 4 public static class AddressBook { /// @@ -433,6 +436,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Address book mode. /// + /// 4 public enum ModeValue { /// @@ -449,6 +453,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Group record. /// + /// 4 public static class Group { /// @@ -496,6 +501,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Person record. /// + /// 4 public static class Person { /// @@ -575,6 +581,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Contact record. /// + /// 4 public static class Contact { /// @@ -709,6 +716,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for link mode when inserting contact. /// + /// 4 public enum LinkModeValue { /// @@ -724,6 +732,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact display name source type. /// + /// 4 public enum DisplayNameSourceType { /// @@ -755,6 +764,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for contacts data type. /// + /// 4 public enum DataType { /// @@ -827,6 +837,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Simple contact record. /// + /// 4 public static class SimpleContact { /// @@ -894,6 +905,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a My profile record. /// + /// 4 public static class MyProfile { /// @@ -989,6 +1001,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Name record. /// + /// 4 public static class Name { /// @@ -1040,6 +1053,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Number record. /// + /// 4 public static class Number { /// @@ -1086,6 +1100,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for number type. /// + /// 4 [Flags] public enum Types { @@ -1171,6 +1186,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Email record. /// + /// 4 public static class Email { /// @@ -1205,6 +1221,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact email type. /// + /// 4 [Flags] public enum Types { @@ -1234,6 +1251,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Address record. /// + /// 4 public static class Address { /// @@ -1292,6 +1310,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact address type. /// + /// 4 [Flags] public enum Types { @@ -1333,6 +1352,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Note record. /// + /// 4 public static class Note { /// @@ -1356,6 +1376,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a URL record. /// + /// 4 public static class URL { /// @@ -1386,6 +1407,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact URL type. /// + /// 4 public enum TypeValue { /// @@ -1410,6 +1432,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Event record. /// + /// 4 [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords")] public static class Event { @@ -1445,6 +1468,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact event type. /// + /// 4 public enum TypeValue { /// @@ -1468,6 +1492,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact event calendar type. /// + /// 4 public enum CalendarType { /// @@ -1484,6 +1509,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Relationship record. /// + /// 4 public static class Relationship { /// @@ -1514,6 +1540,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact relationship type. /// + /// 4 public enum TypeValue { /// @@ -1586,6 +1613,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Image record. /// + /// 4 public static class Image { /// @@ -1620,6 +1648,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact image type. /// + /// 4 public enum TypeValue { /// @@ -1636,6 +1665,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Company record. /// + /// 4 public static class Company { /// @@ -1698,6 +1728,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact company type. /// + /// 4 public enum TypeValue { /// @@ -1718,6 +1749,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Nickname record. /// + /// 4 public static class Nickname { /// @@ -1741,6 +1773,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Messenger record. /// + /// 4 public static class Messenger { /// @@ -1771,6 +1804,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact messenger type. /// + /// 4 public enum TypeValue { /// @@ -1827,6 +1861,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Profile record. /// + /// 4 [SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces")] public static class Profile { @@ -1883,6 +1918,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Sip record. /// + /// 4 public static class Sip { /// @@ -1913,6 +1949,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Contact SIP type. /// + /// 4 public enum TypeValue { /// @@ -1937,6 +1974,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Extension record. /// + /// 4 public static class Extension { /// @@ -2004,6 +2042,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Group relation record. /// + /// 4 public static class GroupRelation { /// @@ -2031,6 +2070,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Speed dial record. /// + /// 4 public static class SpeedDial { /// @@ -2086,6 +2126,7 @@ namespace Tizen.Pims.Contacts /// /// Describes properties of a Phone log record. /// + /// 4 public static class PhoneLog { /// @@ -2133,13 +2174,14 @@ namespace Tizen.Pims.Contacts /// public const uint AddressFilter = (uint)Property.Id.PhonelogAddressFilter; /// - /// You can set the related SIM slot number. SimSlotNo 0 means first SIM card, SimSlotNo 1 means second SIM. + /// You can set the related Sim slot number. SimSlotNo 0 means first Sim card, SimSlotNo 1 means second Sim. /// - public const uint SimSlotNo = (uint)Property.Id.PhonelogSIMSlotNo; + public const uint SimSlotNo = (uint)Property.Id.PhonelogSimSlotNo; /// /// Enumeration for Phone log type. /// + /// 4 public enum Type { /// @@ -2234,6 +2276,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a Contact updated information record. /// /// Read only view + /// 4 public static class ContactUpdatedInfo { /// @@ -2266,6 +2309,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a My profile updated information record. /// /// Read only view + /// 4 public static class MyProfileUpdatedInfo { /// @@ -2290,6 +2334,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a Group updated information record. /// /// Read only view + /// 4 public static class GroupUpdatedInfo { /// @@ -2318,6 +2363,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a Group Member updated information record. /// /// Read only view + /// 4 public static class GroupMemberUpdatedInfo { /// @@ -2342,6 +2388,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a Relation updated information record. /// /// Read only view + /// 4 public static class GroupRelationUpdatedInfo { /// @@ -2374,6 +2421,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a PersonContact record. /// /// Read only view + /// 4 public static class PersonContact { /// @@ -2466,6 +2514,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a PersonNumber record. /// /// Read only view + /// 4 public static class PersonNumber { /// @@ -2562,6 +2611,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a PersonEmail record. /// /// Read only view + /// 4 public static class PersonEmail { /// @@ -2646,6 +2696,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a PersonGroupRelation record. /// /// Read only view + /// 4 public static class PersonGroupRelation { /// @@ -2739,9 +2790,10 @@ namespace Tizen.Pims.Contacts }; /// - /// Describes properties of a PersonGroupAssignedrecord. + /// Describes properties of a PersonGroupAssigned record. /// /// Read only view + /// 4 public static class PersonGroupAssigned { /// @@ -2834,6 +2886,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a PersonGroupNotAssigned record. /// /// Read only view + /// 4 public static class PersonGroupNotAssigned { /// @@ -2922,6 +2975,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a PersonPhoneLog record. /// /// Read only view + /// 4 public static class PersonPhoneLog { /// @@ -2981,15 +3035,16 @@ namespace Tizen.Pims.Contacts /// public const uint AddressFilter = (uint)Property.Id.PhonelogAddressFilter; /// - /// It is related to the SIM slot number. SimSlotNo 0 means first SIM card, SimSlotNo 1 means second SIM. + /// It is related to the Sim slot number. SimSlotNo 0 means first Sim card, SimSlotNo 1 means second Sim. /// - public const uint SIMSlotNo = (uint)Property.Id.PhonelogSIMSlotNo; + public const uint SimSlotNo = (uint)Property.Id.PhonelogSimSlotNo; }; /// /// Describes properties of a Person Usage record. /// /// Read only view + /// 4 public static class PersonUsage { /// @@ -3052,6 +3107,7 @@ namespace Tizen.Pims.Contacts /// /// Enumeration for Person usage type. /// + /// 4 public enum Type { /// @@ -3105,6 +3161,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a ContactNumber record. /// /// Read only view + /// 4 public static class ContactNumber { /// @@ -3177,6 +3234,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a ContactEmail record. /// /// Read only view + /// 4 public static class ContactEmail { /// @@ -3237,6 +3295,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a ContactGroupRelation record. /// /// Read only view + /// 4 public static class ContactGroupRelation { /// @@ -3285,6 +3344,7 @@ namespace Tizen.Pims.Contacts /// Describes properties of a Phone Log Statistics record. /// /// Read only view + /// 4 public static class PhoneLogStatistics { /// @@ -3300,9 +3360,9 @@ namespace Tizen.Pims.Contacts /// public const uint LogType = (uint)Property.Id.PhonelogStatLogType; /// - /// It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init() + /// It is related to the Sim slot number. sim_slot_no 0 means first Sim card, sim_slot_no 1 means second Sim. It is same with handle index of telephony handle list. Refer to the telephony_init() /// - public const uint SIMSlotNo = (uint)Property.Id.PhonelogStatSIMSlotNo; + public const uint SimSlotNo = (uint)Property.Id.PhonelogStatSimSlotNo; }; } } diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs index 591c4a0..7aeb146 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs @@ -21,6 +21,7 @@ namespace Tizen.Pims.Contacts /// /// Event arguments passed when contacts database is changed /// + /// 4 public class DBChangedEventArgs : EventArgs { internal DBChangedEventArgs(string viewUri) @@ -31,6 +32,7 @@ namespace Tizen.Pims.Contacts /// /// The contacts view URI changed. /// + /// 4 public string ViewUri { get; diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBStatusChangedEventArgs.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBStatusChangedEventArgs.cs index ca1a79b..0eb9611 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBStatusChangedEventArgs.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBStatusChangedEventArgs.cs @@ -22,6 +22,7 @@ namespace Tizen.Pims.Contacts /// /// Event arguments passed when contacts database status is changed /// + /// 4 public class DBStatusChangedEventArgs : EventArgs { internal DBStatusChangedEventArgs(DBStatus status) @@ -32,6 +33,7 @@ namespace Tizen.Pims.Contacts /// /// The contacts database status. /// + /// 4 public DBStatus Status { get; diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameDisplayOrderChangedEventArgs.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameDisplayOrderChangedEventArgs.cs index 228318c..bb2abf4 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameDisplayOrderChangedEventArgs.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameDisplayOrderChangedEventArgs.cs @@ -21,6 +21,7 @@ namespace Tizen.Pims.Contacts /// /// Event arguments passed when setting value of contacts name display order is changed /// + /// 4 public class NameDisplayOrderChangedEventArgs : EventArgs { internal NameDisplayOrderChangedEventArgs(ContactDisplayOrder displayOrder) @@ -31,6 +32,7 @@ namespace Tizen.Pims.Contacts /// /// A setting value of contacts name display order /// + /// 4 public ContactDisplayOrder NameDisplayOrder { get; diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameSortingOrderChangedEventArgs.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameSortingOrderChangedEventArgs.cs index 152ef0b..eda3bf0 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameSortingOrderChangedEventArgs.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameSortingOrderChangedEventArgs.cs @@ -21,6 +21,7 @@ namespace Tizen.Pims.Contacts /// /// Event arguments passed when setting value of contacts name sorting order is changed /// + /// 4 public class NameSortingOrderChangedEventArgs : EventArgs { internal NameSortingOrderChangedEventArgs(ContactSortingOrder SortingOrder) @@ -31,6 +32,7 @@ namespace Tizen.Pims.Contacts /// /// A setting value of contacts name sorting order /// + /// 4 public ContactSortingOrder NameSortingOrder { get; diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NamespaceDoc.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NamespaceDoc.cs index 487113c..91a3ded 100644 --- a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NamespaceDoc.cs +++ b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NamespaceDoc.cs @@ -20,4 +20,5 @@ /// /// The Tizen.Pims.Contacts namespace provides classes for managing contact information for people. /// +/// 4 namespace Tizen.Pims.Contacts {} diff --git a/src/Tizen.System.Information/Common/Information.cs b/src/Tizen.System.Information/Common/Information.cs old mode 100755 new mode 100644 index 5ec9dc0..06ddf37 --- a/src/Tizen.System.Information/Common/Information.cs +++ b/src/Tizen.System.Information/Common/Information.cs @@ -16,8 +16,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.IO; namespace Tizen.System { @@ -81,7 +79,6 @@ namespace Tizen.System [RuntimeInfoKey.AudioJackConnector] = RuntimeInfoStringKeyAudioJackType }; - [EditorBrowsable(EditorBrowsableState.Never)] private static bool ConvertStringToRuntimeInfoKey(string key, out RuntimeInfoKey feature) { string filteredKey = key.StartsWith(HttpPrefix) ? key.Substring(HttpPrefix.Length) : key; @@ -90,7 +87,6 @@ namespace Tizen.System return StringEnumMapping.TryGetValue(filteredKey, out feature); } - [EditorBrowsable(EditorBrowsableState.Never)] private static bool TryGetRuntimeInfoValue(RuntimeInfoKey key, out T value) { value = default(T); @@ -104,7 +100,7 @@ namespace Tizen.System return RuntimeInfo.TryGetValue(key, out value); } - [EditorBrowsable(EditorBrowsableState.Never)] +#pragma warning disable CS0618 // Type or member is obsolete private static bool TryGetSystemInfoValue(string key, out T value) { value = default(T); @@ -123,6 +119,7 @@ namespace Tizen.System return SystemInfo.TryGetValue(key, out value); } +#pragma warning restore CS0618 // Type or member is obsolete /// /// Gets the value of the feature. diff --git a/src/Tizen.System.Information/Common/InformationErrorFactory.cs b/src/Tizen.System.Information/Common/InformationErrorFactory.cs old mode 100755 new mode 100644 index 906961d..e7ad717 --- a/src/Tizen.System.Information/Common/InformationErrorFactory.cs +++ b/src/Tizen.System.Information/Common/InformationErrorFactory.cs @@ -16,12 +16,10 @@ using System; using System.IO; -using System.ComponentModel; using Tizen.Internals.Errors; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal enum InformationError { None = ErrorCode.None, @@ -34,7 +32,6 @@ namespace Tizen.System NoData = ErrorCode.NoData } - [EditorBrowsable(EditorBrowsableState.Never)] internal static class InformationErrorFactory { internal const string LogTag = "Tizen.System.Information"; diff --git a/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs b/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs old mode 100755 new mode 100644 index ea0281d..dfab9f1 --- a/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs +++ b/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs @@ -14,11 +14,8 @@ * limitations under the License. */ -using System.ComponentModel; - namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] /// /// Enumeration for the runtime information key. /// diff --git a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs old mode 100755 new mode 100644 index 9ce011a..ba4a70a --- a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs +++ b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs @@ -16,12 +16,9 @@ using System; using System.Collections.Generic; -using System.IO; -using System.ComponentModel; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal static class RuntimeInfo { private static RuntimeInfoEventHandler BluetoothEnabled = new RuntimeInfoEventHandler(RuntimeInfoKey.Bluetooth); diff --git a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs old mode 100755 new mode 100644 index 733e0f1..973957d --- a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs +++ b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs @@ -15,11 +15,9 @@ */ using System; -using System.ComponentModel; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal class RuntimeInfoEventHandler { private RuntimeInfoKey Key; diff --git a/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs b/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs old mode 100755 new mode 100644 index df9e3a2..ef5f846 --- a/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs +++ b/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs @@ -16,11 +16,9 @@ using System; using System.Collections.Generic; -using System.ComponentModel; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal static class TvProductHelper { private static int is_TV_product = -1; @@ -52,7 +50,9 @@ namespace Tizen.System if (is_TV_product == -1) { +#pragma warning disable CS0618 // Type or member is obsolete is_key_existed = SystemInfo.TryGetValue("http://com.samsung/build_config/product_type", out profile); +#pragma warning restore CS0618 // Type or member is obsolete if (is_key_existed && String.Compare(profile, "TV") == 0) { is_TV_product = 1;