Release 4.0.0-preview1-00337 submit/tizen/20171024.150013
authorDotnetBuild <dotnetbuild.tizen@gmail.com>
Tue, 24 Oct 2017 15:00:12 +0000 (00:00 +0900)
committerDotnetBuild <dotnetbuild.tizen@gmail.com>
Tue, 24 Oct 2017 15:00:12 +0000 (00:00 +0900)
94 files changed:
packaging/csapi-tizenfx.spec
src/ElmSharp.Wearable/ElmSharp.Wearable.sln
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleDatetimeSelector.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleGenList.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleProgressBar.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleScroller.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSlider.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSpinner.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSurface.cs [new file with mode: 0644]
src/ElmSharp.Wearable/ElmSharp.Wearable/ICircleWidget.cs [new file with mode: 0644]
src/ElmSharp.Wearable/ElmSharp.Wearable/RotaryEventManager.cs
src/ElmSharp/ElmSharp/Container.cs
src/ElmSharp/ElmSharp/DateTimeSelector.cs
src/ElmSharp/ElmSharp/GenList.cs
src/ElmSharp/ElmSharp/ItemObject.cs
src/ElmSharp/ElmSharp/Layout.cs
src/ElmSharp/ElmSharp/Scroller.cs
src/ElmSharp/ElmSharp/Spinner.cs
src/ElmSharp/ElmSharp/Widget.cs
src/ElmSharp/Interop/Interop.Elementary.Item.cs
src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs
src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/MessagePort.cs
src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/RemotePort.cs
src/Tizen.Multimedia.MediaCodec/MediaCodec/MediaCodec.cs
src/Tizen.Multimedia.Remoting/ScreenMirroring/ScreenMirroringAudioInfo.cs
src/Tizen.Multimedia.Remoting/ScreenMirroring/ScreenMirroringVideoInfo.cs
src/Tizen.Multimedia.Util/ImageUtil/GifFrame.cs
src/Tizen.Multimedia.Util/ImageUtil/ImageDecoder.cs
src/Tizen.Multimedia.Util/ImageUtil/ImageTransform.cs
src/Tizen.Multimedia.Vision/MediaVision/BarcodeGenerator.cs
src/Tizen.Multimedia.Vision/MediaVision/BarcodeImageConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/EngineConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceDetectionConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceDetector.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceRecognitionConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceRecognitionModel.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceRecognizer.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceTracker.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceTrackingModel.cs
src/Tizen.Multimedia.Vision/MediaVision/FaceTrackingResult.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageFillConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageObject.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageRecognitionConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageRecognitionResult.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageRecognizer.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageTracker.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageTrackingConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/ImageTrackingModel.cs
src/Tizen.Multimedia.Vision/MediaVision/MediaVisionSource.cs
src/Tizen.Multimedia.Vision/MediaVision/MovementDetectionConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/MovementDetector.cs
src/Tizen.Multimedia.Vision/MediaVision/PersonAppearanceDetectionConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/PersonAppearanceDetector.cs
src/Tizen.Multimedia.Vision/MediaVision/PersonRecognitionConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/PersonRecognizer.cs
src/Tizen.Multimedia.Vision/MediaVision/QrConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/QrMode.cs
src/Tizen.Multimedia.Vision/MediaVision/Quadrangle.cs
src/Tizen.Multimedia.Vision/MediaVision/SurveillanceConfiguration.cs
src/Tizen.Multimedia.Vision/MediaVision/SurveillanceEngine.cs
src/Tizen.Multimedia.Vision/MediaVision/SurveillanceSource.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/Attributes.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityClientManager.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityServerManager.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/LiteResource.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/Representation.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/Resource.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceInterfaces.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceOptions.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceQuery.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceTypes.cs
src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/Response.cs
src/Tizen.System.Feedback/Feedback/Feedback.cs [changed mode: 0644->0755]
src/Tizen.System.Usb/Interop/Interop.Configuration.cs
src/Tizen.System.Usb/Interop/Interop.Context.cs
src/Tizen.System.Usb/Interop/Interop.Device.cs
src/Tizen.System.Usb/Interop/Interop.Endpoint.cs
src/Tizen.System.Usb/Interop/Interop.ErrorCode.cs
src/Tizen.System.Usb/Interop/Interop.Interface.cs
src/Tizen.System.Usb/Usb/UsbDevice.cs
src/Tizen.System.Usb/Usb/UsbInterface.cs
src/Tizen.System.Usb/Usb/UsbManager.cs
src/Tizen.System/Device/Battery.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Display.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Haptic.cs [changed mode: 0644->0755]
src/Tizen.System/Device/IR.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Led.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Power.cs [changed mode: 0644->0755]
src/Tizen/Interop/Interop.CommonError.cs
src/Tizen/Interop/Interop.DotnetUtil.cs [new file with mode: 0644]
src/Tizen/Interop/Interop.Libraries.cs [new file with mode: 0644]
src/Tizen/Tizen.Common/DotnetUtil.cs [new file with mode: 0644]
src/Tizen/Tizen.Common/DotnetUtilErrorFactory.cs [new file with mode: 0644]
src/Tizen/Tizen.csproj

index a785368..a57285a 100644 (file)
@@ -9,7 +9,7 @@
 
 Name:       csapi-tizenfx
 Summary:    Assemblies of Tizen .NET
-Version:    4.0.0.332
+Version:    4.0.0.337
 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-00332
+./build.sh --pack 4.0.0-preview1-00337
 
 %install
 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
index dbf2ebd..95835a9 100644 (file)
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.26730.8
+VisualStudioVersion = 15.0.26730.10
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp.Wearable", "ElmSharp.Wearable.csproj", "{01AE2E3A-C08E-431C-97B3-A18D536FCD52}"
 EndProject
@@ -11,6 +11,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp.Test", "..\..\test
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp.Wearable.Test", "..\..\test\ElmSharp.Wearable.Test\ElmSharp.Wearable.Test.csproj", "{DC7126DF-8ED8-448A-B7D8-15C7441B6929}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Common", "..\Tizen.Applications.Common\Tizen.Applications.Common.csproj", "{EC21B79B-8EC3-4324-B8B0-F541D37FA0C7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.UI", "..\Tizen.Applications.UI\Tizen.Applications.UI.csproj", "{21EEB0B3-BCE2-4BF7-A826-F62F3E97A42F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\Tizen.Log\Tizen.Log.csproj", "{E26744AF-0991-410E-8AD8-81AD65749036}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\Tizen\Tizen.csproj", "{1E463DAD-F3CA-47B7-8D02-C53873D8D0F2}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -33,6 +41,22 @@ Global
                {DC7126DF-8ED8-448A-B7D8-15C7441B6929}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {DC7126DF-8ED8-448A-B7D8-15C7441B6929}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {DC7126DF-8ED8-448A-B7D8-15C7441B6929}.Release|Any CPU.Build.0 = Release|Any CPU
+               {EC21B79B-8EC3-4324-B8B0-F541D37FA0C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {EC21B79B-8EC3-4324-B8B0-F541D37FA0C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {EC21B79B-8EC3-4324-B8B0-F541D37FA0C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {EC21B79B-8EC3-4324-B8B0-F541D37FA0C7}.Release|Any CPU.Build.0 = Release|Any CPU
+               {21EEB0B3-BCE2-4BF7-A826-F62F3E97A42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {21EEB0B3-BCE2-4BF7-A826-F62F3E97A42F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {21EEB0B3-BCE2-4BF7-A826-F62F3E97A42F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {21EEB0B3-BCE2-4BF7-A826-F62F3E97A42F}.Release|Any CPU.Build.0 = Release|Any CPU
+               {E26744AF-0991-410E-8AD8-81AD65749036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {E26744AF-0991-410E-8AD8-81AD65749036}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {E26744AF-0991-410E-8AD8-81AD65749036}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {E26744AF-0991-410E-8AD8-81AD65749036}.Release|Any CPU.Build.0 = Release|Any CPU
+               {1E463DAD-F3CA-47B7-8D02-C53873D8D0F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {1E463DAD-F3CA-47B7-8D02-C53873D8D0F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {1E463DAD-F3CA-47B7-8D02-C53873D8D0F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {1E463DAD-F3CA-47B7-8D02-C53873D8D0F2}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 6623984..851b135 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
@@ -22,28 +23,45 @@ namespace ElmSharp.Wearable
     /// The Circle DateTime Selector is a widget to display and handle datetime value by rotary event
     /// Inherits <see cref="DateTimeSelector"/>
     /// </summary>
-    public class CircleDateTimeSelector : DateTimeSelector
+    public class CircleDateTimeSelector : DateTimeSelector, IRotaryActionWidget
     {
-        IntPtr circleHandle;
+        IntPtr _circleHandle;
+        CircleSurface _surface;
 
         /// <summary>
         /// Creates and initializes a new instance of the Circle DateTime class
         /// </summary>
         /// <param name="parent">The parent of new Circle DateTime instance</param>
-        public CircleDateTimeSelector(EvasObject parent) : base(parent) { }
+        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        public CircleDateTimeSelector(EvasObject parent, CircleSurface surface) : base()
+        {
+            Debug.Assert(parent == null || surface == null || parent.IsRealized);
+            _surface = surface;
+            Realize(parent);
+        }
+
+        /// <summary>
+        /// Gets the handle for Circle Widget.
+        /// </summary>
+        public virtual IntPtr CircleHandle => _circleHandle;
 
         /// <summary>
-        /// Sets or gets the disabled state of the Circle DateTime Selector
+        /// Gets the handle for Circle Surface used in this widget
         /// </summary>
-        public bool Disabled
+        public virtual CircleSurface CircleSurface => _surface;
+
+        /// <summary>
+        /// Sets or gets the state of the widget, which might be enabled or disabled.
+        /// </summary>
+        public override bool IsEnabled
         {
             get
             {
-                return Interop.Eext.eext_circle_object_disabled_get(circleHandle);
+                return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_disabled_set(circleHandle, value);
+                Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
             }
         }
 
@@ -55,12 +73,12 @@ namespace ElmSharp.Wearable
             get
             {
                 int r, g, b, a;
-                Interop.Eext.eext_circle_object_item_color_get(circleHandle, "default", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "default", out r, out g, out b, out a);
                 return new Color(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(circleHandle, "default", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "default", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -71,11 +89,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(circleHandle, "default");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "default");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(circleHandle, "default", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "default", value);
             }
         }
 
@@ -86,11 +104,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(circleHandle, "default");
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "default");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(circleHandle, "default", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "default", value);
             }
         }
 
@@ -103,35 +121,7 @@ namespace ElmSharp.Wearable
         {
             var handle = base.CreateHandle(parent);
 
-            IntPtr surface = IntPtr.Zero;
-
-            if (parent is Conformant)
-            {
-                surface = Interop.Eext.eext_circle_surface_conformant_add(parent);
-            }
-            else if (parent is Naviframe)
-            {
-                surface = Interop.Eext.eext_circle_surface_naviframe_add(parent.RealHandle);
-            }
-            else if (parent is Layout)
-            {
-                surface = Interop.Eext.eext_circle_surface_layout_add(parent);
-            }
-
-            circleHandle = Interop.Eext.eext_circle_object_datetime_add(RealHandle, surface);
-            if (surface == IntPtr.Zero)
-            {
-                EvasObject p = parent;
-                while (!(p is Window))
-                {
-                    p = p.Parent;
-                }
-                var w = (p as Window).ScreenSize.Width;
-                var h = (p as Window).ScreenSize.Height;
-                Interop.Evas.evas_object_resize(circleHandle, w, h);
-            }
-
-            Interop.Eext.eext_rotary_object_event_activated_set(circleHandle, true);
+            _circleHandle = Interop.Eext.eext_circle_object_datetime_add(RealHandle == IntPtr.Zero ? Handle : RealHandle , CircleSurface.Handle);
 
             return handle;
         }
index d5c31e3..1de98bd 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
@@ -22,28 +23,45 @@ namespace ElmSharp.Wearable
     /// The Circle GenList Selector is a widget to display and handle genlist items by rotary event
     /// Inherits <see cref="GenList"/>
     /// </summary>
-    public class CircleGenList : GenList
+    public class CircleGenList : GenList, IRotaryActionWidget
     {
-        IntPtr circleHandle;
+        IntPtr _circleHandle;
+        CircleSurface _surface;
 
         /// <summary>
         /// Creates and initializes a new instance of the Circle GenList class
         /// </summary>
         /// <param name="parent">The parent of new Circle GenList instance</param>
-        public CircleGenList(EvasObject parent) : base(parent) { }
+        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        public CircleGenList(EvasObject parent, CircleSurface surface) : base()
+        {
+            Debug.Assert(parent == null || surface == null || parent.IsRealized);
+            _surface = surface;
+            Realize(parent);
+        }
+
+        /// <summary>
+        /// Gets the handle for Circle Widget.
+        /// </summary>
+        public virtual IntPtr CircleHandle => _circleHandle;
 
         /// <summary>
-        /// Sets or gets the disabled state of the Circle GenList Selector
+        /// Gets the handle for Circle Surface used in this widget
         /// </summary>
-        public bool Disabled
+        public virtual CircleSurface CircleSurface => _surface;
+
+        /// <summary>
+        /// Sets or gets the state of the widget, which might be enabled or disabled.
+        /// </summary>
+        public override bool IsEnabled
         {
             get
             {
-                return Interop.Eext.eext_circle_object_disabled_get(circleHandle);
+                return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_disabled_set(circleHandle, value);
+                Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
             }
         }
 
@@ -55,12 +73,12 @@ namespace ElmSharp.Wearable
             get
             {
                 int r, g, b, a;
-                Interop.Eext.eext_circle_object_item_color_get(circleHandle, "vertical,scroll,bg", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "vertical,scroll,bg", out r, out g, out b, out a);
                 return new Color(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(circleHandle, "vertical,scroll,bg", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "vertical,scroll,bg", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -71,11 +89,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(circleHandle, "vertical,scroll,bg");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "vertical,scroll,bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(circleHandle, "vertical,scroll,bg", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "vertical,scroll,bg", value);
             }
         }
 
@@ -86,11 +104,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(circleHandle, "vertical,scroll,bg");
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "vertical,scroll,bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(circleHandle, "vertical,scroll,bg", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "vertical,scroll,bg", value);
             }
         }
 
@@ -102,12 +120,12 @@ namespace ElmSharp.Wearable
             get
             {
                 int r, g, b, a;
-                Interop.Eext.eext_circle_object_item_color_get(circleHandle, "default", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "default", out r, out g, out b, out a);
                 return new Color(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(circleHandle, "default", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "default", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -118,11 +136,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(circleHandle, "default");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "default");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(circleHandle, "default", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "default", value);
             }
         }
 
@@ -133,11 +151,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(circleHandle, "default");
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "default");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(circleHandle, "default", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "default", value);
             }
         }
 
@@ -153,14 +171,14 @@ namespace ElmSharp.Wearable
             get
             {
                 int policy;
-                Interop.Eext.eext_circle_object_genlist_scroller_policy_get(circleHandle, IntPtr.Zero, out policy);
+                Interop.Eext.eext_circle_object_genlist_scroller_policy_get(CircleHandle, IntPtr.Zero, out policy);
                 return (ScrollBarVisiblePolicy)policy;
             }
             set
             {
                 int h;
-                Interop.Eext.eext_circle_object_genlist_scroller_policy_get(circleHandle, out h, IntPtr.Zero);
-                Interop.Eext.eext_circle_object_genlist_scroller_policy_set(circleHandle, (int)h, (int)value);
+                Interop.Eext.eext_circle_object_genlist_scroller_policy_get(CircleHandle, out h, IntPtr.Zero);
+                Interop.Eext.eext_circle_object_genlist_scroller_policy_set(CircleHandle, (int)h, (int)value);
             }
         }
 
@@ -172,36 +190,7 @@ namespace ElmSharp.Wearable
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             var handle = base.CreateHandle(parent);
-
-            IntPtr surface = IntPtr.Zero;
-
-            if (parent is Conformant)
-            {
-                surface = Interop.Eext.eext_circle_surface_conformant_add(parent);
-            }
-            else if (parent is Naviframe)
-            {
-                surface = Interop.Eext.eext_circle_surface_naviframe_add(parent.RealHandle);
-            }
-            else if (parent is Layout)
-            {
-                surface = Interop.Eext.eext_circle_surface_layout_add(parent);
-            }
-
-            circleHandle = Interop.Eext.eext_circle_object_genlist_add(RealHandle, surface);
-            if (surface == IntPtr.Zero)
-            {
-                EvasObject p = parent;
-                while(!(p is Window))
-                {
-                    p = p.Parent;
-                }
-                var w = (p as Window).ScreenSize.Width;
-                var h = (p as Window).ScreenSize.Height;
-                Interop.Evas.evas_object_resize(circleHandle, w, h);
-            }
-
-            Interop.Eext.eext_rotary_object_event_activated_set(circleHandle, true);
+            _circleHandle = Interop.Eext.eext_circle_object_genlist_add(RealHandle == IntPtr.Zero ? Handle : RealHandle, CircleSurface.Handle);
 
             return handle;
         }
index bd6a98b..f4d7cbf 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
@@ -22,16 +23,46 @@ namespace ElmSharp.Wearable
     /// <summary>
     /// The Circle ProgressBar is a widget for visually representing the progress status of a given job/task with the circular design.
     /// </summary>
-    public class CircleProgressBar : EvasObject
+    public class CircleProgressBar : Widget, ICircleWidget
     {
+        CircleSurface _surface;
+
         /// <summary>
         /// Creates and initializes a new instance of the Circle Progressbar class.
         /// </summary>
         /// <param name="parent">The parent of new Circle Progressbar instance</param>
-        public CircleProgressBar(EvasObject parent) : base(parent)
+        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        public CircleProgressBar(EvasObject parent, CircleSurface surface) : base()
         {
+            Debug.Assert(parent == null || surface == null || parent.IsRealized);
+            _surface = surface;
+            Realize(parent);
         }
 
+        /// <summary>
+        /// Gets the handle for Circle Widget.
+        /// </summary>
+        public virtual IntPtr CircleHandle => Handle;
+
+        /// <summary>
+        /// Gets the handle for Circle Surface used in this widget
+        /// </summary>
+        public virtual CircleSurface CircleSurface => _surface;
+
+        /// <summary>
+        /// Sets or gets the state of the widget, which might be enabled or disabled.
+        /// </summary>
+        public override bool IsEnabled
+        {
+            get
+            {
+                return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
+            }
+            set
+            {
+                Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
+            }
+        }
 
         /// <summary>
         /// Sets or gets the value of ProgressBar.
@@ -40,11 +71,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_value_get(Handle);
+                return Interop.Eext.eext_circle_object_value_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_value_set(Handle, value);
+                Interop.Eext.eext_circle_object_value_set(CircleHandle, value);
             }
         }
 
@@ -57,13 +88,13 @@ namespace ElmSharp.Wearable
             {
                 double max = 0;
                 double min = 0;
-                Interop.Eext.eext_circle_object_value_min_max_get(Handle, out min, out max);
+                Interop.Eext.eext_circle_object_value_min_max_get(CircleHandle, out min, out max);
                 return max;
             }
             set
             {
                 double min = Minimum;
-                Interop.Eext.eext_circle_object_value_min_max_set(Handle, min, value);
+                Interop.Eext.eext_circle_object_value_min_max_set(CircleHandle, min, value);
             }
         }
 
@@ -76,13 +107,13 @@ namespace ElmSharp.Wearable
             {
                 double max = 0;
                 double min = 0;
-                Interop.Eext.eext_circle_object_value_min_max_get(Handle, out min, out max);
+                Interop.Eext.eext_circle_object_value_min_max_get(CircleHandle, out min, out max);
                 return min;
             }
             set
             {
                 double max = Maximum;
-                Interop.Eext.eext_circle_object_value_min_max_set(Handle, value, max);
+                Interop.Eext.eext_circle_object_value_min_max_set(CircleHandle, value, max);
             }
         }
 
@@ -93,11 +124,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_angle_get(Handle);
+                return Interop.Eext.eext_circle_object_angle_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_angle_set(Handle, value);
+                Interop.Eext.eext_circle_object_angle_set(CircleHandle, value);
             }
         }
 
@@ -108,11 +139,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_angle_get(Handle, "bg");
+                return Interop.Eext.eext_circle_object_item_angle_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_angle_set(Handle, "bg", value);
+                Interop.Eext.eext_circle_object_item_angle_set(CircleHandle, "bg", value);
             }
         }
 
@@ -123,11 +154,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_angle_offset_get(Handle);
+                return Interop.Eext.eext_circle_object_angle_offset_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_angle_offset_set(Handle, value);
+                Interop.Eext.eext_circle_object_angle_offset_set(CircleHandle, value);
             }
         }
 
@@ -138,11 +169,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_angle_offset_get(Handle, "bg");
+                return Interop.Eext.eext_circle_object_item_angle_offset_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_angle_offset_set(Handle, "bg", value);
+                Interop.Eext.eext_circle_object_item_angle_offset_set(CircleHandle, "bg", value);
             }
         }
 
@@ -155,13 +186,13 @@ namespace ElmSharp.Wearable
             {
                 double max = 0;
                 double min = 0;
-                Interop.Eext.eext_circle_object_angle_min_max_get(Handle, out min, out max);
+                Interop.Eext.eext_circle_object_angle_min_max_get(CircleHandle, out min, out max);
                 return max;
             }
             set
             {
                 double min = BarAngleMinimum;
-                Interop.Eext.eext_circle_object_angle_min_max_set(Handle, min, value);
+                Interop.Eext.eext_circle_object_angle_min_max_set(CircleHandle, min, value);
             }
         }
 
@@ -174,28 +205,13 @@ namespace ElmSharp.Wearable
             {
                 double max = 0;
                 double min = 0;
-                Interop.Eext.eext_circle_object_angle_min_max_get(Handle, out min, out max);
+                Interop.Eext.eext_circle_object_angle_min_max_get(CircleHandle, out min, out max);
                 return min;
             }
             set
             {
                 double max = BarAngleMaximum;
-                Interop.Eext.eext_circle_object_angle_min_max_set(Handle, value, max);
-            }
-        }
-
-        /// <summary>
-        /// Sets or gets disable status of Circle ProgressBar.
-        /// </summary>
-        public bool Disabled
-        {
-            get
-            {
-                return Interop.Eext.eext_circle_object_disabled_get(Handle);
-            }
-            set
-            {
-                Interop.Eext.eext_circle_object_disabled_set(Handle, value);
+                Interop.Eext.eext_circle_object_angle_min_max_set(CircleHandle, value, max);
             }
         }
 
@@ -210,19 +226,19 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_color_get(Handle, out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_color_get(CircleHandle, out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_color_set(Handle, value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_color_set(CircleHandle, value.R, value.G, value.B, value.A);
             }
         }
 
         /// <summary>
         /// Sets or gets color of Background ProgressBar.
         /// </summary>
-        public Color BackgroundColor
+        public override Color BackgroundColor
         {
             get
             {
@@ -230,12 +246,12 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_item_color_get(Handle, "bg", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "bg", out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(Handle, "bg", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "bg", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -246,11 +262,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_line_width_get(Handle); ;
+                return Interop.Eext.eext_circle_object_line_width_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_line_width_set(Handle, value);
+                Interop.Eext.eext_circle_object_line_width_set(CircleHandle, value);
             }
         }
 
@@ -261,11 +277,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(Handle, "bg");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(Handle, "bg", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "bg", value);
             }
         }
 
@@ -276,11 +292,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_radius_get(Handle); ;
+                return Interop.Eext.eext_circle_object_radius_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_radius_set(Handle, value);
+                Interop.Eext.eext_circle_object_radius_set(CircleHandle, value);
             }
         }
 
@@ -291,11 +307,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(Handle, "bg"); ;
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(Handle, "bg", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "bg", value);
             }
         }
 
@@ -306,36 +322,7 @@ namespace ElmSharp.Wearable
         /// <returns>Handle IntPtr</returns>
         protected override IntPtr CreateHandle(EvasObject parent)
         {
-            IntPtr surface = IntPtr.Zero;
-
-            if (parent is Conformant)
-            {
-                surface = Interop.Eext.eext_circle_surface_conformant_add(parent.Handle);
-            }
-            else if (parent is Layout)
-            {
-                surface = Interop.Eext.eext_circle_surface_layout_add(parent.Handle);
-            }
-            else if (parent is Naviframe)
-            {
-                surface = Interop.Eext.eext_circle_surface_naviframe_add(parent.RealHandle);
-            }
-
-            var handle = Interop.Eext.eext_circle_object_progressbar_add(parent.Handle, surface);
-            if (surface == IntPtr.Zero)
-            {
-                EvasObject p = parent;
-                while (!(p is Window))
-                {
-                    p = p.Parent;
-                }
-                var w = (p as Window).ScreenSize.Width;
-                var h = (p as Window).ScreenSize.Height;
-                Interop.Evas.evas_object_resize(handle, w, h);
-            }
-
-            Interop.Eext.eext_rotary_object_event_activated_set(handle, true);
-            return handle;
+            return Interop.Eext.eext_circle_object_progressbar_add(parent, CircleSurface.Handle);
         }
     }
 }
\ No newline at end of file
index cd3a3c3..e60f31e 100644 (file)
  */
 
 using System;
+using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
     /// <summary>
     /// Circle scroller provides scrollbar with circular movement and is scrolled by rotary event.
     /// </summary>
-    public class CircleScroller : Scroller
+    public class CircleScroller : Scroller, IRotaryActionWidget
     {
-        private IntPtr _circleHandle;
+        IntPtr _circleHandle;
+        CircleSurface _surface;
 
         /// <summary>
         /// Creates and initializes a new instance of the CircleScroller class.
         /// </summary>
         /// <param name="parent">The <see cref="EvasObject"/> to which the new CircleScroller will be attached as a child.</param>
-        public CircleScroller(EvasObject parent) : base(parent)
+        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        public CircleScroller(EvasObject parent, CircleSurface surface) : base()
         {
+            Debug.Assert(parent == null || surface == null || parent.IsRealized);
+            _surface = surface;
+            Realize(parent);
         }
 
         /// <summary>
-        /// Sets or gets disabled state of the circle scroller object.
+        /// Gets the handle for Circle Widget.
         /// </summary>
-        public bool Disabled
+        public virtual IntPtr CircleHandle => _circleHandle;
+
+        /// <summary>
+        /// Gets the handle for Circle Surface used in this widget
+        /// </summary>
+        public virtual CircleSurface CircleSurface => _surface;
+
+        /// <summary>
+        /// Sets or gets the state of the widget, which might be enabled or disabled.
+        /// </summary>
+        public override bool IsEnabled
         {
             get
             {
-                return Interop.Eext.eext_circle_object_disabled_get(_circleHandle); ;
+                return !Interop.Eext.eext_circle_object_disabled_get(Handle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_disabled_set(_circleHandle, value);
+                Interop.Eext.eext_circle_object_disabled_set(Handle, !value);
             }
         }
 
@@ -60,13 +76,13 @@ namespace ElmSharp.Wearable
             get
             {
                 int policy;
-                Interop.Eext.eext_circle_object_scroller_policy_get(_circleHandle, out policy, IntPtr.Zero);
+                Interop.Eext.eext_circle_object_scroller_policy_get(CircleHandle, out policy, IntPtr.Zero);
                 return (ScrollBarVisiblePolicy)policy;
             }
             set
             {
                 ScrollBarVisiblePolicy v = VerticalScrollBarVisiblePolicy;
-                Interop.Eext.eext_circle_object_scroller_policy_set(_circleHandle, (int)value, (int)v);
+                Interop.Eext.eext_circle_object_scroller_policy_set(CircleHandle, (int)value, (int)v);
             }
         }
 
@@ -82,13 +98,13 @@ namespace ElmSharp.Wearable
             get
             {
                 int policy;
-                Interop.Eext.eext_circle_object_scroller_policy_get(_circleHandle, IntPtr.Zero, out policy);
+                Interop.Eext.eext_circle_object_scroller_policy_get(CircleHandle, IntPtr.Zero, out policy);
                 return (ScrollBarVisiblePolicy)policy;
             }
             set
             {
                 ScrollBarVisiblePolicy h = HorizontalScrollBarVisiblePolicy;
-                Interop.Eext.eext_circle_object_scroller_policy_set(_circleHandle, (int)h, (int)value);
+                Interop.Eext.eext_circle_object_scroller_policy_set(CircleHandle, (int)h, (int)value);
             }
         }
 
@@ -103,12 +119,12 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_color_get(_circleHandle, out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_color_get(CircleHandle, out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_color_set(_circleHandle, value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_color_set(CircleHandle, value.R, value.G, value.B, value.A);
             }
         }
 
@@ -123,12 +139,12 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_item_color_get(_circleHandle, "horizontal,scroll,bar", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "horizontal,scroll,bar", out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(_circleHandle, "horizontal,scroll,bar", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "horizontal,scroll,bar", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -143,12 +159,12 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_item_color_get(_circleHandle, "vertical,scroll,bg", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "vertical,scroll,bg", out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(_circleHandle, "vertical,scroll,bg", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "vertical,scroll,bg", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -163,12 +179,12 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_item_color_get(_circleHandle, "horizontal,scroll,bg", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "horizontal,scroll,bg", out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(_circleHandle, "horizontal,scroll,bg", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "horizontal,scroll,bg", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -179,11 +195,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_line_width_get(_circleHandle); ;
+                return Interop.Eext.eext_circle_object_line_width_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_line_width_set(_circleHandle, value);
+                Interop.Eext.eext_circle_object_line_width_set(CircleHandle, value);
             }
         }
 
@@ -194,11 +210,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(_circleHandle, "horizontal,scroll,bar");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "horizontal,scroll,bar");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(_circleHandle, "horizontal,scroll,bar", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "horizontal,scroll,bar", value);
             }
         }
 
@@ -209,11 +225,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(_circleHandle, "vertical,scroll,bg");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "vertical,scroll,bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(_circleHandle, "vertical,scroll,bg", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "vertical,scroll,bg", value);
             }
         }
 
@@ -224,11 +240,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(_circleHandle, "horizontal,scroll,bg");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "horizontal,scroll,bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(_circleHandle, "horizontal,scroll,bg", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "horizontal,scroll,bg", value);
             }
         }
 
@@ -239,11 +255,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_radius_get(_circleHandle); ;
+                return Interop.Eext.eext_circle_object_radius_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_radius_set(_circleHandle, value);
+                Interop.Eext.eext_circle_object_radius_set(CircleHandle, value);
             }
         }
 
@@ -254,11 +270,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(_circleHandle, "horizontal,scroll,bar"); ;
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "horizontal,scroll,bar");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(_circleHandle, "horizontal,scroll,bar", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "horizontal,scroll,bar", value);
             }
         }
 
@@ -269,11 +285,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(_circleHandle, "vertical,scroll,bg"); ;
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "vertical,scroll,bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(_circleHandle, "vertical,scroll,bg", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "vertical,scroll,bg", value);
             }
         }
 
@@ -284,11 +300,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(_circleHandle, "horizontal,scroll,bg"); ;
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "horizontal,scroll,bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(_circleHandle, "horizontal,scroll,bg", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "horizontal,scroll,bg", value);
             }
         }
 
@@ -300,33 +316,7 @@ namespace ElmSharp.Wearable
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             IntPtr handle = base.CreateHandle(parent);
-            IntPtr surface = IntPtr.Zero;
-            if (parent is Conformant)
-            {
-                surface = Interop.Eext.eext_circle_surface_conformant_add(parent);
-            }
-            else if (parent is Layout)
-            {
-                surface = Interop.Eext.eext_circle_surface_layout_add(parent);
-            }
-            else if (parent is Naviframe)
-            {
-                surface = Interop.Eext.eext_circle_surface_naviframe_add(parent.RealHandle);
-            }
-
-            _circleHandle = Interop.Eext.eext_circle_object_scroller_add(RealHandle, surface);
-            if (surface == IntPtr.Zero)
-            {
-                EvasObject p = parent;
-                while (!(p is Window))
-                {
-                    p = p.Parent;
-                }
-                var w = (p as Window).ScreenSize.Width;
-                var h = (p as Window).ScreenSize.Height;
-                Interop.Evas.evas_object_resize(_circleHandle, w, h);
-            }
-            Interop.Eext.eext_rotary_object_event_activated_set(_circleHandle, true);
+            _circleHandle = Interop.Eext.eext_circle_object_scroller_add(RealHandle == IntPtr.Zero ? Handle : RealHandle, CircleSurface.Handle);
             return handle;
         }
     }
index 48f86a1..06bd53b 100755 (executable)
  */
 
 using System;
+using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
     /// <summary>
     /// Circle slider is circular designed widget to select a value in a range by rotary event.
     /// </summary>
-    public class CircleSlider : EvasObject
+    public class CircleSlider : Widget, IRotaryActionWidget
     {
-        /// <summary>
-        /// Changed will be triggered when the circle slider value changes.
-        /// </summary>
-        public event EventHandler Changed;
-
         SmartEvent _changedEvent;
+        CircleSurface _surface;
 
         /// <summary>
         /// Creates and initializes a new instance of the CircleSlider class.
         /// </summary>
         /// <param name="parent">The EvasObject to which the new CircleSlider will be attached as a child.</param>
-        public CircleSlider(EvasObject parent) : base(parent)
+        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        public CircleSlider(EvasObject parent, CircleSurface surface) : base()
         {
-            _changedEvent = new SmartEvent(this, "value,changed");
-
-            _changedEvent.On += (s, e) => Changed?.Invoke(this, EventArgs.Empty);
+            Debug.Assert(parent == null || surface == null || parent.IsRealized);
+            _surface = surface;
+            Realize(parent);
         }
 
         /// <summary>
+        /// Changed will be triggered when the circle slider value changes.
+        /// </summary>
+        public event EventHandler ValueChanged;
+
+        /// <summary>
+        /// Gets the handle for Circle Widget.
+        /// </summary>
+        public virtual IntPtr CircleHandle => RealHandle;
+
+        /// <summary>
+        /// Gets the handle for Circle Surface used in this widget
+        /// </summary>
+        public virtual CircleSurface CircleSurface => _surface;
+
+        /// <summary>
         /// Sets or gets the step by which the circle slider bar moves.
         /// </summary>
         /// <remarks>
@@ -52,26 +65,26 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_slider_step_get(RealHandle);
+                return Interop.Eext.eext_circle_object_slider_step_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_slider_step_set(RealHandle, (double)value);
+                Interop.Eext.eext_circle_object_slider_step_set(CircleHandle, (double)value);
             }
         }
 
         /// <summary>
-        /// Sets or gets disabled state of the circle slider object.
+        /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
-        public bool Disabled
+        public override bool IsEnabled
         {
             get
             {
-                return Interop.Eext.eext_circle_object_disabled_get(RealHandle); ;
+                return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_disabled_set(RealHandle, value);
+                Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
             }
         }
 
@@ -86,19 +99,19 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_color_get(RealHandle, out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_color_get(CircleHandle, out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_color_set(RealHandle, value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_color_set(CircleHandle, value.R, value.G, value.B, value.A);
             }
         }
 
         /// <summary>
         /// Sets or gets color of the circle slider background.
         /// </summary>
-        public Color BackgroundColor
+        public override Color BackgroundColor
         {
             get
             {
@@ -106,12 +119,12 @@ namespace ElmSharp.Wearable
                 int g = 0;
                 int b = 0;
                 int a = 0;
-                Interop.Eext.eext_circle_object_item_color_get(RealHandle, "bg", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "bg", out r, out g, out b, out a);
                 return Color.FromRgba(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(RealHandle, "bg", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "bg", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -122,11 +135,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_line_width_get(RealHandle); ;
+                return Interop.Eext.eext_circle_object_line_width_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_line_width_set(RealHandle, value);
+                Interop.Eext.eext_circle_object_line_width_set(CircleHandle, value);
             }
         }
 
@@ -137,11 +150,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(RealHandle, "bg");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(RealHandle, "bg", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "bg", value);
             }
         }
 
@@ -152,11 +165,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_angle_get(RealHandle); ;
+                return Interop.Eext.eext_circle_object_angle_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_angle_set(RealHandle, value);
+                Interop.Eext.eext_circle_object_angle_set(CircleHandle, value);
             }
         }
 
@@ -167,11 +180,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_angle_get(RealHandle, "bg");
+                return Interop.Eext.eext_circle_object_item_angle_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_angle_set(RealHandle, "bg", value);
+                Interop.Eext.eext_circle_object_item_angle_set(CircleHandle, "bg", value);
             }
         }
 
@@ -183,11 +196,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_angle_offset_get(RealHandle); ;
+                return Interop.Eext.eext_circle_object_angle_offset_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_angle_offset_set(RealHandle, value);
+                Interop.Eext.eext_circle_object_angle_offset_set(CircleHandle, value);
             }
         }
 
@@ -199,11 +212,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_angle_offset_get(RealHandle, "bg");
+                return Interop.Eext.eext_circle_object_item_angle_offset_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_angle_offset_set(RealHandle, "bg", value);
+                Interop.Eext.eext_circle_object_item_angle_offset_set(CircleHandle, "bg", value);
             }
         }
 
@@ -216,13 +229,13 @@ namespace ElmSharp.Wearable
             {
                 double min;
                 double max;
-                Interop.Eext.eext_circle_object_angle_min_max_get(RealHandle, out min, out max);
+                Interop.Eext.eext_circle_object_angle_min_max_get(CircleHandle, out min, out max);
                 return min;
             }
             set
             {
                 double max = BarAngleMaximum;
-                Interop.Eext.eext_circle_object_angle_min_max_set(RealHandle, (double)value, max);
+                Interop.Eext.eext_circle_object_angle_min_max_set(CircleHandle, (double)value, max);
             }
         }
 
@@ -235,13 +248,13 @@ namespace ElmSharp.Wearable
             {
                 double min;
                 double max;
-                Interop.Eext.eext_circle_object_angle_min_max_get(RealHandle, out min, out max);
+                Interop.Eext.eext_circle_object_angle_min_max_get(CircleHandle, out min, out max);
                 return max;
             }
             set
             {
                 double min = BarAngleMinimum;
-                Interop.Eext.eext_circle_object_angle_min_max_set(RealHandle, min, (double)value);
+                Interop.Eext.eext_circle_object_angle_min_max_set(CircleHandle, min, (double)value);
             }
         }
 
@@ -259,13 +272,13 @@ namespace ElmSharp.Wearable
             {
                 double min;
                 double max;
-                Interop.Eext.eext_circle_object_value_min_max_get(RealHandle, out min, out max);
+                Interop.Eext.eext_circle_object_value_min_max_get(CircleHandle, out min, out max);
                 return min;
             }
             set
             {
                 double max = Maximum;
-                Interop.Eext.eext_circle_object_value_min_max_set(RealHandle, (double)value, max);
+                Interop.Eext.eext_circle_object_value_min_max_set(CircleHandle, (double)value, max);
             }
         }
 
@@ -284,13 +297,13 @@ namespace ElmSharp.Wearable
             {
                 double min;
                 double max;
-                Interop.Eext.eext_circle_object_value_min_max_get(RealHandle, out min, out max);
+                Interop.Eext.eext_circle_object_value_min_max_get(CircleHandle, out min, out max);
                 return max;
             }
             set
             {
                 double min = Minimum;
-                Interop.Eext.eext_circle_object_value_min_max_set(RealHandle, min, (double)value);
+                Interop.Eext.eext_circle_object_value_min_max_set(CircleHandle, min, (double)value);
             }
         }
 
@@ -304,11 +317,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_value_get(RealHandle);
+                return Interop.Eext.eext_circle_object_value_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_value_set(RealHandle, (double)value);
+                Interop.Eext.eext_circle_object_value_set(CircleHandle, (double)value);
             }
         }
 
@@ -319,11 +332,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_radius_get(RealHandle); ;
+                return Interop.Eext.eext_circle_object_radius_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_radius_set(RealHandle, value);
+                Interop.Eext.eext_circle_object_radius_set(CircleHandle, value);
             }
         }
 
@@ -334,50 +347,32 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(RealHandle, "bg"); ;
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "bg");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(RealHandle, "bg", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "bg", value);
             }
         }
 
         /// <summary>
+        /// The callback of Realized Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            _changedEvent = new SmartEvent(this, "value,changed");
+            _changedEvent.On += (s, e) => ValueChanged?.Invoke(this, EventArgs.Empty);
+        }
+
+        /// <summary>
         /// Creates a widget handle.
         /// </summary>
         /// <param name="parent">Parent EvasObject</param>
         /// <returns>Handle IntPtr</returns>
         protected override IntPtr CreateHandle(EvasObject parent)
         {
-            IntPtr surface = IntPtr.Zero;
-            if (parent is Conformant)
-            {
-                surface = Interop.Eext.eext_circle_surface_conformant_add(parent);
-            }
-            else if (parent is Layout)
-            {
-                surface = Interop.Eext.eext_circle_surface_layout_add(parent);
-            }
-            else if (parent is Naviframe)
-            {
-                surface = Interop.Eext.eext_circle_surface_naviframe_add(parent.RealHandle);
-            }
-
-            IntPtr handle = Interop.Eext.eext_circle_object_slider_add(parent, surface);
-            if (surface == IntPtr.Zero)
-            {
-                EvasObject p = parent;
-                while (!(p is Window))
-                {
-                    p = p.Parent;
-                }
-                var w = (p as Window).ScreenSize.Width;
-                var h = (p as Window).ScreenSize.Height;
-                Interop.Evas.evas_object_resize(handle, w, h);
-            }
-
-            Interop.Eext.eext_rotary_object_event_activated_set(handle, true);
-            return handle;
+            return Interop.Eext.eext_circle_object_slider_add(parent, CircleSurface.Handle);
         }
     }
 }
\ No newline at end of file
index fbc84d7..e66fa54 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
@@ -23,20 +24,35 @@ namespace ElmSharp.Wearable
     /// The Circle Spinner is a widget to display and handle spinner value by rotary event
     /// Inherits <see cref="Spinner"/>.
     /// </summary>
-    public class CircleSpinner : Spinner
+    public class CircleSpinner : Spinner, IRotaryActionWidget
     {
-        private IntPtr _circleHandle;
-        private double _angleRatio = 1.0;
+        IntPtr _circleHandle;
+        double _angleRatio = 1.0;
+        CircleSurface _surface;
 
         /// <summary>
         /// Creates and initializes a new instance of the Circle Spinner class.
         /// </summary>
         /// <param name="parent">The parent of new Circle Spinner instance</param>
-        public CircleSpinner(EvasObject parent) : base(parent)
+        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        public CircleSpinner(EvasObject parent, CircleSurface surface) : base()
         {
+            Debug.Assert(parent == null || surface == null || parent.IsRealized);
+            _surface = surface;
+            Realize(parent);
         }
 
         /// <summary>
+        /// Gets the handle for Circle Widget.
+        /// </summary>
+        public virtual IntPtr CircleHandle => RealHandle;
+
+        /// <summary>
+        /// Gets the handle for Circle Surface used in this widget
+        /// </summary>
+        public virtual CircleSurface CircleSurface => _surface;
+
+        /// <summary>
         /// Sets or gets the circle spinner angle per each spinner value.
         /// </summary>
         public double AngleRatio
@@ -48,22 +64,22 @@ namespace ElmSharp.Wearable
             set
             {
                 _angleRatio = value;
-                Interop.Eext.eext_circle_object_spinner_angle_set(_circleHandle, _angleRatio);
+                Interop.Eext.eext_circle_object_spinner_angle_set(CircleHandle, _angleRatio);
             }
         }
 
         /// <summary>
-        /// Sets or gets disabled state of the circle spinner object.
+        /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
-        public bool Disabled
+        public override bool IsEnabled
         {
             get
             {
-                return Interop.Eext.eext_circle_object_disabled_get(_circleHandle); ;
+                return !Interop.Eext.eext_circle_object_disabled_get(CircleHandle);
             }
             set
             {
-                Interop.Eext.eext_circle_object_disabled_set(_circleHandle, value);
+                Interop.Eext.eext_circle_object_disabled_set(CircleHandle, !value);
             }
         }
 
@@ -74,11 +90,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_line_width_get(_circleHandle, "default");
+                return Interop.Eext.eext_circle_object_item_line_width_get(CircleHandle, "default");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_line_width_set(_circleHandle, "default", value);
+                Interop.Eext.eext_circle_object_item_line_width_set(CircleHandle, "default", value);
             }
         }
 
@@ -90,12 +106,12 @@ namespace ElmSharp.Wearable
             get
             {
                 int r, g, b, a;
-                Interop.Eext.eext_circle_object_item_color_get(_circleHandle, "default", out r, out g, out b, out a);
+                Interop.Eext.eext_circle_object_item_color_get(CircleHandle, "default", out r, out g, out b, out a);
                 return new Color(r, g, b, a);
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_color_set(_circleHandle, "default", value.R, value.G, value.B, value.A);
+                Interop.Eext.eext_circle_object_item_color_set(CircleHandle, "default", value.R, value.G, value.B, value.A);
             }
         }
 
@@ -106,11 +122,11 @@ namespace ElmSharp.Wearable
         {
             get
             {
-                return Interop.Eext.eext_circle_object_item_radius_get(_circleHandle, "default");
+                return Interop.Eext.eext_circle_object_item_radius_get(CircleHandle, "default");
             }
             set
             {
-                Interop.Eext.eext_circle_object_item_radius_set(_circleHandle, "default", value);
+                Interop.Eext.eext_circle_object_item_radius_set(CircleHandle, "default", value);
             }
         }
 
@@ -122,36 +138,7 @@ namespace ElmSharp.Wearable
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             IntPtr handle = base.CreateHandle(parent);
-
-            IntPtr surface = IntPtr.Zero;
-
-            if (parent is Conformant)
-            {
-                surface = Interop.Eext.eext_circle_surface_conformant_add(parent.Handle);
-            }
-            else if (parent is Naviframe)
-            {
-                surface = Interop.Eext.eext_circle_surface_naviframe_add(parent.RealHandle);
-            }
-            else if (parent is Layout)
-            {
-                surface = Interop.Eext.eext_circle_surface_layout_add(parent.Handle);
-            }
-
-            _circleHandle = Interop.Eext.eext_circle_object_spinner_add(RealHandle, surface);
-            if (surface == IntPtr.Zero)
-            {
-                EvasObject p = parent;
-                while (!(p is Window))
-                {
-                    p = p.Parent;
-                }
-                var w = (p as Window).ScreenSize.Width;
-                var h = (p as Window).ScreenSize.Height;
-                Interop.Evas.evas_object_resize(_circleHandle, w, h);
-            }
-
-            Interop.Eext.eext_rotary_object_event_activated_set(_circleHandle, true);
+            _circleHandle = Interop.Eext.eext_circle_object_spinner_add(RealHandle == IntPtr.Zero ? Handle : RealHandle, CircleSurface.Handle);
             return handle;
         }
     }
diff --git a/src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSurface.cs b/src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSurface.cs
new file mode 100644 (file)
index 0000000..91da5a1
--- /dev/null
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ElmSharp.Wearable
+{
+    /// <summary>
+    /// The CircleSurface presents a surface for drawing circular feature of circle widgets
+    /// </summary>
+    public class CircleSurface
+    {
+        IntPtr _handle;
+
+        /// <summary>
+        /// Creates and initializes a new instance of the CircleSurface class with surface on the Conformant widget.
+        /// </summary>
+        /// <param name="conformant">Conformant widget to create a surface.</param>
+        public CircleSurface(Conformant conformant)
+        {
+            _handle = Interop.Eext.eext_circle_surface_conformant_add(conformant);
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of the CircleSurface class with surface on the Layout widget.
+        /// </summary>
+        /// <param name="layout">Layout widget to create a surface.</param>
+        public CircleSurface(Layout layout)
+        {
+            _handle = Interop.Eext.eext_circle_surface_layout_add(layout);
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of the CircleSurface class with surface on the Naviframe widget.
+        /// </summary>
+        /// <param name="naviframe">Naviframe widget to create a surface.</param>
+        public CircleSurface(Naviframe naviframe)
+        {
+            _handle = Interop.Eext.eext_circle_surface_naviframe_add(naviframe);
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of the CircleSurface class with no surface
+        /// </summary>
+        public CircleSurface()
+        {
+            _handle = IntPtr.Zero;
+        }
+
+        public IntPtr Handle => _handle;
+    }
+}
diff --git a/src/ElmSharp.Wearable/ElmSharp.Wearable/ICircleWidget.cs b/src/ElmSharp.Wearable/ElmSharp.Wearable/ICircleWidget.cs
new file mode 100644 (file)
index 0000000..17cdf42
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ElmSharp.Wearable
+{
+    /// <summary>
+    /// The ICircleWidget is the interface for a widget to display and handle with circle surface
+    /// </summary>
+    public interface ICircleWidget
+    {
+        /// <summary>
+        /// Gets the handle for Circle Widget.
+        /// </summary>
+        IntPtr CircleHandle { get; }
+
+        /// <summary>
+        /// Gets the CircleSurface used in this widget
+        /// </summary>
+        CircleSurface CircleSurface { get; }
+    }
+
+    /// <summary>
+    /// The IRotaryActionWidget is the interface for a widget has action by rotary event
+    /// </summary>
+    public interface IRotaryActionWidget : ICircleWidget
+    {
+    }
+}
index 6b34fde..f413ae4 100644 (file)
@@ -67,7 +67,7 @@ namespace ElmSharp.Wearable
     /// <summary>
     /// RotaryEventManager serve extension functions for Rotary event to EvasObject on device like Galaxy Gear.
     /// </summary>
-    public static class EvasObjectExtensions
+    public static class RotaryEventExtensions
     {
         static Dictionary<EvasObject, RotaryEventHandler> s_rotaryObjectEventHandlers = new Dictionary<EvasObject, RotaryEventHandler>();
         static Dictionary<EvasObject, Interop.Eext.Eext_Rotary_Event_Cb> s_rotaryObjectEventMap = new Dictionary<EvasObject, Interop.Eext.Eext_Rotary_Event_Cb>();
@@ -110,6 +110,24 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Activate this circle widget can take Rotary event.
+        /// </summary>
+        /// <param name="widget">Target circle widget</param>
+        public static void Activate(this IRotaryActionWidget widget)
+        {
+            Interop.Eext.eext_rotary_object_event_activated_set(widget.CircleHandle, true);
+        }
+
+        /// <summary>
+        /// Deactivate this circle widget is blocked from Rotary event.
+        /// </summary>
+        /// <param name="widget">Target circle widget</param>
+        public static void Deactivate(this IRotaryActionWidget widget)
+        {
+            Interop.Eext.eext_rotary_object_event_activated_set(widget.CircleHandle, false);
+        }
+
+        /// <summary>
         /// Activate this object can take Rotary event.
         /// </summary>
         /// <param name="obj">Target object</param>
index 135c3d3..b7e0e33 100755 (executable)
@@ -39,6 +39,13 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of Container class.
+        /// </summary>
+        protected Container() : base()
+        {
+        }
+
+        /// <summary>
         /// Sets the background color of a given Container.
         /// </summary>
         public override Color BackgroundColor
index 98d2cbe..c159804 100755 (executable)
@@ -67,13 +67,13 @@ namespace ElmSharp
         ///as a child.It's <see cref="EvasObject"/> type.</param>
         public DateTimeSelector(EvasObject parent) : base(parent)
         {
-            _changed = new SmartEvent(this, this.RealHandle, "changed");
-            _changed.On += (s, e) =>
-            {
-                DateTime newDateTime = DateTime;
-                DateTimeChanged?.Invoke(this, new DateChangedEventArgs(_cacheDateTime, newDateTime));
-                DateTime = newDateTime;
-            };
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of DateTimeSelector class.
+        /// </summary>
+        protected DateTimeSelector() : base()
+        {
         }
 
         /// <summary>
@@ -189,6 +189,21 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// The callback of Realized Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            _changed = new SmartEvent(this, this.RealHandle, "changed");
+            _changed.On += (s, e) =>
+            {
+                DateTime newDateTime = DateTime;
+                DateTimeChanged?.Invoke(this, new DateChangedEventArgs(_cacheDateTime, newDateTime));
+                DateTime = newDateTime;
+            };
+        }
+
+        /// <summary>
         /// Creates a widget handle.
         /// </summary>
         /// <param name="parent">Parent EvasObject</param>
index 7afb41c..600c57b 100755 (executable)
@@ -155,8 +155,13 @@ namespace ElmSharp
         /// <param name="parent">The parent is a given container which will be attached by GenList as a child. It's <see cref="EvasObject"/> type.</param>
         public GenList(EvasObject parent) : base(parent)
         {
-            ListMode = GenListMode.Compress;
-            InitializeSmartEvent();
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of GenList class.
+        /// </summary>
+        protected GenList() : base()
+        {
         }
 
         /// <summary>
@@ -351,6 +356,17 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Gets count of items in a this genlist widget
+        /// </summary>
+        public int Count
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_items_count(RealHandle);
+            }
+        }
+
+        /// <summary>
         /// ItemSelected is raised when a new genlist item is selected.
         /// </summary>
         public event EventHandler<GenListItemEventArgs> ItemSelected;
@@ -712,6 +728,16 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// The callback of Unrealize Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            ListMode = GenListMode.Compress;
+            InitializeSmartEvent();
+        }
+
+        /// <summary>
         /// Creates a widget handle.
         /// </summary>
         /// <param name="parent">Parent EvasObject</param>
index b4616a4..0980c5b 100755 (executable)
@@ -82,6 +82,21 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Sets or gets the style of the Item.
+        /// </summary>
+        public string Style
+        {
+            get
+            {
+                return Interop.Elementary.elm_object_item_style_get(Handle);
+            }
+            set
+            {
+                Interop.Elementary.elm_object_item_style_set(Handle, value);
+            }
+        }
+
         internal IntPtr Handle
         {
             get
index 4e7b294..d5716e1 100644 (file)
@@ -35,17 +35,13 @@ namespace ElmSharp
         /// <param name="parent">The parent is a given container which will be attached by Layout as a child. It's <see cref="EvasObject"/> type.</param>
         public Layout(EvasObject parent) : base(parent)
         {
-            _languageChanged = new SmartEvent(this, this.RealHandle, "language,changed");
-            _languageChanged.On += (s, e) =>
-            {
-                LanguageChanged?.Invoke(this, EventArgs.Empty);
-            };
+        }
 
-            _themeChanged = new SmartEvent(this, this.RealHandle, "theme,changed");
-            _themeChanged.On += (s, e) =>
-            {
-                ThemeChanged?.Invoke(this, EventArgs.Empty);
-            };
+        /// <summary>
+        /// Creates and initializes a new instance of Layout class.
+        /// </summary>
+        protected Layout() : base()
+        {
         }
 
         /// <summary>
@@ -340,6 +336,25 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// The callback of Realized Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            _languageChanged = new SmartEvent(this, this.RealHandle, "language,changed");
+            _languageChanged.On += (s, e) =>
+            {
+                LanguageChanged?.Invoke(this, EventArgs.Empty);
+            };
+
+            _themeChanged = new SmartEvent(this, this.RealHandle, "theme,changed");
+            _themeChanged.On += (s, e) =>
+            {
+                ThemeChanged?.Invoke(this, EventArgs.Empty);
+            };
+        }
+
+        /// <summary>
         /// Sets the content at a part of a given container widget.
         /// </summary>
         /// <param name="parent">The parent is a given container which will be attached by Layout as a child. It's <see cref="EvasObject"/> type.</param>
index 64079d1..cf7352e 100755 (executable)
@@ -97,10 +97,13 @@ namespace ElmSharp
         /// <param name="parent">The <see cref="EvasObject"/> to which the new Scroller will be attached as a child.</param>
         public Scroller(EvasObject parent) : base(parent)
         {
-            _scroll = new SmartEvent(this, this.RealHandle, "scroll");
-            _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start");
-            _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop");
-            _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed");
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of the Scroller class.
+        /// </summary>
+        public Scroller() : base()
+        {
         }
 
         /// <summary>
@@ -780,6 +783,15 @@ namespace ElmSharp
             }
         }
 
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            _scroll = new SmartEvent(this, this.RealHandle, "scroll");
+            _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start");
+            _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop");
+            _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed");
+        }
+
         /// <summary>
         /// Creates a widget handle.
         /// </summary>
index 556de96..794aa32 100755 (executable)
@@ -36,11 +36,13 @@ namespace ElmSharp
         /// <param name="parent">The parent of new Spinner instance</param>
         public Spinner(EvasObject parent) : base(parent)
         {
-            _changed = new SmartEvent(this, this.RealHandle, "changed");
-            _changed.On += (s, e) => ValueChanged?.Invoke(this, EventArgs.Empty);
+        }
 
-            _delayedChanged = new SmartEvent(this, this.RealHandle, "delay,changed");
-            _delayedChanged.On += (s, e) => DelayedValueChanged?.Invoke(this, EventArgs.Empty);
+        /// <summary>
+        /// Creates and initializes a new instance of Layout class.
+        /// </summary>
+        protected Spinner() : base()
+        {
         }
 
         /// <summary>
@@ -241,6 +243,19 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// The callback of Realized Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            _changed = new SmartEvent(this, this.RealHandle, "changed");
+            _changed.On += (s, e) => ValueChanged?.Invoke(this, EventArgs.Empty);
+
+            _delayedChanged = new SmartEvent(this, this.RealHandle, "delay,changed");
+            _delayedChanged.On += (s, e) => DelayedValueChanged?.Invoke(this, EventArgs.Empty);
+        }
+
+        /// <summary>
         /// Creates a widget handle.
         /// </summary>
         /// <param name="parent">Parent EvasObject</param>
index 040d132..a6b19fe 100755 (executable)
@@ -83,11 +83,6 @@ namespace ElmSharp
         /// <param name="parent">The parent of new Widget instance</param>
         protected Widget(EvasObject parent) : base(parent)
         {
-            _focused = new SmartEvent(this, "focused");
-            _focused.On += (s, e) => Focused?.Invoke(this, EventArgs.Empty);
-
-            _unfocused = new SmartEvent(this, "unfocused");
-            _unfocused.On += (s, e) => Unfocused?.Invoke(this, EventArgs.Empty);
         }
 
         /// <summary>
@@ -113,7 +108,7 @@ namespace ElmSharp
         /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
-        public bool IsEnabled
+        public virtual bool IsEnabled
         {
             get
             {
@@ -437,6 +432,29 @@ namespace ElmSharp
             return a;
         }
 
+       /// <summary>
+        /// Send a signal to the edje object of the widget.
+        /// </summary>
+        /// <param name="emission">The signal's name.</param>
+        /// <param name="source">The signal's source.</param>
+        public void SignalEmit(string emission, string source)
+        {
+            Interop.Elementary.elm_object_signal_emit(Handle, emission, source);
+        }
+
+        /// <summary>
+        /// The callback of Realized Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            _focused = new SmartEvent(this, "focused");
+            _focused.On += (s, e) => Focused?.Invoke(this, EventArgs.Empty);
+
+            _unfocused = new SmartEvent(this, "unfocused");
+            _unfocused.On += (s, e) => Unfocused?.Invoke(this, EventArgs.Empty);
+        }
+
         internal IntPtr GetPartContent(string part)
         {
             return Interop.Elementary.elm_object_part_content_get(RealHandle, part);
index 0d516ec..c0e4f3f 100644 (file)
@@ -99,6 +99,18 @@ internal static partial class Interop
         [DllImport(Libraries.Elementary)]
         internal static extern IntPtr elm_object_item_signal_callback_del(IntPtr obj, string emission, string source, Elm_Object_Item_Signal_Cb func);
 
+        [DllImport(Libraries.Elementary)]
+        internal static extern void elm_object_item_style_set(IntPtr obj, string style);
+
+        [DllImport(Libraries.Elementary, EntryPoint = "elm_object_item_style_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal static extern IntPtr _elm_object_item_style_get(IntPtr obj);
+
+        internal static string elm_object_item_style_get(IntPtr obj)
+        {
+            var text = _elm_object_item_style_get(obj);
+            return Marshal.PtrToStringAnsi(text);
+        }
+
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         internal delegate bool Elm_Object_Item_Signal_Cb(IntPtr data, IntPtr item, string emission, string source);
 
index 7685607..8c6a084 100755 (executable)
@@ -40,9 +40,11 @@ namespace Tizen.Applications
         /// The bundle constructor.
         /// </summary>
         /// <exception cref="System.InvalidOperationException">Thrown when out of memory.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// </code>
+        /// </example>
         public Bundle()
         {
             _handle = Interop.Bundle.Create();
@@ -96,11 +98,13 @@ namespace Tizen.Applications
         /// <summary>
         /// The number of items in a bundle object.
         /// </summary>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string", "a_string");
         /// Console.WriteLine("There are {0} items in the bundle", bundle.Count);
         /// </code>
+        /// </example>
         public int Count
         {
             get
@@ -112,6 +116,7 @@ namespace Tizen.Applications
         /// <summary>
         /// The keys in a bundle object.
         /// </summary>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string1", "a_string1");
@@ -123,6 +128,7 @@ namespace Tizen.Applications
         ///     Console.WriteLine(key);
         /// }
         /// </code>
+        /// </example>
         public IEnumerable<string> Keys
         {
             get
@@ -153,6 +159,7 @@ namespace Tizen.Applications
         /// </summary>
         /// <param name="key">The key to check for.</param>
         /// <returns>true if the bundle contains the key, false otherwise.</returns>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string", "a_string");
@@ -162,6 +169,7 @@ namespace Tizen.Applications
         ///     Console.WriteLine(aValue);
         /// }
         /// </code>
+        /// </example>
         public bool Contains(string key)
         {
             return _keys.Contains(key);
@@ -175,11 +183,13 @@ namespace Tizen.Applications
         /// <exception cref="System.ArgumentException">Thrown when the key already exists or when there is an invalid parameter.</exception>
         /// <exception cref="System.ArgumentNullException">Thrown when a value is null.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when out of memory or when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// byte[] byteArray = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         /// bundle.AddItem("byte_array", byteArray);
         /// </code>
+        /// </example>
         public void AddItem(string key, byte[] value)
         {
             if (value == null)
@@ -200,11 +210,13 @@ namespace Tizen.Applications
         /// <exception cref="System.ArgumentException">Thrown when the key already exists or when there is an invalid parameter.</exception>
         /// <exception cref="System.ArgumentNullException">Thrown when a value is null.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when out of memory or when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// byte[] byteArray = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
         /// bundle.AddItem("byte_array", byteArray, 2, 3);
         /// </code>
+        /// </example>
         public void AddItem(string key, byte[] value, int offset, int count)
         {
             if (!_keys.Contains(key))
@@ -247,10 +259,12 @@ namespace Tizen.Applications
         /// <param name="value">The value of the item.</param>
         /// <exception cref="System.ArgumentException">Thrown when the key already exists or when there is an invalid parameter.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when out of memory or when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string", "a_string");
         /// </code>
+        /// </example>
         public void AddItem(string key, string value)
         {
             if (!_keys.Contains(key))
@@ -272,11 +286,13 @@ namespace Tizen.Applications
         /// <param name="value">The value of the item.</param>
         /// <exception cref="System.ArgumentException">Thrown when the key already exists or when there is an invalid parameter.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when out of memory or when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// string[] stringArray = { "a", "b", "c" };
         /// bundle.AddItem("string_array", stringArray);
         /// </code>
+        /// </example>
         public void AddItem(string key, IEnumerable<string> value)
         {
             if (!_keys.Contains(key))
@@ -299,6 +315,7 @@ namespace Tizen.Applications
         /// <returns>The value of the bundle item.</returns>
         /// <exception cref="System.ArgumentException">Thrown when the key does not exist or when there is an invalid parameter.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string", "a_string");
@@ -312,6 +329,7 @@ namespace Tizen.Applications
         ///     }
         /// }
         /// </code>
+        /// </example>
         public object GetItem(string key)
         {
             if (_keys.Contains(key))
@@ -369,6 +387,7 @@ namespace Tizen.Applications
         /// <exception cref="System.ArgumentException">Thrown when the key does not exist or when there is an invalid parameter.</exception>
         /// <exception cref="System.InvalidCastException">Thrown when the value of the bundle item cannot be converted to the specified generic type.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// string[] stringArray = { "a", "b", "c" };
@@ -388,6 +407,7 @@ namespace Tizen.Applications
         ///     }
         /// }
         /// </code>
+        /// </example>
         public T GetItem<T>(string key)
         {
             return (T)GetItem(key);
@@ -400,6 +420,7 @@ namespace Tizen.Applications
         /// <param name="value">The value of the bundle item. If the key does not exist or the type of this parameter is incorrect, it is the default value for the value parameter type.</param>
         /// <returns>true if an item with the key exists and if the value is the same type as the output value parameter, false otherwise.</returns>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// byte[] byteArray = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
@@ -410,6 +431,7 @@ namespace Tizen.Applications
         ///     Console.WriteLine("First item in the byte array: {0}", aByteArray[0]);
         /// }
         /// </code>
+        /// </example>
         public bool TryGetItem(string key, out byte[] value)
         {
             if (_keys.Contains(key) && Interop.Bundle.GetType(_handle, key) == (int)BundleType.Byte)
@@ -435,6 +457,7 @@ namespace Tizen.Applications
         /// <param name="value">The value of the bundle item. If the key does not exist or the type of this parameter is incorrect, it is the default value for the value parameter type.</param>
         /// <returns>true if an item with the key exists and if the value is the same type as the output value parameter, false otherwise.</returns>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string", "a_string");
@@ -444,6 +467,7 @@ namespace Tizen.Applications
         ///     Console.WriteLine(aString);
         /// }
         /// </code>
+        /// </example>
         public bool TryGetItem(string key, out string value)
         {
             if (_keys.Contains(key) && Interop.Bundle.GetType(_handle, key) == (int)BundleType.String)
@@ -469,6 +493,7 @@ namespace Tizen.Applications
         /// <param name="value">The value of the bundle item. If the key does not exist or the type of this parameter is incorrect, it is the default value for the value parameter type.</param>
         /// <returns>true if an item with the key exists and if the value is the same type as the output value parameter, false otherwise.</returns>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// string[] stringArray = { "a", "b", "c" };
@@ -482,6 +507,7 @@ namespace Tizen.Applications
         ///     }
         /// }
         /// </code>
+        /// </example>
         public bool TryGetItem(string key, out IEnumerable<string> value)
         {
             if (_keys.Contains(key) && Interop.Bundle.GetType(_handle, key) == (int)BundleType.StringArray)
@@ -508,6 +534,7 @@ namespace Tizen.Applications
         /// <returns>true if the item is of the specified type, false otherwise.</returns>
         /// <exception cref="System.ArgumentException">Thrown when the key does not exist or when there is an invalid parameter.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// string[] stringArray = { "a", "b", "c" };
@@ -522,6 +549,7 @@ namespace Tizen.Applications
         ///     }
         /// }
         /// </code>
+        /// </example>
         public bool Is<T>(string key)
         {
             if (_keys.Contains(key))
@@ -555,6 +583,7 @@ namespace Tizen.Applications
         /// <returns>true if the item is successfully found and removed, false otherwise (even if the item is not found).</returns>
         /// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="System.InvalidOperationException">Thrown when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// bundle.AddItem("string", "a_string");
@@ -566,6 +595,7 @@ namespace Tizen.Applications
         ///     }
         /// }
         /// </code>
+        /// </example>
         public bool RemoveItem(string key)
         {
             if (_keys.Contains(key))
@@ -591,11 +621,13 @@ namespace Tizen.Applications
         /// <param name="bundleRaw">The encoded bundle data. bundleRaw should be the returned value of Tizen.Applications.Bundle.Encode, otherwise this method will not succeed.</param>
         /// <returns>Decoded Bundle object.</returns>
         /// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// string bundleRaw = bundle.Encode();
         /// Bundle data = bundle.Decode(bundleRaw);
         /// </code>
+        /// </example>
         public static Bundle Decode(string bundleRaw)
         {
             SafeBundleHandle handle;
@@ -614,10 +646,12 @@ namespace Tizen.Applications
         /// </summary>
         /// <returns>Encoded bundle data in string.</returns>
         /// <exception cref="System.InvalidOperationException">Thrown when out of memory or when the bundle instance has been disposed.</exception>
+        /// <example>
         /// <code>
         /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle();
         /// string bundleRaw = bundle.Encode();
         /// </code>
+        /// </example>
         public string Encode()
         {
             string bundleRaw;
index b1bd818..5050abe 100755 (executable)
@@ -53,9 +53,11 @@ namespace Tizen.Applications.Messages
         /// <param name="portName">The name of the local message port.</param>
         /// <param name="trusted">If true, it is the trusted message port of application, otherwise false.</param>
         /// <exception cref="System.ArgumentException">Thrown when portName is null or empty.</exception>
+        /// <example>
         /// <code>
         /// MessagePort messagePort = new MessagePort("SenderPort", true);
         /// </code>
+        /// </example>
         public MessagePort(string portName, bool trusted)
         {
             if (String.IsNullOrEmpty(portName))
@@ -77,6 +79,7 @@ namespace Tizen.Applications.Messages
         /// <summary>
         /// Called when a message is received.
         /// </summary>
+        /// <example>
         /// <code>
         /// MessagePort messagePort = new MessagePort("SenderPort", true);
         /// messagePort.MessageReceived += MessageReceivedCallback;
@@ -88,6 +91,7 @@ namespace Tizen.Applications.Messages
         ///     }
         /// }
         /// </code>
+        /// </example>
         public event EventHandler<MessageReceivedEventArgs> MessageReceived;
 
         /// <summary>
@@ -128,11 +132,13 @@ namespace Tizen.Applications.Messages
         /// <exception cref="System.InvalidOperationException">Thrown when portName is already used, when there is an I/O error.</exception>
         /// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+        /// <example>
         /// <code>
         /// MessagePort messagePort = new MessagePort("SenderPort", true);
         /// messagePort.MessageReceived += MessageReceivedCallback;
         /// messagePort.Listen();
         /// </code>
+        /// </example>
         public void Listen()
         {
             lock (s_lock)
@@ -178,6 +184,7 @@ namespace Tizen.Applications.Messages
         /// <exception cref="System.InvalidOperationException">Thrown when messageport is already stopped, when there is an I/O error, when the port is not found.</exception>
         /// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+        /// <example>
         /// <code>
         /// MessagePort messagePort = new MessagePort("SenderPort", true);
         /// messagePort.MessageReceived += MessageReceivedCallback;
@@ -189,6 +196,7 @@ namespace Tizen.Applications.Messages
         /// }
         /// messagePort.StopListening();
         /// </code>
+        /// </example>
         public void StopListening()
         {
             if (!_listening)
@@ -223,6 +231,7 @@ namespace Tizen.Applications.Messages
         /// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
         /// <exception cref="System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
+        /// <example>
         /// <code>
         /// MessagePort messagePort = new MessagePort("SenderPort", true);
         /// messagePort.MessageReceived += MessageReceivedCallback;
@@ -233,6 +242,7 @@ namespace Tizen.Applications.Messages
         ///     messagePort.Send(message, "ReceiverAppID", "ReceiverPort");
         /// }
         /// </code>
+        /// </example>
         public void Send(Bundle message, string remoteAppId, string remotePortName)
         {
             Send(message, remoteAppId, remotePortName, false);
@@ -250,6 +260,7 @@ namespace Tizen.Applications.Messages
         /// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
         /// <exception cref="System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
         /// <exception cref="System.UnauthorizedAccessException">Thrown when the remote application is not signed with the same certificate.</exception>
+        /// <example>
         /// <code>
         /// MessagePort messagePort = new MessagePort("SenderPort", true);
         /// messagePort.MessageReceived += MessageReceivedCallback;
@@ -260,6 +271,7 @@ namespace Tizen.Applications.Messages
         ///     messagePort.Send(message, "ReceiverAppID", "ReceiverPort", true);
         /// }
         /// </code>
+        /// </example>
         public void Send(Bundle message, string remoteAppId, string remotePortName, bool trusted)
         {
             if (!_listening)
index 561948d..c589638 100755 (executable)
@@ -48,9 +48,11 @@ namespace Tizen.Applications.Messages
         /// <param name="portName">The name of the remote message port</param>
         /// <param name="trusted">If true is the trusted message port of application, otherwise false</param>
         /// <exception cref="System.ArgumentException">Thrown when appId is null or empty, when portName is null or empty</exception>
+        /// <example>
         /// <code>
         /// RemotePort remotePort = new RemotePort("org.tizen.example.messageport", "SenderPort", false);
         /// </code>
+        /// </example>
         public RemotePort(String appId, string portName, bool trusted)
         {
             if (String.IsNullOrEmpty(appId) || String.IsNullOrEmpty(portName))
@@ -137,10 +139,12 @@ namespace Tizen.Applications.Messages
         /// <since_tizen> 4 </since_tizen>
         /// <exception cref="System.InvalidOperationException">Thrown when there is an I/O error</exception>
         /// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+        /// <example>
         /// <code>
         /// Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
         /// bool isRunning = remotePort.isRunning();
         /// </code>
+        /// </example>
         /// <returns> Return true if Remote Port is running </returns>
         public bool IsRunning()
         {
@@ -169,6 +173,7 @@ namespace Tizen.Applications.Messages
         /// <since_tizen> 4 </since_tizen>
         /// <exception cref="System.InvalidOperationException">Thrown when there is an I/O error</exception>
         /// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+        /// <example>
         /// <code>
         /// Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
         /// remotePort.RemotePortStateChanged += RemotePortStateChangedCallback;
@@ -187,6 +192,7 @@ namespace Tizen.Applications.Messages
         ///     }
         /// }
         /// </code>
+        /// </example>
         public event EventHandler<RemotePortStateChangedEventArgs> RemotePortStateChanged
         {
             add
index 2697e15..cc1b40f 100644 (file)
@@ -21,7 +21,7 @@ using System.Diagnostics;
 namespace Tizen.Multimedia.MediaCodec
 {
     /// <summary>
-    /// Provides the means to encode and decode the video and the audio data.
+    /// Provides a means to encode and decode the video and the audio data.
     /// </summary>
     public class MediaCodec : IDisposable
     {
index c3024ce..407ccf7 100644 (file)
@@ -38,7 +38,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
@@ -60,7 +60,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
@@ -82,7 +82,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
@@ -104,7 +104,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
index 35856f5..8acd950 100644 (file)
@@ -37,7 +37,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
@@ -59,7 +59,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
@@ -82,7 +82,7 @@ namespace Tizen.Multimedia.Remoting
         /// </summary>
         /// <exception cref="InvalidOperationException">
         ///     Not connected to a source.<br/>
-        ///     <br/>
+        ///     -or-<br/>
         ///     An internal error occurs.
         /// </exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
index 6649e29..25f8f28 100644 (file)
@@ -28,7 +28,7 @@ namespace Tizen.Multimedia.Util
         /// Initializes a new instance of the <see cref="GifFrame"/> class with a buffer and a delay.
         /// </summary>
         /// <param name="buffer">The raw image buffer to be encoded.</param>
-        /// <param name="delay">The delay for this image, in 0.001 sec units.</param>
+        /// <param name="delay">The delay for this image in milliseconds.</param>
         /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is null.</exception>
         /// <exception cref="ArgumentException">The length of <paramref name="buffer"/> is zero.</exception>
         public GifFrame(byte[] buffer, uint delay)
@@ -55,7 +55,7 @@ namespace Tizen.Multimedia.Util
         /// <summary>
         /// Gets or sets the delay for this image.
         /// </summary>
-        /// <value>Time delay in 0.001 sec units.</value>
+        /// <value>Time delay in milliseconds.</value>
         public uint Delay { get; set; }
     }
 }
index 502e31c..aeb2ab0 100644 (file)
@@ -95,9 +95,7 @@ namespace Tizen.Multimedia.Util
         /// <exception cref="ArgumentException">
         ///     <paramref name="inputFilePath"/> is an empty string.<br/>
         ///     -or-<br/>
-        ///     <paramref name="inputFilePath"/> is not a image file.<br/>
-        ///     -or-<br/>
-        ///     The format of <paramref name="inputFilePath"/> is not <see cref="InputFormat"/>.
+        ///     <paramref name="inputFilePath"/> is not a image file.
         /// </exception>
         /// <exception cref="FileNotFoundException"><paramref name="inputFilePath"/> does not exists.</exception>
         /// <exception cref="UnauthorizedAccessException">The caller does not have required permission to access the path.</exception>
@@ -140,11 +138,7 @@ namespace Tizen.Multimedia.Util
         /// <returns>A task that represents the asynchronous decoding operation.</returns>
         /// <remarks>Only Graphics Interchange Format(GIF) codec returns more than one frame.</remarks>
         /// <exception cref="ArgumentNullException"><paramref name="inputBuffer"/> is null.</exception>
-        /// <exception cref="ArgumentException">
-        ///     <paramref name="inputBuffer"/> is an empty array.<br/>
-        ///     -or-<br/>
-        ///     The format of <paramref name="inputBuffer"/> is not <see cref="InputFormat"/>.
-        /// </exception>
+        /// <exception cref="ArgumentException"><paramref name="inputBuffer"/> is an empty array.</exception>
         /// <exception cref="FileFormatException">The format of <paramref name="inputBuffer"/> is not <see cref="InputFormat"/>.</exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ImageDecoder"/> has already been disposed of.</exception>
         public Task<IEnumerable<BitmapFrame>> DecodeAsync(byte[] inputBuffer)
index d68c82d..3c08449 100644 (file)
@@ -107,7 +107,7 @@ namespace Tizen.Multimedia.Util
         /// <exception cref="ArgumentOutOfRangeException">
         ///     index is less than 0.<br/>
         ///     -or-<br/>
-        ///     index is equal to or greater than Count.
+        ///     index is equal to or greater than <see cref="Count"/>.
         /// </exception>
         public ImageTransform this[int index]
         {
@@ -338,7 +338,7 @@ namespace Tizen.Multimedia.Util
         private Flips _flip;
 
         /// <summary>
-        /// Initializes a new instance of the <see cref="RotateTransform"/> class.
+        /// Initializes a new instance of the <see cref="FlipTransform"/> class.
         /// </summary>
         /// <param name="flip">The value how to flip an image.</param>
         /// <exception cref="ArgumentException"><paramref name="flip"/> is invalid.</exception>
@@ -349,7 +349,7 @@ namespace Tizen.Multimedia.Util
         }
 
         /// <summary>
-        /// Gets or sets the value how to rotate an image.
+        /// Gets or sets the value how to flip an image.
         /// </summary>
         /// <exception cref="ArgumentException"><paramref name="value"/> is invalid.</exception>
         /// <exception cref="ArgumentOutOfRangeException"><paramref name="value"/> is <see cref="Flips.None"/>.</exception>
index 10fe034..8979b25 100755 (executable)
@@ -141,7 +141,7 @@ namespace Tizen.Multimedia.Vision
         ///     -or-<br/>
         ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is invalid.
+        ///     <paramref name="type"/> is invalid.<br/>
         ///     -or-<br/>
         ///     <paramref name="message"/> contains illegal characters.
         /// </exception>
@@ -163,9 +163,9 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="ArgumentException">
         ///     <paramref name="message"/> is too long.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.
+        ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is invalid.
+        ///     <paramref name="type"/> is invalid.<br/>
         ///     -or-<br/>
         ///     <paramref name="message"/> contains illegal characters.
         /// </exception>
@@ -304,9 +304,9 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="ArgumentException">
         ///     <paramref name="message"/> is too long.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.
+        ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is invalid.
+        ///     <paramref name="type"/> is invalid.<br/>
         ///     -or-<br/>
         ///     <paramref name="message"/> contains illegal characters.
         /// </exception>
@@ -334,9 +334,9 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="ArgumentException">
         ///     <paramref name="message"/> is too long.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.
+        ///     <paramref name="type"/> is <see cref="BarcodeType.QR"/>.<br/>
         ///     -or-<br/>
-        ///     <paramref name="type"/> is invalid.
+        ///     <paramref name="type"/> is invalid.<br/>
         ///     -or-<br/>
         ///     <paramref name="message"/> contains illegal characters.
         /// </exception>
index 7fee12d..0785f83 100755 (executable)
@@ -41,9 +41,11 @@ namespace Tizen.Multimedia.Vision
         /// </exception>
         /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="imageFormat"/> is invalid.</exception>
+        /// <example>
         /// <code>
-        /// BarcodeImageConfiguration imageConfig = new BarcodeImageConfiguration(new Size(500, 400), "/opt/usr/test-barcode-generate-new", BarcodeImageFormat.JPG);
+        /// var imageConfig = new BarcodeImageConfiguration(new Size(500, 400), "/opt/usr/test-barcode-generate-new", BarcodeImageFormat.JPG);
         /// </code>
+        /// </example>
         /// <since_tizen> 3 </since_tizen>
         public BarcodeImageConfiguration(Size size, string path, BarcodeImageFormat imageFormat)
         {
@@ -89,9 +91,11 @@ namespace Tizen.Multimedia.Vision
         /// </exception>
         /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="imageFormat"/> is invalid.</exception>
+        /// <example>
         /// <code>
-        /// BarcodeImageConfiguration imageConfig = new BarcodeImageConfiguration(500, 400, "/opt/usr/test-barcode-generate-new", BarcodeImageFormat.JPG);
+        /// var imageConfig = new BarcodeImageConfiguration(500, 400, "/opt/usr/test-barcode-generate-new", BarcodeImageFormat.JPG);
         /// </code>
+        /// </example>
         /// <since_tizen> 3 </since_tizen>
         public BarcodeImageConfiguration(int width, int height, string path, BarcodeImageFormat imageFormat)
             : this(new Size(width, height), path, imageFormat)
index d2e12be..cb8c57f 100644 (file)
@@ -60,7 +60,6 @@ namespace Tizen.Multimedia.Vision
 
         internal EngineConfiguration(string engineType1, string engineType2)
         {
-
             if (IsSupportedEngineType(engineType1, engineType2) == false)
             {
                 throw new NotSupportedException($"{engineType1} or {engineType2} : Not Supported");
@@ -102,7 +101,6 @@ namespace Tizen.Multimedia.Vision
             EngineConfig.SetInt(Handle, key, value).Validate("Failed to set attribute");
         }
 
-
         internal void Set(string key, bool value)
         {
             EngineConfig.SetBool(Handle, key, value).Validate("Failed to set attribute");
index 2ca0f6b..e8634a4 100755 (executable)
@@ -21,6 +21,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="FaceDetector"/> instances.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class FaceDetectionConfiguration : EngineConfiguration
     {
index b2d74b5..1e0991c 100755 (executable)
@@ -39,6 +39,7 @@ namespace Tizen.Multimedia.Vision
         ///     -or-<br/>
         ///     The format of <paramref name="source"/> is not supported.
         /// </exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<Rectangle[]> DetectAsync(MediaVisionSource source)
         {
@@ -54,6 +55,7 @@ namespace Tizen.Multimedia.Vision
         /// <returns>A task that represents the asynchronous detect operation.</returns>
         /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<Rectangle[]> DetectAsync(MediaVisionSource source,
             FaceDetectionConfiguration config)
index 87c2618..69cd91d 100755 (executable)
@@ -21,6 +21,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="FaceRecognizer"/> instances.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class FaceRecognitionConfiguration : EngineConfiguration
     {
index 9ccac51..20a97d7 100644 (file)
@@ -24,6 +24,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents the face recognition model interface.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class FaceRecognitionModel : IDisposable
     {
@@ -79,6 +80,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Gets labels that had been learned by the model.
         /// </summary>
+        /// <exception cref="ObjectDisposedException">The <see cref="FaceRecognitionModel"/> has already been disposed of.</exception>
         /// <since_tizen> 3</since_tizen>
         public int[] Labels
         {
@@ -87,9 +89,7 @@ namespace Tizen.Multimedia.Vision
                 IntPtr unmangedArray = IntPtr.Zero;
                 try
                 {
-                    uint numOfLabels = 0;
-
-                    InteropModel.QueryLabels(Handle, out unmangedArray, out numOfLabels).
+                    InteropModel.QueryLabels(Handle, out unmangedArray, out var numOfLabels).
                         Validate("Failed to retrieve face labels.");
 
                     int[] labels = new int[numOfLabels];
index 5eed1bf..defe2c7 100755 (executable)
@@ -42,6 +42,7 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="source"/> has already been disposed of.</exception>
         /// <exception cref="InvalidOperationException"><paramref name="recognitionModel"/> is untrained model.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FaceRecognitionResult> RecognizeAsync(MediaVisionSource source,
             FaceRecognitionModel recognitionModel)
@@ -64,6 +65,7 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="source"/> has already been disposed of.</exception>
         /// <exception cref="InvalidOperationException"><paramref name="recognitionModel"/> is untrained model.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FaceRecognitionResult> RecognizeAsync(MediaVisionSource source,
             FaceRecognitionModel recognitionModel, Rectangle bound)
@@ -90,6 +92,7 @@ namespace Tizen.Multimedia.Vision
         ///     <paramref name="config"/> has already been disposed of.
         /// </exception>
         /// <exception cref="InvalidOperationException"><paramref name="recognitionModel"/> is untrained model.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FaceRecognitionResult> RecognizeAsync(MediaVisionSource source,
             FaceRecognitionModel recognitionModel, FaceRecognitionConfiguration config)
@@ -97,7 +100,6 @@ namespace Tizen.Multimedia.Vision
             return await InvokeRecognizeAsync(source, recognitionModel, null, config);
         }
 
-
         /// <summary>
         /// Performs face recognition on the source with <see cref="FaceRecognitionModel"/>, <see cref="FaceRecognitionConfiguration"/>
         /// and a bounding box.
@@ -119,6 +121,7 @@ namespace Tizen.Multimedia.Vision
         ///     <paramref name="config"/> has already been disposed of.
         /// </exception>
         /// <exception cref="InvalidOperationException"><paramref name="recognitionModel"/> is untrained model.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FaceRecognitionResult> RecognizeAsync(MediaVisionSource source,
             FaceRecognitionModel recognitionModel, Rectangle bound, FaceRecognitionConfiguration config)
@@ -211,6 +214,7 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="source"/> has already been disposed of.</exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<EyeCondition> RecognizeEyeConditionAsync(MediaVisionSource source,
             Rectangle bound)
@@ -232,6 +236,7 @@ namespace Tizen.Multimedia.Vision
         ///     <paramref name="config"/> has already been disposed of.
         /// </exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<EyeCondition> RecognizeEyeConditionAsync(MediaVisionSource source,
             Rectangle bound, FaceRecognitionConfiguration config)
@@ -271,6 +276,7 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="source"/> has already been disposed of.</exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FacialExpression> RecognizeFacialExpressionAsync(MediaVisionSource source,
             Rectangle bound)
@@ -292,6 +298,7 @@ namespace Tizen.Multimedia.Vision
         ///     <paramref name="config"/> has already been disposed of.
         /// </exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FacialExpression> RecognizeFacialExpressionAsync(MediaVisionSource source,
             Rectangle bound, FaceRecognitionConfiguration config)
index 2f7e7c3..22b529f 100755 (executable)
@@ -49,6 +49,7 @@ namespace Tizen.Multimedia.Vision
         /// </exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
         /// <exception cref="InvalidOperationException"><paramref name="trackingModel"/> is not prepared.</exception>
+        /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<FaceTrackingResult> TrackAsync(MediaVisionSource source,
             FaceTrackingModel trackingModel, bool doLearn)
index 55e6c63..09e3148 100644 (file)
@@ -23,6 +23,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents the face tracking model.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class FaceTrackingModel : IDisposable
     {
@@ -124,7 +125,7 @@ namespace Tizen.Multimedia.Vision
         /// <param name="path">Path to the file to save the model.</param>
         /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
         /// <exception cref="UnauthorizedAccessException">No permission to write to the specified path.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="FaceRecognitionModel"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="FaceTrackingModel"/> has already been disposed of.</exception>
         /// <exception cref="DirectoryNotFoundException">The directory for <paramref name="path"/> does not exist.</exception>
         /// <since_tizen> 3 </since_tizen>
         public void Save(string path)
index 9c86e94..1d6c260 100755 (executable)
@@ -30,7 +30,7 @@ namespace Tizen.Multimedia.Vision
         }
 
         /// <summary>
-        /// Gets the value indicating the recognition is successful.
+        /// Gets the value indicating the tracking is successful.
         /// </summary>
         /// <since_tizen> 3</since_tizen>
         public bool Success { get; }
index 81ca8dd..c4c888c 100755 (executable)
@@ -21,6 +21,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of fill operations of <see cref="ImageObject"/> instances.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class ImageFillConfiguration : EngineConfiguration
     {
index 8e252ea..7187aea 100644 (file)
@@ -23,6 +23,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents an image object.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class ImageObject : IDisposable
     {
@@ -126,6 +127,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Sets the label for the <see cref="ImageObject"/>.
         /// </summary>
+        /// <param name="label">The label which will be assigned to the image object.</param>
         /// <seealso cref="GetLabel"/>
         /// <since_tizen> 3 </since_tizen>
         public void SetLabel(int label)
@@ -135,7 +137,7 @@ namespace Tizen.Multimedia.Vision
 
         /// <summary>
         /// Fills the image object.<br/>
-        /// Extracts data from @a source image which will be needed for recognition of depicted object in @a location.
+        /// Extracts data from source image which will be needed for recognition of depicted object.
         /// </summary>
         /// <param name="source">The source image where image object is depicted.</param>
         /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
@@ -152,7 +154,7 @@ namespace Tizen.Multimedia.Vision
 
         /// <summary>
         /// Fills the image object.<br/>
-        /// Extracts data from @a source image which will be needed for recognition of depicted object in @a location.
+        /// Extracts data from source image which will be needed for recognition of depicted object.
         /// </summary>
         /// <param name="source">The source image where image object is depicted.</param>
         /// <param name="config">The configuration used for extract recognition data from source. This value can be null.</param>
@@ -172,7 +174,8 @@ namespace Tizen.Multimedia.Vision
 
         /// <summary>
         /// Fills the image object.<br/>
-        /// Extracts data from @a source image which will be needed for recognition of depicted object in @a location.
+        /// Extracts data from source image which will be needed for recognition of depicted object
+        /// in location.
         /// </summary>
         /// <param name="source">The source image where image object is depicted.</param>
         /// <param name="rect">Rectangular bound of the image object on the source image.</param>
@@ -190,7 +193,8 @@ namespace Tizen.Multimedia.Vision
 
         /// <summary>
         /// Fills the image object.<br/>
-        /// Extracts data from @a source image which will be needed for recognition of depicted object in @a location.
+        /// Extracts data from source image which will be needed for recognition of depicted object
+        /// in location.
         /// </summary>
         /// <param name="source">The source image where image object is depicted.</param>
         /// <param name="config">The configuration used for extract recognition data from source. This value can be null.</param>
@@ -238,7 +242,7 @@ namespace Tizen.Multimedia.Vision
         /// <param name="path">Path to the file to save the model.</param>
         /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
         /// <exception cref="UnauthorizedAccessException">No permission to write to the specified path.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="FaceRecognitionModel"/> has already been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="ImageObject"/> has already been disposed of.</exception>
         /// <exception cref="DirectoryNotFoundException">The directory for <paramref name="path"/> does not exist.</exception>
         /// <since_tizen> 3 </since_tizen>
         public void Save(string path)
index 77a24a4..60ec4d4 100755 (executable)
@@ -21,6 +21,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="ImageRecognizer"/>.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class ImageRecognitionConfiguration : EngineConfiguration
     {
@@ -32,7 +33,7 @@ namespace Tizen.Multimedia.Vision
         private const string KeyTolerantPartMatchingError = "MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR";
 
         /// <summary>
-        /// A read-only field that represents the default value of <see cref="KeySceneScaleFactor"/>.
+        /// A read-only field that represents the default value of <see cref="SceneScaleFactor"/>.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public static readonly double DefaultSceneScaleFactor = 1.2;
index 5e13c46..537407c 100755 (executable)
@@ -32,6 +32,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// The region of recognized image object on the source image.
         /// </summary>
+        /// <value>The region of recognized image object if successful, otherwise null.</value>
         /// <since_tizen> 3 </since_tizen>
         public Quadrangle Region { get; }
 
index 423d3d6..a7ecd51 100755 (executable)
@@ -43,6 +43,7 @@ namespace Tizen.Multimedia.Vision
         /// <exception cref="ArgumentException"><paramref name="imageObjects"/> has no elements.(The length is zero.)</exception>
         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="source"/> has already been disposed of.</exception>
+        /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<IEnumerable<ImageRecognitionResult>> RecognizeAsync(
             MediaVisionSource source, ImageObject[] imageObjects)
@@ -71,6 +72,7 @@ namespace Tizen.Multimedia.Vision
         ///     -or-<br/>
         ///     <paramref name="config"/> has already been disposed of.
         /// </exception>
+        /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<IEnumerable<ImageRecognitionResult>> RecognizeAsync(MediaVisionSource source,
             ImageObject[] imageObjects, ImageRecognitionConfiguration config)
index 0938b50..ef3dae6 100755 (executable)
@@ -46,6 +46,7 @@ namespace Tizen.Multimedia.Vision
         /// </exception>
         /// <exception cref="ArgumentException"><paramref name="trackingModel"/> has no target.</exception>
         /// <seealso cref="ImageTrackingModel.SetTarget(ImageObject)"/>
+        /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<Quadrangle> TrackAsync(MediaVisionSource source,
             ImageTrackingModel trackingModel)
@@ -75,6 +76,7 @@ namespace Tizen.Multimedia.Vision
         /// </exception>
         /// <exception cref="ArgumentException"><paramref name="trackingModel"/> has no target.</exception>
         /// <seealso cref="ImageTrackingModel.SetTarget(ImageObject)"/>
+        /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
         /// <since_tizen> 3 </since_tizen>
         public static async Task<Quadrangle> TrackAsync(MediaVisionSource source,
             ImageTrackingModel trackingModel, ImageTrackingConfiguration config)
index 52426de..3d0d3d6 100755 (executable)
@@ -21,6 +21,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="ImageTracker"/>.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class ImageTrackingConfiguration : ImageRecognitionConfiguration
     {
index 4ec07c9..f68770a 100644 (file)
@@ -23,6 +23,7 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents the image tracking model interface.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class ImageTrackingModel : IDisposable
     {
index edbccda..9712bb6 100644 (file)
@@ -25,6 +25,10 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents the media vision source to keep information on the image or video frame data as raw buffer.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.barcode_detection</feature>
+    /// <feature>http://tizen.org/feature/vision.barcode_generation</feature>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class MediaVisionSource : IBufferOwner, IDisposable
     {
@@ -68,7 +72,7 @@ namespace Tizen.Multimedia.Vision
         /// Initializes a new instance of the <see cref="MediaVisionSource"/> class based on the <see cref="MediaPacket"/>.
         /// </summary>
         /// <param name="mediaPacket">The <see cref="MediaPacket"/> from which the source will be filled.</param>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">None of the related features are not supported.</exception>
         /// <exception cref="ArgumentNullException"><paramref name="mediaPacket"/> is null.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="mediaPacket"/> has already been disposed of.</exception>
         /// <since_tizen> 3 </since_tizen>
@@ -105,7 +109,7 @@ namespace Tizen.Multimedia.Vision
         /// <param name="height">The height of image.</param>
         /// <param name="colorSpace">The image <see cref="ColorSpace"/>.</param>
         /// <exception cref="NotSupportedException">
-        ///     The feature is not supported.<br/>
+        ///     None of the related features are not supported.<br/>
         ///     -or-<br/>
         ///     <paramref name="colorSpace"/> is not supported.
         /// </exception>
index 0f40436..c3db89e 100755 (executable)
@@ -21,6 +21,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="MovementDetector"/>.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class MovementDetectionConfiguration : SurveillanceEngineConfiguration
     {
@@ -32,11 +34,10 @@ namespace Tizen.Multimedia.Vision
         /// <since_tizen> 3 </since_tizen>
         public static readonly int DefaultThreshold = 10;
 
-
         /// <summary>
         /// Initializes a new instance of the <see cref="MovementDetectionConfiguration"/> class.
         /// </summary>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">The required features are not supported.</exception>
         /// <since_tizen> 3 </since_tizen>
         public MovementDetectionConfiguration()
         {
index a5d214c..27daf49 100755 (executable)
@@ -22,6 +22,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Provides the ability to detect movement on image sources.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <seealso cref="MovementDetectionConfiguration"/>
     /// <since_tizen> 3 </since_tizen>
     public class MovementDetector : SurveillanceEngine
@@ -34,7 +36,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Initializes a new instance of the <see cref="MovementDetector"/> class.
         /// </summary>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">The required features are not supported.</exception>
         /// <since_tizen> 3 </since_tizen>
         public MovementDetector() : base(MovementDetectedEventType)
         {
index 1ab3cc2..f6e75cf 100755 (executable)
@@ -21,6 +21,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="PersonAppearanceDetector"/> instances.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class PersonAppearanceDetectionConfiguration : SurveillanceEngineConfiguration
     {
@@ -35,7 +37,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Initializes a new instance of the <see cref="PersonAppearanceDetectionConfiguration"/> class.
         /// </summary>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">The required features are not supported.</exception>
         /// <since_tizen> 3 </since_tizen>
         public PersonAppearanceDetectionConfiguration()
         {
index 5bac441..c985543 100755 (executable)
@@ -22,6 +22,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Provides the ability to detect person appearance changes on image sources.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <seealso cref="PersonAppearanceDetectionConfiguration"/>
     /// <since_tizen> 3 </since_tizen>
     public class PersonAppearanceDetector : SurveillanceEngine
@@ -38,7 +40,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Initializes a new instance of the <see cref="PersonAppearanceDetector"/> class.
         /// </summary>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">The required features are not supported.</exception>
         /// <since_tizen> 3 </since_tizen>
         public PersonAppearanceDetector() : base(PersonAppearanceEventType)
         {
index d817324..4a28603 100755 (executable)
@@ -21,6 +21,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Represents a configuration of <see cref="PersonRecognizer"/> instances.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class PersonRecognitionConfiguration : SurveillanceEngineConfiguration
     {
@@ -31,7 +33,7 @@ namespace Tizen.Multimedia.Vision
         /// </summary>
         /// <param name="modelPath">Path to the face recognition model.</param>
         /// <exception cref="ArgumentNullException"><paramref name="modelPath"/> is null.</exception>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">The required features are not supported.</exception>
         /// <since_tizen> 3 </since_tizen>
         public PersonRecognitionConfiguration(string modelPath)
         {
index b9f63b2..136aa6d 100755 (executable)
@@ -22,6 +22,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// Provides the ability to recognize person on image sources.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <seealso cref="PersonRecognitionConfiguration"/>
     /// <since_tizen> 3 </since_tizen>
     public class PersonRecognizer : SurveillanceEngine
@@ -36,7 +38,7 @@ namespace Tizen.Multimedia.Vision
         /// <summary>
         /// Initializes a new instance of the <see cref="PersonRecognizer"/> class.
         /// </summary>
-        /// <exception cref="NotSupportedException">The feature is not supported.</exception>
+        /// <exception cref="NotSupportedException">The required features are not supported.</exception>
         /// <since_tizen> 3 </since_tizen>
         public PersonRecognizer() : base(PersonRecognizedEventType)
         {
index dc30eb7..19b005d 100755 (executable)
@@ -30,9 +30,6 @@ namespace Tizen.Multimedia.Vision
         /// <param name="qrMode">Encoding mode for the message.</param>
         /// <param name="ecc">Error correction level.</param>
         /// <param name="version">QR code version. From 1 to 40 inclusive.</param>
-        /// <code>
-        /// var obj = new QrConfiguration(QrMode.Numeric, ErrorCorrectionLevel.Medium, 30);
-        /// </code>
         /// <exception cref="ArgumentOutOfRangeException">
         ///     <paramref name="version"/> is less than 1.<br/>
         ///     -or-<br/>
@@ -43,6 +40,11 @@ namespace Tizen.Multimedia.Vision
         ///     -or-<br/>
         ///     <paramref name="ecc"/> is invalid.
         /// </exception>
+        /// <example>
+        /// <code>
+        /// var qrConfig = new QrConfiguration(QrMode.Numeric, ErrorCorrectionLevel.Medium, 30);
+        /// </code>
+        /// </example>
         /// <since_tizen> 3 </since_tizen>
         public QrConfiguration(QrMode qrMode, ErrorCorrectionLevel ecc, int version)
         {
index 14f5477..2054cb0 100755 (executable)
@@ -28,7 +28,7 @@ namespace Tizen.Multimedia.Vision
         /// <since_tizen> 3 </since_tizen>
         Numeric,
         /// <summary>
-        /// Alphanumeric characters, '$', '%', '*', '+', '-', '.', '/' and ':'.
+        /// Alphanumeric characters, '$', '%', '*', '+', '-', '.', '/', and ':'.
         /// </summary>
         /// <since_tizen> 3</since_tizen>
         AlphaNumeric,
index 708621c..c7c3f6a 100755 (executable)
@@ -36,7 +36,7 @@ namespace Tizen.Multimedia.Vision
         {
             if (points.Length != 4)
             {
-                throw new ArgumentException($"{points} must have 4 elements.");
+                throw new ArgumentException($"{nameof(points)} must have 4 elements.");
             }
 
             Points = points;
index 2758314..52af409 100755 (executable)
@@ -19,6 +19,8 @@ namespace Tizen.Multimedia.Vision
     /// <summary>
     /// SurveillanceEngineConfiguration is a base class for surveillance configurations.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <since_tizen> 3 </since_tizen>
     public class SurveillanceEngineConfiguration : EngineConfiguration
     {
index 6b845b3..7d0f2be 100644 (file)
@@ -24,6 +24,8 @@ namespace Tizen.Multimedia.Vision
     /// SurveillanceEngine is a base class for surveillance event triggers.
     /// Media Vision Surveillance provides the functionality which can be utilized for creation of video surveillance systems.
     /// </summary>
+    /// <feature>http://tizen.org/feature/vision.face_recognition</feature>
+    /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
     /// <seealso cref="MovementDetector"/>
     /// <seealso cref="PersonAppearanceDetector"/>
     /// <seealso cref="PersonRecognizer"/>
@@ -132,7 +134,6 @@ namespace Tizen.Multimedia.Vision
             UnsubscribeEventTrigger(Handle, source.StreamId).Validate("Failed to unsubscribe event trigger");
         }
 
-
         /// <summary>
         /// Releases all the resources used by the <see cref="SurveillanceEngine"/> object.
         /// </summary>
index 6f5d6a1..8c2eba1 100755 (executable)
@@ -29,14 +29,18 @@ namespace Tizen.Multimedia.Vision
     public class SurveillanceSource
     {
         private static int _nextStreamId = int.MinValue;
+        private static readonly object _idLock = new object();
 
         private static int GetNextStreamId()
         {
-            if (_nextStreamId == int.MaxValue)
+            lock (_idLock)
             {
-                return _nextStreamId = int.MinValue;
+                if (_nextStreamId == int.MaxValue)
+                {
+                    _nextStreamId = int.MinValue;
+                }
+                return _nextStreamId++;
             }
-            return _nextStreamId++;
         }
 
         /// <summary>
index 67a1248..af74117 100755 (executable)
@@ -41,9 +41,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
-        /// </code>
+        /// </code></example>
         public Attributes()
         {
             int ret = Interop.IoTConnectivity.Common.Attributes.Create(out _resourceAttributesHandle);
@@ -79,12 +79,12 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>The number of keys.</value>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         /// attributes.Add("brightness", 50);
         /// var count = attributes.Count;
         /// Console.WriteLine("There are {0} keys in the attribute object", count);
-        /// </code>
+        /// </code></example>
         public int Count
         {
             get
@@ -98,14 +98,14 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>Whether an attribute is readonly.</value>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// if (attributes.IsReadOnly)
         ///     Console.WriteLine("Read only attribute");
-        /// </code>
+        /// </code></example>
         public bool IsReadOnly
         {
             get
@@ -119,14 +119,14 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>All the attribute keys.</value>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// var keys = attributes.Keys;
         /// Console.WriteLine("Attribute contains keys {0} and {1}", keys.ElementAt(0), keys.ElementAt(1));
-        /// </code>
+        /// </code></example>
         public ICollection<string> Keys
         {
             get
@@ -140,14 +140,14 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>All the attribute values.</value>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// var values = attributes.Values;
         /// Console.WriteLine("Attribute contains values {0} and {1}", values.ElementAt(0), values.ElementAt(1));
-        /// </code>
+        /// </code></example>
         public ICollection<object> Values
         {
             get
@@ -163,11 +163,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <value>The attribute with the specified key.</value>
         /// <param name="key">The key of the attribute to get or set.</param>
         /// <returns>The element with the specified key.</returns>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
         /// attributes["state"] = "ON";
         /// Console.WriteLine("Attribute value for key 'state' : {0}", attributes["state"]);
-        /// </code>
+        /// </code></example>
         public object this[string key]
         {
             get
@@ -190,10 +190,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="item">The key value pair to add.</param>
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
         /// attributes.Add(new KeyValuePair<string, object> ("state", "ON"));
-        /// ]]></code>
+        /// ]]></code></example>
         public void Add(KeyValuePair<string, object> item)
         {
             Add(item.Key, item.Value);
@@ -206,10 +206,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="key">The key representing the attribute.</param>
         /// <param name="value">The value representing the attribute.</param>
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
         /// attributes.Add("brightness", 50);
-        /// </code>
+        /// </code></example>
         public void Add(string key, object value)
         {
             int ret = 0;
@@ -299,11 +299,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
         /// attributes.Add("brightness", 50);
         /// attributes.Clear();
-        /// </code>
+        /// </code></example>
         public void Clear()
         {
             foreach (string key in _attributes.Keys)
@@ -324,14 +324,14 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="item">The status key value pair.</param>
         /// <returns>true if exists. Otherwise, false.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// if (attributes.Contains(new KeyValuePair<string, object> ("dim", 10))
         ///     Console.WriteLine("Attribute conatins pair ('dim', 10)");
-        /// ]]></code>
+        /// ]]></code></example>
         public bool Contains(KeyValuePair<string, object> item)
         {
             return _attributes.Contains(item);
@@ -343,14 +343,14 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="key">The status key to look for.</param>
         /// <returns>true if exists. Otherwise, false.</returns>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// if (attributes.ContainsKey("dim"))
         ///     Console.WriteLine("Attribute conatins key : dim");
-        /// </code>
+        /// </code></example>
         public bool ContainsKey(string key)
         {
             return _attributes.ContainsKey(key);
@@ -362,7 +362,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="array">The destination array.</param>
         /// <param name="arrayIndex">The zero-based index in an array at which copying begins.</param>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
@@ -371,7 +371,7 @@ namespace Tizen.Network.IoTConnectivity
         /// int index = 0;
         /// attributes.CopyTo(dest, index);
         /// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
-        /// ]]></code>
+        /// ]]></code></example>
         public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
         {
             _attributes.CopyTo(array, arrayIndex);
@@ -382,7 +382,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns> An enumerator that can be used to iterate through the collection.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
@@ -391,7 +391,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
         {
             return _attributes.GetEnumerator();
@@ -407,14 +407,14 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// if (attributes.Remove(new KeyValuePair<string, object>("dim", 10)))
         ///     Console.WriteLine("Remove was successful");
-        /// ]]></code>
+        /// ]]></code></example>
         public bool Remove(KeyValuePair<string, object> item)
         {
             return Remove(item.Key);
@@ -430,14 +430,14 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" },
         ///     { "dim", 10 }
         /// };
         /// if (attributes.Remove("state"))
         ///     Console.WriteLine("Remove was successful");
-        /// </code>
+        /// </code></example>
         public bool Remove(string key)
         {
             int ret = Interop.IoTConnectivity.Common.Attributes.Remove(_resourceAttributesHandle, key);
@@ -459,7 +459,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="key">The key whose value to get.</param>
         /// <param name="value"> The value associated with the specified key.</param>
         /// <returns> true if the attributes collection contains an element with the specified key, otherwise, false.</returns>
-        /// <code>
+        /// <example><code>
         /// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
         ///     { "state", "ON" }
         /// };
@@ -467,7 +467,7 @@ namespace Tizen.Network.IoTConnectivity
         /// var isPresent = attributes.TryGetValue("state", out value);
         /// if (isPresent)
         ///     Console.WriteLine("value : {0}", value);
-        /// </code>
+        /// </code></example>
         public bool TryGetValue(string key, out object value)
         {
             return _attributes.TryGetValue(key, out value);
index 1ea02a5..5d8014b 100755 (executable)
@@ -87,10 +87,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <pre>
         /// Initialize() should be called to initialize.
         /// </pre>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityClientManager.Initialize();
         /// IoTConnectivityClientManager.TimeOut = 120;
-        /// </code>
+        /// </code></example>
         public static int TimeOut
         {
             get
@@ -129,10 +129,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <pre>
         /// Initialize() should be called to initialize.
         /// </pre>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityClientManager.Initialize();
         /// IoTConnectivityClientManager.PollingInterval = 100;
-        /// </code>
+        /// </code></example>
         public static int PollingInterval
         {
             get
@@ -179,10 +179,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
-        /// <code>
+        /// <example><code>
         /// string filePath = "../../res/iotcon-test-svr-db-client.dat";
         /// IoTConnectivityClientManager.Initialize(filePath);
-        /// </code>
+        /// </code></example>
         public static void Initialize(string filePath)
         {
             int ret = Interop.IoTConnectivity.Client.IoTCon.Initialize(filePath);
@@ -205,9 +205,9 @@ namespace Tizen.Network.IoTConnectivity
         /// Initialize() should be called to initialize.
         /// </pre>
         /// <seealso cref="Initialize(string)"/>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityClientManager.Deinitialize();
-        /// </code>
+        /// </code></example>
         public static void Deinitialize()
         {
             s_presenceListenerId = 1;
@@ -241,9 +241,9 @@ namespace Tizen.Network.IoTConnectivity
         /// Initialize() should be called to initialize.
         /// </pre>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityClientManager.InvokePolling();
-        /// </code>
+        /// </code></example>
         public static void InvokePolling()
         {
             int ret = Interop.IoTConnectivity.Client.IoTCon.InvokePolling();
@@ -287,7 +287,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// EventHandler<PresenceReceivedEventArgs> handler = (sender, e) => {
         ///     Console.Log("PresenceReceived, presence id :" + e.PresenceId);
         /// }
@@ -298,7 +298,7 @@ namespace Tizen.Network.IoTConnectivity
         /// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
         /// // Do not forget to remove these event handlers when they are not required any more.
         /// int id = IoTConnectivityClientManager.StartReceivingPresence(IoTConnectivityClientManager.MulticastAddress, "oic.iot.door");
-        /// ]]></code>
+        /// ]]></code></example>
         public static int StartReceivingPresence(string hostAddress, string resourceType)
         {
             Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
@@ -384,7 +384,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// EventHandler<PresenceReceivedEventArgs> handler = (sender, e) => {
         ///     Console.Log("PresenceReceived, presence id :" + e.PresenceId);
         /// }
@@ -399,7 +399,7 @@ namespace Tizen.Network.IoTConnectivity
         /// IoTConnectivityClientManager.PresenceReceived -= handler;
         /// IoTConnectivityClientManager.FindingErrorOccurred -= errorHandler;
         /// IoTConnectivityClientManager.StopReceivingPresence(id);
-        /// ]]></code>
+        /// ]]></code></example>
         public static void StopReceivingPresence(int presenceId)
         {
             if (!s_presenceHandlesMap.ContainsKey((IntPtr)presenceId))
@@ -438,12 +438,9 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <remarks>
-        /// <para>Sends request to find a resource of <paramref name="hostAddress" /> server with <paramref name="resourceType" />.
+        /// <para>Sends request to find a resource of <paramref name="hostAddress" /> server with <paramref name="query" />.
         /// If succeeded, <see cref="ResourceFound"/> event handler will be triggered with information of the resource.</para>
-        /// <para><paramref name="hostAddress" /> could be <see cref="MulticastAddress"/> for the IPv4 multicast.
-        /// The length of <paramref name="resourceType" /> should be less than or equal to 61. The <paramref name="resourceType" /> must start
-        /// with a lowercase alphabetic character, followed by a sequence
-        /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.</para>
+        /// <para><paramref name="hostAddress" /> could be <see cref="MulticastAddress"/> for the IPv4 multicast.</para>
         /// </remarks>
         /// <privilege>http://tizen.org/privilege/internet</privilege>
         /// <privlevel>public</privlevel>
@@ -462,7 +459,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// EventHandler<ResourceFoundEventArgs> handler = (sender, e) => {
         ///     Console.Log("Found resource at host address :" + e.Resource.HostAddress + ", uri :" + e.Resource.UriPath);
         /// }
@@ -475,7 +472,7 @@ namespace Tizen.Network.IoTConnectivity
         /// query.Type = "oic.iot.door";
         /// // Do not forget to remove these event handlers when they are not required any more.
         /// int id = IoTConnectivityClientManager.StartFindingResource(null, query);
-        /// ]]></code>
+        /// ]]></code></example>
         public static int StartFindingResource(string hostAddress, ResourceQuery query = null)
         {
             Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
@@ -573,7 +570,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// EventHandler<DeviceInformationFoundEventArgs> handler = (sender, e) => {
         ///     Console.Log("Device information found, id : " + e.RequestId + ", name : " + e.Name);
         /// }
@@ -584,7 +581,7 @@ namespace Tizen.Network.IoTConnectivity
         /// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
         /// // Do not forget to remove these event handlers when they are not required any more.
         /// int id = IoTConnectivityClientManager.StartFindingDeviceInformation(IoTConnectivityClientManager.MulticastAddress);
-        /// ]]></code>
+        /// ]]></code></example>
         public static int StartFindingDeviceInformation(string hostAddress, ResourceQuery query = null)
         {
             Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
@@ -673,7 +670,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// EventHandler<PlatformInformationFoundEventArgs> handler = (sender, e) => {
         ///     Console.Log("PlatformInformationFound :" + e.RequestId);
         /// }
@@ -684,7 +681,7 @@ namespace Tizen.Network.IoTConnectivity
         /// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
         /// // Do not forget to remove these event handlers when they are not required any more.
         /// int id = IoTConnectivityClientManager.StartFindingPlatformInformation(IoTConnectivityClientManager.MulticastAddress);
-        /// ]]></code>
+        /// ]]></code></example>
         public static int StartFindingPlatformInformation(string hostAddress, ResourceQuery query = null)
         {
             Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
index 6313cbc..0bfed80 100755 (executable)
@@ -49,10 +49,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access</exception>
-        /// <code>
+        /// <example><code>
         /// string filePath = "../../res/iotcon-test-svr-db-server.dat";
         /// IoTConnectivityServerManager.Initialize(filePath);
-        /// </code>
+        /// </code></example>
         public static void Initialize(string filePath)
         {
             int ret = Interop.IoTConnectivity.Client.IoTCon.Initialize(filePath);
@@ -75,9 +75,9 @@ namespace Tizen.Network.IoTConnectivity
         /// Initialize() should be called to initialize.
         /// </pre>
         /// <seealso cref="Initialize(string)"/>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityServerManager.Deinitialize();
-        /// </code>
+        /// </code></example>
         public static void Deinitialize()
         {
             _resources.Clear();
@@ -105,7 +105,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes types = new ResourceTypes(new List<string>(){ "org.tizen.light" });
         /// Attributes attributes = new Attributes { { "state", "ON" }};
         /// Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
@@ -114,7 +114,7 @@ namespace Tizen.Network.IoTConnectivity
         /// } catch(Exception ex) {
         ///     Console.Log("Exception caught : " + ex.Message);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public static void RegisterResource(Resource resource)
         {
             Log.Info(IoTConnectivityErrorFactory.LogTag, "...");
@@ -172,7 +172,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="LiteResource"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes types = new ResourceTypes(new List<string>(){ "org.tizen.light" });
         /// Attributes attributes = new Attributes { { "state", "ON" }};
         /// Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
@@ -182,7 +182,7 @@ namespace Tizen.Network.IoTConnectivity
         /// } catch(Exception ex) {
         ///     Console.Log("Exception caught : " + ex.Message);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public static void UnregisterResource(Resource resource)
         {
             if (resource != null)
@@ -221,13 +221,13 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
-        /// <code>
+        /// <example><code>
         /// try {
         ///     IoTConnectivityServerManager.StartSendingPresence(120);
         /// } catch(Exception ex) {
         ///     Console.Log("Exception caught : " + ex.Message);
         /// }
-        /// </code>
+        /// </code></example>
         public static void StartSendingPresence(uint time)
         {
             int ret = Interop.IoTConnectivity.Server.IoTCon.StartPresence(time);
@@ -259,9 +259,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityServerManager.StopSendingPresence();
-        /// </code>
+        /// </code></example>
         public static void StopSendingPresence()
         {
             int ret = Interop.IoTConnectivity.Server.IoTCon.StopPresence();
@@ -288,9 +288,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
-        /// <code>
+        /// <example><code>
         /// IoTConnectivityServerManager.SetDeviceName("my-tizen");
-        /// </code>
+        /// </code></example>
         public static void SetDeviceName(string deviceName)
         {
             int ret = Interop.IoTConnectivity.Server.IoTCon.SetDeviceName(deviceName);
index 34d0418..4627871 100755 (executable)
@@ -49,13 +49,13 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="ResourceTypes"/>
         /// <seealso cref="ResourcePolicy"/>
         /// <seealso cref="Attributes"/>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// List<string> list = new List<string>() { "org.tizen.light" };
         /// Attributes attributes = new Attributes() {
         ///     { "state", "ON" }
         /// };
         /// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable, attributes);
-        /// ]]></code>
+        /// ]]></code></example>
         public LiteResource(string uri, ResourceTypes types, ResourcePolicy policy, Attributes attribs = null)
             : base(uri, types, new ResourceInterfaces(new string[] { ResourceInterfaces.DefaultInterface }), policy)
         {
@@ -67,7 +67,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>The attributes of the lite resource.</value>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// List<string> list = new List<string>() { "org.tizen.light" };
         /// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable);
         /// Attributes attributes = new Attributes() {
@@ -78,7 +78,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public Attributes Attributes { get; set; }
 
         /// <summary>
@@ -90,7 +90,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </remarks>
         /// <param name="attribs">The new attributes of the lite resource.</param>
         /// <returns>true to accept post request, false to reject it.</returns>
-        /// <code>
+        /// <example><code>
         /// public class MyLightResource : LiteResource
         /// {
         ///     protected override bool OnPost(Attributes attributes)
@@ -102,7 +102,7 @@ namespace Tizen.Network.IoTConnectivity
         ///         return false;
         ///     }
         /// }
-        /// </code>
+        /// </code></example>
         protected virtual bool OnPost(Attributes attribs)
         {
             return true;
index 0e60112..31bd4d5 100755 (executable)
@@ -42,9 +42,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code>
+        /// <example><code>
         /// Representation repr = new Representation();
-        /// </code>
+        /// </code></example>
         public Representation()
         {
             int ret = Interop.IoTConnectivity.Common.Representation.Create(out _representationHandle);
@@ -93,11 +93,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// Representation repr = new Representation();
         /// repr.UriPath = "/a/light";
         /// Console.WriteLine("URI is {0}", repr.UriPath);  //Getter
-        /// </code>
+        /// </code></example>
         public string UriPath
         {
             get
@@ -133,7 +133,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Representation repr = new Representation();
         /// ResourceTypes types = new ResourceTypes (new List<string>(){ "org.tizen.light" });
         /// repr.Type = types;
@@ -142,7 +142,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("Type is {0}", item);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public ResourceTypes Type
         {
             get
@@ -178,7 +178,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Representation repr = new Representation();
         /// ResourceInterfaces ifaces = new ResourceInterfaces (new List<string>(){ ResourceInterfaces.DefaultInterface });
         /// repr.Interface = ifaces;
@@ -187,7 +187,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("Interface is {0}", iface);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public ResourceInterfaces Interface
         {
             get
@@ -223,7 +223,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// Representation repr = new Representation();
         /// Attributes attributes = new Attributes() {
         ///     { "state", "ON" },
@@ -234,7 +234,7 @@ namespace Tizen.Network.IoTConnectivity
         /// string strval = newAttributes["state"] as string;
         /// int intval = (int)newAttributes["dim"];
         /// Console.WriteLine("attributes are {0} and {1}", strval, intval);
-        /// </code>
+        /// </code></example>
         public Attributes Attributes
         {
             get
@@ -268,7 +268,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>List of Child resource representation.</value>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// Representation repr = new Representation();
         /// Representation child1 = new Representation();
         /// ResourceTypes types1 = new ResourceTypes(new List<string>() { "org.tizen.light" });
@@ -284,7 +284,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("Exception caught : " + ex.Message);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public ICollection<Representation> Children
         {
             get
index 3369eff..20e5c76 100755 (executable)
@@ -57,7 +57,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="ResourcePolicy"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// // Create a class which inherits from Resource
         /// public class DoorResource : Resource
         /// {
@@ -77,7 +77,7 @@ namespace Tizen.Network.IoTConnectivity
         /// ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.DefaultInterface });
         /// ResourceTypes types = new ResourceTypes(new List<string>(){ "oic.iot.door.new" });
         /// Resource resource = new DoorResource("/door/uri1", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
-        /// ]]></code>
+        /// ]]></code></example>
         protected Resource(string uri, ResourceTypes types, ResourceInterfaces interfaces, ResourcePolicy policy)
         {
             UriPath = uri;
@@ -173,7 +173,7 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.DefaultInterface });
         /// ResourceTypes types = new ResourceTypes(new List<string>(){ "oic.iot.door.new.notify" });
         /// Resource resource = new DoorResource("/door/uri/new/notify", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
@@ -186,7 +186,7 @@ namespace Tizen.Network.IoTConnectivity
         ///      _attribute, 1 }
         /// };
         /// resource.Notify(repr, QualityOfService.High);
-        /// ]]></code>
+        /// ]]></code></example>
         public void Notify(Representation representation, QualityOfService qos)
         {
             int ret = (int)IoTConnectivityError.None;
index 2cbaef2..b0dca2a 100755 (executable)
@@ -73,9 +73,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="Remove(string)"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces();
-        /// </code>
+        /// </code></example>
         public ResourceInterfaces()
         {
             int ret = Interop.IoTConnectivity.Common.ResourceInterfaces.Create(out _resourceInterfacesHandle);
@@ -95,10 +95,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
         ///     { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
-        /// ]]></code>
+        /// ]]></code></example>
         public ResourceInterfaces(IEnumerable<string> ifaces)
         {
             int ret = Interop.IoTConnectivity.Common.ResourceInterfaces.Create(out _resourceInterfacesHandle);
@@ -157,11 +157,11 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>Count of interfaces in the list.</value>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
         ///     { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
         /// Console.WriteLine("There are {0} interfaces", resourceInterfaces.Count);
-        /// ]]></code>
+        /// ]]></code></example>
         public int Count
         {
             get
@@ -183,10 +183,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces();
         /// resourceInterfaces.Add(ResourceInterfaces.BatchInterface);
-        /// </code>
+        /// </code></example>
         public void Add(string item)
         {
             if (IsValid(item))
@@ -216,10 +216,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.BatchInterface });
         /// resourceInterfaces.Add(ResourceInterfaces.BatchInterface);
-        /// ]]></code>
+        /// ]]></code></example>
         public void Remove(string item)
         {
             bool isRemoved = _resourceInterfaces.Remove(item);
@@ -241,14 +241,14 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>The enumerator.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
         ///     { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
         /// foreach(string item in resourceInterfaces)
         /// {
         ///     Console.WriteLine("Interface : {0}", item);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public IEnumerator<string> GetEnumerator()
         {
             return _resourceInterfaces.GetEnumerator();
@@ -259,14 +259,14 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>The enumerator.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
         ///     { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
         /// foreach(string item in resourceInterfaces)
         /// {
         ///     Console.WriteLine("Interface : {0}", item);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _resourceInterfaces.GetEnumerator();
index d5aad1d..23279a7 100755 (executable)
@@ -48,9 +48,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="Remove(ushort)"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
-        /// </code>
+        /// </code></example>
         public ResourceOptions()
         {
             int ret = Interop.IoTConnectivity.Common.Options.Create(out _resourceOptionsHandle);
@@ -98,13 +98,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>All the Option keys.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "sample-data");
         /// options.Add(2055, "sample value");
         /// var keys = options.Keys;
         /// Console.WriteLine("Resource options contains keys {0} and {1}", keys.ElementAt(0), keys.ElementAt(1));
-        /// </code>
+        /// </code></example>
         public ICollection<ushort> Keys
         {
             get
@@ -118,13 +118,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>All the Option values.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "sample-data");
         /// options.Add(2055, "sample value");
         /// var values = options.Values;
         /// Console.WriteLine("Resource options contains values {0} and {1}", values.ElementAt(0), values.ElementAt(1));
-        /// </code>
+        /// </code></example>
         public ICollection<string> Values
         {
             get
@@ -138,13 +138,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>The number of options.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "sample-data");
         /// options.Add(2055, "sample value");
         /// var count = options.Count;
         /// Console.WriteLine("There are {0} keys in the options object", count);
-        /// </code>
+        /// </code></example>
         public int Count
         {
             get
@@ -158,11 +158,11 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>Whether the collection is readonly.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// if (options.IsReadOnly)
         ///     Console.WriteLine("Read only options");
-        /// </code>
+        /// </code></example>
         public bool IsReadOnly
         {
             get
@@ -178,11 +178,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <value>The option data.</value>
         /// <param name="key">The option ID to get or set.</param>
         /// <returns>The option with the specified ID.</returns>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options[2055] = "sample-data";
         /// Console.WriteLine("Option has : {0}", options[2055]);
-        /// </code>
+        /// </code></example>
         public string this[ushort key]
         {
             get
@@ -201,12 +201,12 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="key">The key to look for.</param>
         /// <returns>true if exists. Otherwise, false.</returns>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "sample-data");
         /// if (options.ContainsKey(2050))
         ///     Console.WriteLine("options conatins key : 2050");
-        /// </code>
+        /// </code></example>
         public bool ContainsKey(ushort key)
         {
             return _options.ContainsKey(key);
@@ -227,10 +227,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="Remove(ushort)"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "sample-data");
-        /// </code>
+        /// </code></example>
         public void Add(ushort key, string value)
         {
             int ret = (int)IoTConnectivityError.InvalidParameter;
@@ -261,11 +261,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="Add(ushort, string)"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "12345");
         /// var result = options.Remove(2050);
-        /// </code>
+        /// </code></example>
         public bool Remove(ushort key)
         {
             int ret = Interop.IoTConnectivity.Common.Options.Remove(_resourceOptionsHandle, key);
@@ -287,14 +287,14 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="key">The option ID.</param>
         /// <param name="value">Value corresponding to option ID.</param>
         /// <returns>True if the key exists, false otherwise.</returns>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "12345");
         /// string value;
         /// var isPresent = options.TryGetValue(2050, out value);
         /// if (isPresent)
         ///     Console.WriteLine("value : {0}", value);
-        /// </code>
+        /// </code></example>
         public bool TryGetValue(ushort key, out string value)
         {
             return _options.TryGetValue(key, out value);
@@ -307,10 +307,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="item">The key value pair.</param>
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <seealso cref="Remove(KeyValuePair{ushort, string})"/>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
-        /// ]]></code>
+        /// ]]></code></example>
         public void Add(KeyValuePair<ushort, string> item)
         {
             Add(item.Key, item.Value);
@@ -322,12 +322,12 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(2050, "12345");
         /// options.Add(2055, "sample");
         /// options.Clear();
-        /// </code>
+        /// </code></example>
         public void Clear()
         {
             foreach (ushort key in Keys)
@@ -348,13 +348,13 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="item">The key value pair.</param>
         /// <returns>True if exists. Otherwise, false.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
         /// var isPresent = options.Contains(new KeyValuePair<ushort, string>(2050, "12345"));
         /// if (isPresent)
         ///     Console.WriteLine("Key value pair is present");
-        /// ]]></code>
+        /// ]]></code></example>
         public bool Contains(KeyValuePair<ushort, string> item)
         {
             return _options.Contains(item);
@@ -366,13 +366,13 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="array">The destination array.</param>
         /// <param name="arrayIndex">Index parameter.</param>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
         /// KeyValuePair<ushort, string>[] dest = new KeyValuePair<ushort, string>[options.Count];
         /// options.CopyTo(dest, 0);
         /// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
-        /// ]]></code>
+        /// ]]></code></example>
         public void CopyTo(KeyValuePair<ushort, string>[] array, int arrayIndex)
         {
             _options.CopyTo(array, arrayIndex);
@@ -387,11 +387,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <seealso cref="Add(KeyValuePair{ushort, string})"/>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
         /// var result = options.Remove(new KeyValuePair<ushort, string>(2050, "12345"));
-        /// ]]></code>
+        /// ]]></code></example>
         public bool Remove(KeyValuePair<ushort, string> item)
         {
             return Remove(item.Key);
@@ -402,7 +402,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>Enumerator to option pairs.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(new KeyValuePair<ushort, string>(2050, "sample1"));
         /// options.Add(new KeyValuePair<ushort, string>(2055, "sample2"));
@@ -410,7 +410,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public IEnumerator<KeyValuePair<ushort, string>> GetEnumerator()
         {
             return _options.GetEnumerator();
@@ -432,7 +432,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>Enumerator to option pairs.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceOptions options = new ResourceOptions();
         /// options.Add(new KeyValuePair<ushort, string>(2050, "sample1"));
         /// options.Add(new KeyValuePair<ushort, string>(2055, "sample2"));
@@ -440,7 +440,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _options.GetEnumerator();
index 1f1a478..5e3dde2 100755 (executable)
@@ -42,9 +42,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="Remove(string)"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
-        /// </code>
+        /// </code></example>
         public ResourceQuery()
         {
             int ret = Interop.IoTConnectivity.Common.Query.Create(out _resourceQueryHandle);
@@ -94,11 +94,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Type = "org.tizen.light";
         /// Console.WriteLine("Type of query : {0}", query.Type);
-        /// </code>
+        /// </code></example>
         public string Type
         {
             get
@@ -137,10 +137,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Interface = ResourceInterfaces.LinkInterface;
-        /// </code>
+        /// </code></example>
         public string Interface
         {
             get
@@ -173,13 +173,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>All the query keys.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key", "value");
         /// query.Add("newKey", "sample value");
         /// var keys = query.Keys;
         /// Console.WriteLine("Resource query contains keys {0} and {1}", keys.ElementAt(0), keys.ElementAt(1));
-        /// </code>
+        /// </code></example>
         public ICollection<string> Keys
         {
             get
@@ -193,13 +193,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>All the query values.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key", "value");
         /// query.Add("newKey", "sample value");
         /// var values = query.Values;
         /// Console.WriteLine("Resource query contains values {0} and {1}", values.ElementAt(0), values.ElementAt(1));
-        /// </code>
+        /// </code></example>
         public ICollection<string> Values
         {
             get
@@ -213,13 +213,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>The number of query elements.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key", "value");
         /// query.Add("newKey", "sample value");
         /// var count = query.Count;
         /// Console.WriteLine("There are {0} keys in the query object", count);
-        /// </code>
+        /// </code></example>
         public int Count
         {
             get
@@ -233,11 +233,11 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>Whether the collection is readonly.</value>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// if (query.IsReadOnly)
         ///     Console.WriteLine("Read only query");
-        /// </code>
+        /// </code></example>
         public bool IsReadOnly
         {
             get
@@ -253,11 +253,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <value>The query data.</value>
         /// <param name="key">The query key to get or set.</param>
         /// <returns>The query with the specified key.</returns>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query["key1"] = "sample-data";
         /// Console.WriteLine("query has : {0}", query["key1"]);
-        /// </code>
+        /// </code></example>
         public string this[string key]
         {
             get
@@ -277,12 +277,12 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="key">The key to look for.</param>
         /// <returns>true if exists. Otherwise, false.</returns>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key1", "value1");
         /// if (query.ContainsKey("key1"))
         ///     Console.WriteLine("query conatins key : key1");
-        /// </code>
+        /// </code></example>
         public bool ContainsKey(string key)
         {
             return _query.ContainsKey(key);
@@ -302,10 +302,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key1", "value1");
-        /// </code>
+        /// </code></example>
         public void Add(string key, string value)
         {
             if (CanAddQuery(key, value))
@@ -336,11 +336,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key1", "value1");
         /// var result = query.Remove("key1");
-        /// </code>
+        /// </code></example>
         public bool Remove(string key)
         {
             int ret = Interop.IoTConnectivity.Common.Query.Remove(_resourceQueryHandle, key);
@@ -362,14 +362,14 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="key">The query key.</param>
         /// <param name="value">Value corresponding to query key.</param>
         /// <returns>True if the key exists, false otherwise.</returns>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key1", "value1");
         /// string value;
         /// var isPresent = query.TryGetValue("key1", out value);
         /// if (isPresent)
         ///     Console.WriteLine("value : {0}", value);
-        /// </code>
+        /// </code></example>
         public bool TryGetValue(string key, out string value)
         {
             return _query.TryGetValue(key, out value);
@@ -382,10 +382,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="item">The key value pair.</param>
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <seealso cref="Remove(KeyValuePair{string, string})"/>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add(new KeyValuePair<string, string>("key1", "value1"));
-        /// ]]></code>
+        /// ]]></code></example>
         public void Add(KeyValuePair<string, string> item)
         {
             Add(item.Key, item.Value);
@@ -398,12 +398,12 @@ namespace Tizen.Network.IoTConnectivity
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add("key1", "value1");
         /// query.Add("key2", "value2");
         /// query.Clear();
-        /// </code>
+        /// </code></example>
         public void Clear()
         {
             foreach (string key in _query.Keys)
@@ -424,13 +424,13 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="item">The key value pair.</param>
         /// <returns>True if exists. Otherwise, false.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add(new KeyValuePair<string, string>("key1", "value1"));
         /// var isPresent = query.Contains(new KeyValuePair<string, string>("key1", "value1"));
         /// if (isPresent)
         ///     Console.WriteLine("Key value pair is present");
-        /// ]]></code>
+        /// ]]></code></example>
         public bool Contains(KeyValuePair<string, string> item)
         {
             return _query.Contains(item);
@@ -442,13 +442,13 @@ namespace Tizen.Network.IoTConnectivity
         /// <since_tizen> 3 </since_tizen>
         /// <param name="array">The destination array.</param>
         /// <param name="arrayIndex">Index parameter.</param>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add(new KeyValuePair<string, string>("key1", "value1"));
         /// KeyValuePair<string, string>[] dest = new KeyValuePair<string, string>[query.Count];
         /// query.CopyTo(dest, 0);
         /// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
-        /// ]]></code>
+        /// ]]></code></example>
         public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
         {
             _query.CopyTo(array, arrayIndex);
@@ -463,11 +463,11 @@ namespace Tizen.Network.IoTConnectivity
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <seealso cref="Add(KeyValuePair{string, string})"/>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add(new KeyValuePair<string, string>("key1", "value1"));
         /// var result = query.Remove(new KeyValuePair<string, string>("key1", "value1"));
-        /// ]]></code>
+        /// ]]></code></example>
         public bool Remove(KeyValuePair<string, string> item)
         {
             return Remove(item.Key);
@@ -478,7 +478,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>Enumerator to query pairs.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add(new KeyValuePair<string, string>("key1", "value1"));
         /// query.Add(new KeyValuePair<string, string>("key2", "value2"));
@@ -486,7 +486,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
         {
             return _query.GetEnumerator();
@@ -497,7 +497,7 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>The enumerator to the query pairs.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceQuery query = new ResourceQuery();
         /// query.Add(new KeyValuePair<string, string>("key1", "value1"));
         /// query.Add(new KeyValuePair<string, string>("key2", "value2"));
@@ -505,7 +505,7 @@ namespace Tizen.Network.IoTConnectivity
         /// {
         ///     Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _query.GetEnumerator();
index f0f2c7f..1896217 100755 (executable)
@@ -43,9 +43,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <seealso cref="Remove(string)"/>
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceTypes types = new ResourceTypes();
-        /// </code>
+        /// </code></example>
         public ResourceTypes()
         {
             int ret = Interop.IoTConnectivity.Common.ResourceTypes.Create(out _resourceTypeHandle);
@@ -63,9 +63,9 @@ namespace Tizen.Network.IoTConnectivity
         /// <param name="types">List of resource types.</param>
         /// <feature>http://tizen.org/feature/iot.ocf</feature>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
-        /// ]]></code>
+        /// ]]></code></example>
         public ResourceTypes(IEnumerable<string> types)
         {
             int ret = Interop.IoTConnectivity.Common.ResourceTypes.Create(out _resourceTypeHandle);
@@ -117,10 +117,10 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>Count of types in the list.</value>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
         /// Console.WriteLine("There are {0} items", types.Count);
-        /// ]]></code>
+        /// ]]></code></example>
         public int Count
         {
             get
@@ -145,10 +145,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code>
+        /// <example><code>
         /// ResourceTypes resourceTypes = new ResourceTypes();
         /// resourceTypes.Add("org.tizen.light");
-        /// </code>
+        /// </code></example>
         public void Add(string item)
         {
             if (IsValid(item))
@@ -178,10 +178,10 @@ namespace Tizen.Network.IoTConnectivity
         /// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
         /// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
         /// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
         /// resourceTypes.Remove("oic.if.room");
-        /// ]]></code>
+        /// ]]></code></example>
         public void Remove(string item)
         {
             int ret = Interop.IoTConnectivity.Common.ResourceTypes.Remove(_resourceTypeHandle, item);
@@ -199,13 +199,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>The enumerator.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
         /// foreach(string item in resourceTypes)
         /// {
         ///     Console.WriteLine("Type : {0}", item);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         public IEnumerator<string> GetEnumerator()
         {
             return _resourceTypes.GetEnumerator();
@@ -216,13 +216,13 @@ namespace Tizen.Network.IoTConnectivity
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>The enumerator.</returns>
-        /// <code><![CDATA[
+        /// <example><code><![CDATA[
         /// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
         /// foreach(string item in resourceTypes)
         /// {
         ///     Console.WriteLine("Type : {0}", item);
         /// }
-        /// ]]></code>
+        /// ]]></code></example>
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _resourceTypes.GetEnumerator();
index ce8306e..eacb675 100755 (executable)
@@ -32,9 +32,9 @@ namespace Tizen.Network.IoTConnectivity
         /// Constructor of Response.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <code>
+        /// <example><code>
         /// Response response = new Response();
-        /// </code>
+        /// </code></example>
         public Response() { }
 
         /// <summary>
old mode 100644 (file)
new mode 100755 (executable)
index 7fa3669..00deff3
@@ -77,10 +77,12 @@ namespace Tizen.System
     /// http://tizen.org/privilege/haptic
     /// For controlling the sound, privilege is not needed.
     /// </privilege>
+    /// <example>
     /// <code>
     /// Feedback feedback = new Feedback();
     /// bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");
     /// </code>
+    /// </example>
     public class Feedback
     {
         private const string LogTag = "Tizen.System.Feedback";
index 9bf5d8f..6f2d34c 100644 (file)
@@ -43,12 +43,12 @@ internal static partial class Interop
     internal class UsbConfigHandle : SafeUsbHandle
     {
         [DllImport(Libraries.Usb, EntryPoint = "usb_host_config_destroy")]
-        internal static extern ErrorCode ConfigDestroy(UsbConfigHandle /* usb_host_config_h */ config);
+        internal static extern ErrorCode ConfigDestroy(IntPtr /* usb_host_config_h */ config);
 
         public UsbConfigHandle(IntPtr handle) : base(handle) { }
         public override void Destroy()
         {
-            ConfigDestroy(this).ThrowIfFailed("Failed to destroy native HostConfig handle");
+            ConfigDestroy(handle).ThrowIfFailed("Failed to destroy native HostConfig handle");
         }
     }
 }
\ No newline at end of file
index 52a2c7e..4750414 100644 (file)
@@ -34,9 +34,6 @@ internal static partial class Interop
     [DllImport(Libraries.Usb, EntryPoint = "usb_host_set_hotplug_cb")]
     internal static extern ErrorCode SetHotplugCb(this UsbContextHandle /* usb_host_context_h */ ctx, HostHotplugCallback cb, HotplugEventType /* usb_host_hotplug_event_e */ hostEvent, IntPtr /* void */ userData, out HostHotplugHandle /* usb_host_hotplug_h */ handle);
 
-    [DllImport(Libraries.Usb, EntryPoint = "usb_host_unset_hotplug_cb")]
-    internal static extern ErrorCode UnsetHotplugCb(this HostHotplugHandle /* usb_host_hotplug_h */ handle);
-
     [DllImport(Libraries.Usb, EntryPoint = "usb_host_get_device_list")]
     internal static extern ErrorCode GetDeviceList(this UsbContextHandle /* usb_host_context_h */ ctx, out IntPtr /* usb_host_device_h */ devs, out int length);
 
@@ -51,7 +48,7 @@ internal static partial class Interop
         internal static extern ErrorCode Create(out IntPtr /* usb_host_context_h */ ctx);
 
         [DllImport(Libraries.Usb, EntryPoint = "usb_host_destroy")]
-        internal static extern ErrorCode Destroy(UsbContextHandle /* usb_host_context_h */ ctx);
+        internal static extern ErrorCode Destroy(IntPtr /* usb_host_context_h */ ctx);
 
         [DllImport(Libraries.Usb, EntryPoint = "usb_host_free_device_list")]
         internal static extern ErrorCode FreeDeviceList(IntPtr deviceList, bool unrefDevices);
@@ -68,7 +65,7 @@ internal static partial class Interop
                 FreeDeviceList(nativeDevListPtr, true).ThrowIfFailed("Failed to free native device list");
                 nativeDevListPtr = IntPtr.Zero;
             }
-            Destroy(this).ThrowIfFailed("Failed to destroy native context handle");
+            Destroy(handle).ThrowIfFailed("Failed to destroy native context handle");
         }
 
         internal List<HostDeviceHandle> GetDeviceList()
@@ -96,9 +93,15 @@ internal static partial class Interop
         }
     }
 
-    internal class HostHotplugHandle
+    internal class HostHotplugHandle : SafeUsbHandle
     {
-        private IntPtr _handle;
-        public HostHotplugHandle(IntPtr handle) { _handle = handle; }
+        [DllImport(Libraries.Usb, EntryPoint = "usb_host_unset_hotplug_cb")]
+        internal static extern ErrorCode UnsetHotplugCb(IntPtr /* usb_host_hotplug_h */ handle);
+
+        public HostHotplugHandle(IntPtr handle) : base(handle) { }
+        public override void Destroy()
+        {
+            UnsetHotplugCb(handle).ThrowIfFailed($"Failed to unset hot plug callback");
+        }
     }
 }
index e5f8c28..613c1e7 100644 (file)
@@ -31,7 +31,7 @@ internal static partial class Interop
     internal static extern ErrorCode Open(this HostDeviceHandle /* usb_host_device_h */ dev);
 
     [DllImport(Libraries.Usb, EntryPoint = "usb_host_device_close")]
-    internal static extern ErrorCode Close(this HostDeviceHandle /* usb_host_device_h */ dev);
+    internal static extern ErrorCode CloseHandle(this HostDeviceHandle /* usb_host_device_h */ dev);
 
     [DllImport(Libraries.Usb, EntryPoint = "usb_host_device_get_bus_number")]
     internal static extern ErrorCode GetBusNumber(this HostDeviceHandle /* usb_host_device_h */ dev, out int busNumber);
index 65536e7..3cd2353 100644 (file)
@@ -73,9 +73,9 @@ internal static partial class Interop
     [DllImport(Libraries.Usb, EntryPoint = "usb_host_transfer")]
     internal static extern ErrorCode Transfer(this UsbEndpointHandle /* usb_host_endpoint_h */ ep, byte[] data, int length, out int transferred, uint timeout);
 
-    internal class UsbEndpointHandle
+    internal class UsbEndpointHandle : SafeUsbHandle
     {
-        private IntPtr _handle;
-        public UsbEndpointHandle(IntPtr handle){ _handle = handle; }
+        public UsbEndpointHandle(IntPtr handle) : base(handle) { }
+        public override void Destroy() { }
     }
 }
\ No newline at end of file
index 973dc9d..38d9ee2 100644 (file)
@@ -114,4 +114,4 @@ internal static class ErrorCodeExtensions
             default: return new InvalidOperationException(errMessage);
         }
     }
-}
\ No newline at end of file
+}
index 5cae2f3..22727dd 100644 (file)
@@ -42,9 +42,9 @@ internal static partial class Interop
     internal static extern ErrorCode GetStr(this UsbInterfaceHandle /* usb_host_interface_h */ usbInterface, ref int length, byte[] data);
 
 
-    internal class UsbInterfaceHandle
+    internal class UsbInterfaceHandle : SafeUsbHandle
     {
-        private IntPtr _handle;
-        public UsbInterfaceHandle(IntPtr handle) { _handle = handle; }
+        public UsbInterfaceHandle(IntPtr handle) : base(handle) { }
+        public override void Destroy() { }
     }
 }
\ No newline at end of file
index 8f8fe4a..faf882a 100644 (file)
@@ -27,12 +27,20 @@ namespace Tizen.System.Usb
     {
         internal readonly Interop.HostDeviceHandle _handle;
         private readonly UsbManager _parent;
-        private Dictionary<int, UsbConfiguration> _configurations;
+        private Dictionary<int, UsbConfiguration> _configurations = new Dictionary<int, UsbConfiguration>();
 
         internal UsbDevice(UsbManager parent, Interop.HostDeviceHandle handle)
         {
             _parent = parent;
             _handle = handle;
+
+            int count = Interop.NativeGet<int>(_handle.GetNumConfigurations);
+            for (int i = 0; i < count; ++i)
+            {
+                Interop.UsbConfigHandle configHandle;
+                _handle.GetConfig(i, out configHandle);
+                _configurations.Add(i, new UsbConfiguration(this, configHandle));
+            }
         }
 
         /// <summary>
@@ -117,17 +125,6 @@ namespace Tizen.System.Usb
             get
             {
                 ThrowIfDisposed();
-                if (_configurations == null)
-                {
-                    _configurations = new Dictionary<int, UsbConfiguration>();
-                    int count = Interop.NativeGet<int>(_handle.GetNumConfigurations);
-                    for (int i = 0; i < count; ++i)
-                    {
-                        Interop.UsbConfigHandle configHandle;
-                        _handle.GetConfig(i, out configHandle);
-                        _configurations.Add(i, new UsbConfiguration(this, configHandle));
-                    }
-                }
                 return _configurations;
             }
         }
@@ -177,7 +174,7 @@ namespace Tizen.System.Usb
             ThrowIfDisposed();
             if (IsOpened == false) throw new InvalidOperationException("Device must be opened for operation first");
 
-            _handle.Close();
+            _handle.CloseHandle().ThrowIfFailed("Failed to close device for use");
         }
 
         internal void ThrowIfDisposed()
index 04a9d48..80e77e2 100755 (executable)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-using System.Collections.Generic;
 using System;
+using System.Collections.Generic;
 
 namespace Tizen.System.Usb
 {
index aba4987..f539174 100644 (file)
@@ -25,8 +25,8 @@ namespace Tizen.System.Usb
     /// </summary>
     public class UsbManager : IDisposable
     {
-        private readonly Interop.UsbContextHandle _context;
-        private readonly Interop.HostHotplugHandle _hotpluggedHandle;
+        private readonly Interop.UsbContextHandle _context = null;
+        private readonly Interop.HostHotplugHandle _hotpluggedHandle = null;
         private List<UsbDevice> _devices = new List<UsbDevice>();
 
         /// <summary>
@@ -98,8 +98,8 @@ namespace Tizen.System.Usb
         {
             if (!disposedValue)
             {
-                _hotpluggedHandle.UnsetHotplugCb();
-                _context.Dispose();
+                if (_hotpluggedHandle != null) _hotpluggedHandle.Dispose();
+                if (_context != null) _context.Dispose();
                 disposedValue = true;
             }
         }
old mode 100644 (file)
new mode 100755 (executable)
index 48ad66b..a81bc6b
@@ -133,6 +133,7 @@ namespace Tizen.System
         /// CapacityChanged is triggered when the battery charge percentage is changed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task BatteryEventHandler()
         /// {
@@ -143,8 +144,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.PercentChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         ///  </code>
+        /// </example>
         public static event EventHandler<BatteryPercentChangedEventArgs> PercentChanged
         {
             add
@@ -177,6 +179,7 @@ namespace Tizen.System
         /// LevelChanged is triggered when the battery level is changed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task BatteryEventHandler()
         /// {
@@ -187,8 +190,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.LevelChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         /// </code>
+        /// </example>
         public static event EventHandler<BatteryLevelChangedEventArgs> LevelChanged
         {
             add
@@ -221,6 +225,7 @@ namespace Tizen.System
         /// This event is triggered when the charger is connected/disconnected.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task BatteryEventHandler()
         /// {
@@ -231,8 +236,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.ChargingStateChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         /// </code>
+        /// </example>
         public static event EventHandler<BatteryChargingStateChangedEventArgs> ChargingStateChanged
         {
             add
old mode 100644 (file)
new mode 100755 (executable)
index 3b051c3..4533185
@@ -54,10 +54,12 @@ namespace Tizen.System
     /// <privilege>
     /// http://tizen.org/privilege/display
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("Display current state is: {0}", Tizen.System.Display.State);
     ///     Console.WriteLine("Total number of Displays are: {0}", Tizen.System.Display.NumberOfDisplays);
     /// </code>
+    /// </example>
     public class Display
     {
         private readonly int _displayId;
@@ -115,10 +117,12 @@ namespace Tizen.System
         /// The maximum brightness value that can be set for the specific display.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         ///     Display display = Display.Displays[0];
         ///     Console.WriteLine("Display MaxBrightness is: {0}", display.MaxBrightness);
         /// </code>
+        /// </example>
         public int MaxBrightness
         {
             get
@@ -142,10 +146,12 @@ namespace Tizen.System
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
+        /// <example>
         /// <code>
         ///     Display display = Display.Displays[0];
         ///     Console.WriteLine("Display current Brightness is: {0}", display.Brightness);
         /// </code>
+        /// </example>
         public int Brightness
         {
             get
@@ -191,6 +197,7 @@ namespace Tizen.System
         ///  StateChanged is raised when the state of the display is changed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task DisplayEventHandler()
         /// {
@@ -201,8 +208,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.StateChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         /// </code>
+        /// </example>
         public static event EventHandler<DisplayStateChangedEventArgs> StateChanged
         {
             add
old mode 100644 (file)
new mode 100755 (executable)
index 7b1fd87..38374df
@@ -29,9 +29,11 @@ namespace Tizen.System
     /// <privilege>
     /// http://tizen.org/privilege/haptic
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("Total number of Vibrators are: {0}", Tizen.System.Vibrator.NumberOfVibrators);
     /// </code>
+    /// </example>
     public class Vibrator : IDisposable
     {
         private readonly int _vibratorId;
@@ -118,6 +120,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     Vibrator vibrator = Vibrator.Vibrators[0];
         ///     try
@@ -128,6 +131,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
 
         public void Vibrate(int duration, int feedback)
         {
@@ -157,6 +161,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     Vibrator vibrator = Vibrator.Vibrators[0];
         ///     try
@@ -167,6 +172,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
         public void Stop()
         {
             if (_hapticHandle != IntPtr.Zero)
old mode 100644 (file)
new mode 100755 (executable)
index d8e79d4..efd8664
@@ -27,9 +27,11 @@ namespace Tizen.System
     /// <privilege>
     /// http://tizen.org/privilege/use_ir
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("IR availability for this device is: {0}", IR.IsAvailable);
     /// </code>
+    /// </example>
     public static class IR
     {
         /// <summary>
@@ -64,6 +66,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///    try
         ///    {
@@ -76,6 +79,7 @@ namespace Tizen.System
         ///    {
         ///    }
         /// </code>
+        /// </example>
         public static void Transmit(int carrierFreequency, IList<int> pattern)
         {
             int[] patternArray = pattern.ToArray();
old mode 100644 (file)
new mode 100755 (executable)
index 7d00ca8..bcc0d2f
@@ -34,10 +34,12 @@ namespace Tizen.System
     /// <privilege>
     ///  http://tizen.org/privilege/led
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("Led MaxBrightness is: {0}", Tizen.System.Led.MaxBrightness);
     ///     Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
     /// </code>
+    /// </example>
     public static class Led
     {
         /// <summary>
@@ -73,11 +75,13 @@ namespace Tizen.System
         /// <exception cref="ArgumentException"> When an invalid parameter value is set.</exception>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
         ///     Tizen.System.Led.Brightness = 50;
         ///     Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
         /// </code>
+        /// </example>
 
         public static int Brightness
         {
@@ -115,6 +119,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     try
         ///     {
@@ -124,6 +129,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
         public static void Play(int on, int off, Color color)
         {
             //looks like only blink option is supported. So hard coded to default blink option.
@@ -141,6 +147,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     try
         ///     {
@@ -152,6 +159,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
 
         public static void Stop()
         {
old mode 100644 (file)
new mode 100755 (executable)
index bc0c589..4c8c526
@@ -45,9 +45,11 @@ namespace Tizen.System
         /// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
+        /// <example>
         /// <code>
         /// Tizen.System.Power.RequestCpuLock(2000);
         /// </code>
+        /// </example>
 
         public static void RequestCpuLock(int timeout)
         {
@@ -63,9 +65,11 @@ namespace Tizen.System
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
+        /// <example>
         /// <code>
         /// Tizen.System.Power.ReleaseCpuLock();
         /// </code>
+        /// </example>
         public static void ReleaseCpuLock()
         {
             DeviceError res = (DeviceError)Interop.Device.DevicePowerReleaseLock(0);
index 284ba22..0710d5f 100644 (file)
@@ -19,11 +19,6 @@ using System.Runtime.InteropServices;
 
 internal static partial class Interop
 {
-    internal static partial class Libraries
-    {
-        public const string Base = "libcapi-base-common.so.0";
-    }
-
     internal static partial class CommonError
     {
         [DllImport(Libraries.Base, EntryPoint = "get_last_result")]
diff --git a/src/Tizen/Interop/Interop.DotnetUtil.cs b/src/Tizen/Interop/Interop.DotnetUtil.cs
new file mode 100644 (file)
index 0000000..68ba363
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * 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 DotnetUtil
+    {
+        [DllImport(Libraries.Vconf, EntryPoint = "vconf_get_int")]
+        internal static extern int GetVconfInt(string key, out int value);
+    }
+}
diff --git a/src/Tizen/Interop/Interop.Libraries.cs b/src/Tizen/Interop/Interop.Libraries.cs
new file mode 100644 (file)
index 0000000..506d911
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+{
+    internal static partial class Libraries
+    {
+        public const string Base = "libcapi-base-common.so.0";
+        public const string Vconf = "libvconf.so.0";
+    }
+}
diff --git a/src/Tizen/Tizen.Common/DotnetUtil.cs b/src/Tizen/Tizen.Common/DotnetUtil.cs
new file mode 100644 (file)
index 0000000..1bdd3bd
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Tizen.Common
+{
+    /// <summary>
+    /// The DotnetUtil class provides the .NET API version.
+    /// </summary>
+    public static class DotnetUtil
+    {
+        /// <summary>
+        /// Gets the version of Tizen .NET API.
+        /// </summary>
+        /// <returns>The Tizen .NET API version</returns>
+        public static int TizenAPIVersion
+        {
+            get
+            {
+                int version = 0;
+                DotnetUtilError ret = (DotnetUtilError)Interop.DotnetUtil.GetVconfInt("db/dotnet/tizen_api_version", out version);
+                if (ret != DotnetUtilError.None)
+                {
+                    Log.Warn(DotnetUtilErrorFactory.LogTag, "unable to get Tizen .NET API version.");
+                }
+                return version;
+            }
+        }
+    }
+}
diff --git a/src/Tizen/Tizen.Common/DotnetUtilErrorFactory.cs b/src/Tizen/Tizen.Common/DotnetUtilErrorFactory.cs
new file mode 100644 (file)
index 0000000..677844a
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+* 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;
+
+namespace Tizen.Common
+{
+    internal enum DotnetUtilError
+    {
+        None = ErrorCode.None,
+    }
+
+    internal static class DotnetUtilErrorFactory
+    {
+        internal const string LogTag = "Tizen.Common.DotnetUtil";
+
+        internal static void ThrowException(DotnetUtilError err)
+        {
+            DotnetUtilError error = err;
+            if (error != DotnetUtilError.None)
+            {
+                throw new ArgumentException("Vconf error");
+            }
+        }
+    }
+}
index dbdcea4..8b42da5 100644 (file)
@@ -4,4 +4,8 @@
     <TargetFramework>netstandard2.0</TargetFramework>
   </PropertyGroup>
 
+  <ItemGroup>
+    <ProjectReference Include="..\Tizen.Log\Tizen.Log.csproj" />
+  </ItemGroup>
+
 </Project>