All API change to internal.
authorSegwon <segwon.han@samsung.com>
Tue, 11 Jul 2017 02:33:02 +0000 (11:33 +0900)
committerSegwon Han <segwon.han@samsung.com>
Tue, 11 Jul 2017 02:44:32 +0000 (02:44 +0000)
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I713b758260f6869c1597e753b53c91f4aae86426

20 files changed:
src/Tizen.Convergence/Interop/Interop.Conv.Channel.cs [deleted file]
src/Tizen.Convergence/Interop/Interop.Conv.Device.cs [deleted file]
src/Tizen.Convergence/Interop/Interop.Conv.Manager.cs [deleted file]
src/Tizen.Convergence/Interop/Interop.Conv.Payload.cs [deleted file]
src/Tizen.Convergence/Interop/Interop.Conv.Service.cs [deleted file]
src/Tizen.Convergence/Interop/Interop.Internal.Conv.Channel.cs [new file with mode: 0755]
src/Tizen.Convergence/Interop/Interop.Internal.Conv.Device.cs [new file with mode: 0755]
src/Tizen.Convergence/Interop/Interop.Internal.Conv.Manager.cs [new file with mode: 0755]
src/Tizen.Convergence/Interop/Interop.Internal.Conv.Payload.cs [new file with mode: 0755]
src/Tizen.Convergence/Interop/Interop.Internal.Conv.Service.cs [new file with mode: 0755]
src/Tizen.Convergence/Tizen.Convergence/InternalAppCommunicationService.cs [moved from src/Tizen.Convergence/Tizen.Convergence/AppCommunicationService.cs with 82% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalChannel.cs [moved from src/Tizen.Convergence/Tizen.Convergence/Channel.cs with 79% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalDevice.cs [moved from src/Tizen.Convergence/Tizen.Convergence/Device.cs with 72% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFinder.cs [moved from src/Tizen.Convergence/Tizen.Convergence/DeviceFinder.cs with 78% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalDeviceFoundEventArgs.cs [moved from src/Tizen.Convergence/Tizen.Convergence/DeviceFoundEventArgs.cs with 77% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalErrorFactory.cs [moved from src/Tizen.Convergence/Tizen.Convergence/ErrorFactory.cs with 100% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalPayload.cs [moved from src/Tizen.Convergence/Tizen.Convergence/Payload.cs with 87% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalService.cs [moved from src/Tizen.Convergence/Tizen.Convergence/Service.cs with 72% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalServiceErrorOccuredEventArgs.cs [moved from src/Tizen.Convergence/Tizen.Convergence/ServiceErrorOccuredEventArgs.cs with 81% similarity]
src/Tizen.Convergence/Tizen.Convergence/InternalServiceEventOccuredEventArgs.cs [moved from src/Tizen.Convergence/Tizen.Convergence/ServiceEventOccuredEventArgs.cs with 74% similarity]

diff --git a/src/Tizen.Convergence/Interop/Interop.Conv.Channel.cs b/src/Tizen.Convergence/Interop/Interop.Conv.Channel.cs
deleted file mode 100755 (executable)
index ab85367..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
-    internal static partial class ConvChannel
-    {
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_create")]
-        internal static extern int Create(out ConvChannelHandle /* conv_channel_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_destroy")]
-        internal static extern int Destroy(IntPtr /* conv_channel_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_get_string")]
-        internal static extern int GetString(ConvChannelHandle /* conv_channel_h */ handle, string key, out IntPtr value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_set_string")]
-        internal static extern int SetString(ConvChannelHandle /* conv_channel_h */ handle, string key, string value);
-    }
-
-    internal class ConvChannelHandle : TizenSafeHandle
-    {
-        private bool _ownsHandle = true;
-
-        public ConvChannelHandle(): base()
-        {
-
-        }
-
-        public ConvChannelHandle(IntPtr handle)
-            : base(handle)
-        {
-        }
-
-        public ConvChannelHandle(IntPtr handle, bool ownsHandle)
-            : base(handle)
-        {
-            _ownsHandle = ownsHandle;
-        }
-
-        public override void Destroy()
-        {
-            if (_ownsHandle && handle != IntPtr.Zero)
-            {
-                var err = ConvChannel.Destroy(this.handle);
-                if (err != (int)ConvErrorCode.None)\r
-                {\r
-                    Log.Error(ErrorFactory.LogTag, "Failed to destroy conv channel handle");\r
-                    throw ErrorFactory.GetException(err);\r
-                }\r
-            }
-        }
-    }
-}
diff --git a/src/Tizen.Convergence/Interop/Interop.Conv.Device.cs b/src/Tizen.Convergence/Interop/Interop.Conv.Device.cs
deleted file mode 100755 (executable)
index 3271ab6..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
-    internal static partial class ConvDevice
-    {
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_device_clone")]
-        internal static extern int Clone(IntPtr /* conv_device_h */ originalHandle, out ConvDeviceHandle /* conv_device_h */ targetHandle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_device_destroy")]
-        internal static extern int Destroy(IntPtr /* conv_device_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_device_get_property_string")]
-        internal static extern int GetPropertyString(ConvDeviceHandle /* conv_device_h */ handle, string key, out IntPtr value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_device_foreach_service")]
-        internal static extern int ForeachService(ConvDeviceHandle /* conv_device_h */ handle, ConvServiceForeachCallback cb, IntPtr /* void */ userData);
-
-        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
-        internal delegate void ConvServiceForeachCallback(IntPtr serviceHandle, IntPtr /* void */ userData);
-    }
-
-    internal class ConvDeviceHandle : TizenSafeHandle
-    {
-        public ConvDeviceHandle() : base()
-        {
-
-        }
-
-        public ConvDeviceHandle(IntPtr handle)
-            : base(handle)
-        {
-        }
-
-        public override void Destroy()
-        {
-            if (handle != IntPtr.Zero)
-            {
-                var err = ConvDevice.Destroy(this.handle);
-                if (err != (int)ConvErrorCode.None)\r
-                {\r
-                    Log.Error(ErrorFactory.LogTag, "Failed to destroy conv device handle");\r
-                    throw ErrorFactory.GetException(err);\r
-                }\r
-            }
-        }
-    }
-}
diff --git a/src/Tizen.Convergence/Interop/Interop.Conv.Manager.cs b/src/Tizen.Convergence/Interop/Interop.Conv.Manager.cs
deleted file mode 100755 (executable)
index 9e95ae4..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
-    public enum ConvDiscoveryResult
-    {
-        /// <summary>
-        /// Discovery Error
-        /// </summary>
-        Error = -1,
-        /// <summary>
-        /// Discovery Success
-        /// </summary>
-        Success = 0,
-        /// <summary>
-        /// Discovery finished
-        /// </summary>
-        Finished,
-        /// <summary>
-        /// Discovery lost
-        /// </summary>
-        Lost,
-    }
-
-    internal static partial class ConvManager
-    {
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_create")]
-        internal static extern int ConvCreate(out ConvManagerHandle /* conv_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_destroy")]
-        internal static extern int ConvDestroy(IntPtr /* conv_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_start")]
-        internal static extern int ConvDiscoveryStart(ConvManagerHandle /* conv_h */ handle, int timeoutSeconds, ConvDiscoveryCallback callback, IntPtr /* void */ userData);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_stop")]
-        internal static extern int ConvDiscoveryStop(ConvManagerHandle /* conv_h */ handle);
-
-        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
-        internal delegate void ConvDiscoveryCallback(IntPtr /* conv_device_h */ deviceHandle, ConvDiscoveryResult /* conv_discovery_result_e */ result, IntPtr /* void */ userData);
-    }
-
-    internal class ConvManagerHandle : TizenSafeHandle
-    {
-        public ConvManagerHandle() : base()
-        {
-
-        }
-
-        public ConvManagerHandle(IntPtr handle)
-            : base(handle)
-        {
-        }
-        public override void Destroy()
-        {
-            var err = ConvManager.ConvDestroy(this.handle);\r
-            if (err != (int)ConvErrorCode.None)\r
-            {\r
-                Log.Error(ErrorFactory.LogTag, "Failed to destroy conv manager handle");\r
-                throw ErrorFactory.GetException(err);\r
-            }\r
-        }
-    }
-}
diff --git a/src/Tizen.Convergence/Interop/Interop.Conv.Payload.cs b/src/Tizen.Convergence/Interop/Interop.Conv.Payload.cs
deleted file mode 100755 (executable)
index 0f20562..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
-    internal static partial class ConvPayload
-    {
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_create")]
-        internal static extern int Create(out ConvPayloadHandle /* conv_payload_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_destroy")]
-        internal static extern int Destroy(IntPtr /* conv_payload_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_string")]
-        internal static extern int SetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, string value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_string")]
-        internal static extern int GetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, out IntPtr value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_byte")]
-        internal static extern int SetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, int length, byte[] value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_byte")]
-        internal static extern int GetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, out int length, out IntPtr value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_binary")]
-        internal static extern int SetBinary(ConvPayloadHandle /* conv_payload_h */ handle, int length, byte[] value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_binary")]
-        internal static extern int GetBinary(ConvPayloadHandle /* conv_payload_h */ handle, out int length, out IntPtr value);
-    }
-
-    internal class ConvPayloadHandle : TizenSafeHandle
-    {
-        private bool _ownsHandle = true;
-
-        public ConvPayloadHandle(): base()
-        {
-
-        }
-
-        public ConvPayloadHandle(IntPtr handle)
-            : base(handle)
-        {
-        }
-
-        public ConvPayloadHandle(IntPtr handle, bool ownsHandle)
-            : base(handle)
-        {
-            _ownsHandle = ownsHandle;
-        }
-
-        public override void Destroy()
-        {
-            if (_ownsHandle && handle != IntPtr.Zero)
-            {
-                var err = ConvPayload.Destroy(this.handle);
-                if (err != (int)ConvErrorCode.None)
-                {
-                    Log.Error(ErrorFactory.LogTag, "Failed to destroy conv payload handle");
-                    throw ErrorFactory.GetException(err);
-                }
-            }
-        }
-    }
-}
diff --git a/src/Tizen.Convergence/Interop/Interop.Conv.Service.cs b/src/Tizen.Convergence/Interop/Interop.Conv.Service.cs
deleted file mode 100755 (executable)
index 6f98b00..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen;
-using Tizen.Convergence;
-
-internal static partial class Interop
-{
-    internal enum ServiceType
-    {
-        /// <summary>
-        /// Undefined service
-        /// </summary>
-        None = -1,
-
-        /// <summary>
-        /// App-to-app communication service
-        /// </summary>
-        AppCommunication = 0,
-
-        /// <summary>
-        /// Remote app-control service
-        /// </summary>
-        RemoteAppControl,
-    }
-    internal static partial class ConvService
-    {
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_create")]
-        internal static extern int Create(out ConvServiceHandle /* conv_service_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_clone")]
-        internal static extern int Clone(IntPtr /* conv_service_h */ originalHandle, out ConvServiceHandle /* conv_service_h */ targetHandle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_destroy")]
-        internal static extern int Destroy(IntPtr /* conv_service_h */ handle);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_property_string")]
-        internal static extern int GetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, out IntPtr value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_property_string")]
-        internal static extern int SetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, string value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_type")]
-        internal static extern int GetType(IntPtr /* conv_service_h */ handle, out int /* conv_service_e */ value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_type")]
-        internal static extern int SetType(ConvServiceHandle /* conv_service_h */ handle, int /* conv_service_e */ value);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_start")]
-        internal static extern int Start(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_read")]
-        internal static extern int Read(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_publish")]
-        internal static extern int Publish(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_stop")]
-        internal static extern int Stop(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_listener_cb")]
-        internal static extern int SetListenerCb(ConvServiceHandle /* conv_service_h */ handle, ConvServiceListenerCallback callback, IntPtr /* void */ userData);
-
-        [DllImport(Libraries.Convergence, EntryPoint = "conv_service_unset_listener_cb")]
-        internal static extern int UnsetListenerCb(ConvServiceHandle /* conv_service_h */ handle);
-
-        [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
-        internal delegate void ConvServiceListenerCallback(IntPtr /* conv_service_h */ serviceHandle, IntPtr channelHandle, int error, IntPtr result, IntPtr /* void */ userData);
-    }
-
-    internal class ConvServiceHandle : TizenSafeHandle
-    {
-        public ConvServiceHandle(): base()
-        {
-
-        }
-
-        public ConvServiceHandle(IntPtr handle)
-            : base(handle)
-        {
-        }
-        public override void Destroy()
-        {
-            if (handle != IntPtr.Zero)
-            {
-                var err = ConvService.Destroy(this.handle);
-                if (err != (int)ConvErrorCode.None)\r
-                {\r
-                    Log.Error(ErrorFactory.LogTag, "Failed to destroy conv service handle");\r
-                    throw ErrorFactory.GetException(err);\r
-                }\r
-            }
-        }
-    }
-}
diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Channel.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Channel.cs
new file mode 100755 (executable)
index 0000000..4a8a282
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen;
+using Tizen.Convergence;
+
+internal static partial class Interop
+{
+    internal static partial class Internal
+    {
+        internal static partial class ConvChannel
+        {
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_create")]
+            internal static extern int Create(out ConvChannelHandle /* conv_channel_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_destroy")]
+            internal static extern int Destroy(IntPtr /* conv_channel_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_get_string")]
+            internal static extern int GetString(ConvChannelHandle /* conv_channel_h */ handle, string key, out IntPtr value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_channel_set_string")]
+            internal static extern int SetString(ConvChannelHandle /* conv_channel_h */ handle, string key, string value);
+        }
+
+        internal class ConvChannelHandle : TizenSafeHandle
+        {
+            private bool _ownsHandle = true;
+
+            public ConvChannelHandle(): base()
+            {
+
+            }
+
+            public ConvChannelHandle(IntPtr handle)
+                : base(handle)
+            {
+            }
+
+            public ConvChannelHandle(IntPtr handle, bool ownsHandle)
+                : base(handle)
+            {
+                _ownsHandle = ownsHandle;
+            }
+
+            public override void Destroy()
+            {
+                if (_ownsHandle && handle != IntPtr.Zero)
+                {
+                    var err = ConvChannel.Destroy(this.handle);
+                    if (err != (int)ConvErrorCode.None)
+                    {
+                        Log.Error(ErrorFactory.LogTag, "Failed to destroy conv channel handle");
+                        throw ErrorFactory.GetException(err);
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Device.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Device.cs
new file mode 100755 (executable)
index 0000000..cbee849
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen;
+using Tizen.Convergence;
+
+internal static partial class Interop
+{
+    internal static partial class Internal
+    {
+        internal static partial class ConvDevice
+        {
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_device_clone")]
+            internal static extern int Clone(IntPtr /* conv_device_h */ originalHandle, out ConvDeviceHandle /* conv_device_h */ targetHandle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_device_destroy")]
+            internal static extern int Destroy(IntPtr /* conv_device_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_device_get_property_string")]
+            internal static extern int GetPropertyString(ConvDeviceHandle /* conv_device_h */ handle, string key, out IntPtr value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_device_foreach_service")]
+            internal static extern int ForeachService(ConvDeviceHandle /* conv_device_h */ handle, ConvServiceForeachCallback cb, IntPtr /* void */ userData);
+
+            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+            internal delegate void ConvServiceForeachCallback(IntPtr serviceHandle, IntPtr /* void */ userData);
+        }
+
+        internal class ConvDeviceHandle : TizenSafeHandle
+        {
+            public ConvDeviceHandle() : base()
+            {
+
+            }
+
+            public ConvDeviceHandle(IntPtr handle)
+                : base(handle)
+            {
+            }
+
+            public override void Destroy()
+            {
+                if (handle != IntPtr.Zero)
+                {
+                    var err = ConvDevice.Destroy(this.handle);
+                    if (err != (int)ConvErrorCode.None)
+                    {
+                        Log.Error(ErrorFactory.LogTag, "Failed to destroy conv device handle");
+                        throw ErrorFactory.GetException(err);
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Manager.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Manager.cs
new file mode 100755 (executable)
index 0000000..cfdc9e5
--- /dev/null
@@ -0,0 +1,79 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen;
+using Tizen.Convergence;
+
+internal static partial class Interop
+{
+    internal static partial class Internal
+    {
+        public enum ConvDiscoveryResult
+        {
+            /// <summary>
+            /// Discovery Error
+            /// </summary>
+            Error = -1,
+            /// <summary>
+            /// Discovery Success
+            /// </summary>
+            Success = 0,
+            /// <summary>
+            /// Discovery finished
+            /// </summary>
+            Finished,
+            /// <summary>
+            /// Discovery lost
+            /// </summary>
+            Lost,
+        }
+
+        internal static partial class ConvManager
+        {
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_create")]
+            internal static extern int ConvCreate(out ConvManagerHandle /* conv_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_destroy")]
+            internal static extern int ConvDestroy(IntPtr /* conv_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_start")]
+            internal static extern int ConvDiscoveryStart(ConvManagerHandle /* conv_h */ handle, int timeoutSeconds, ConvDiscoveryCallback callback, IntPtr /* void */ userData);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_discovery_stop")]
+            internal static extern int ConvDiscoveryStop(ConvManagerHandle /* conv_h */ handle);
+
+            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+            internal delegate void ConvDiscoveryCallback(IntPtr /* conv_device_h */ deviceHandle, ConvDiscoveryResult /* conv_discovery_result_e */ result, IntPtr /* void */ userData);
+        }
+
+        internal class ConvManagerHandle : TizenSafeHandle
+        {
+            public ConvManagerHandle() : base()
+            {
+
+            }
+
+            public ConvManagerHandle(IntPtr handle)
+                : base(handle)
+            {
+            }
+
+            public override void Destroy()
+            {
+                var err = ConvManager.ConvDestroy(this.handle);
+                if (err != (int)ConvErrorCode.None)
+                {
+                    Log.Error(ErrorFactory.LogTag, "Failed to destroy conv manager handle");
+                    throw ErrorFactory.GetException(err);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Payload.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Payload.cs
new file mode 100755 (executable)
index 0000000..902e5e0
--- /dev/null
@@ -0,0 +1,79 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen;
+using Tizen.Convergence;
+
+internal static partial class Interop
+{
+    internal static partial class Internal
+    {
+        internal static partial class ConvPayload
+        {
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_create")]
+            internal static extern int Create(out ConvPayloadHandle /* conv_payload_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_destroy")]
+            internal static extern int Destroy(IntPtr /* conv_payload_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_string")]
+            internal static extern int SetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, string value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_string")]
+            internal static extern int GetString(ConvPayloadHandle /* conv_payload_h */ handle, string key, out IntPtr value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_byte")]
+            internal static extern int SetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, int length, byte[] value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_byte")]
+            internal static extern int GetByte(ConvPayloadHandle /* conv_payload_h */ handle, string key, out int length, out IntPtr value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_set_binary")]
+            internal static extern int SetBinary(ConvPayloadHandle /* conv_payload_h */ handle, int length, byte[] value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_payload_get_binary")]
+            internal static extern int GetBinary(ConvPayloadHandle /* conv_payload_h */ handle, out int length, out IntPtr value);
+        }
+
+        internal class ConvPayloadHandle : TizenSafeHandle
+        {
+            private bool _ownsHandle = true;
+
+            public ConvPayloadHandle(): base()
+            {
+
+            }
+
+            public ConvPayloadHandle(IntPtr handle)
+                : base(handle)
+            {
+            }
+
+            public ConvPayloadHandle(IntPtr handle, bool ownsHandle)
+                : base(handle)
+            {
+                _ownsHandle = ownsHandle;
+            }
+
+            public override void Destroy()
+            {
+                if (_ownsHandle && handle != IntPtr.Zero)
+                {
+                    var err = ConvPayload.Destroy(this.handle);
+                    if (err != (int)ConvErrorCode.None)
+                    {
+                        Log.Error(ErrorFactory.LogTag, "Failed to destroy conv payload handle");
+                        throw ErrorFactory.GetException(err);
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Service.cs b/src/Tizen.Convergence/Interop/Interop.Internal.Conv.Service.cs
new file mode 100755 (executable)
index 0000000..e99233a
--- /dev/null
@@ -0,0 +1,107 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen;
+using Tizen.Convergence;
+
+internal static partial class Interop
+{
+    internal static partial class Internal
+    {
+        internal enum ServiceType
+        {
+            /// <summary>
+            /// Undefined service
+            /// </summary>
+            None = -1,
+
+            /// <summary>
+            /// App-to-app communication service
+            /// </summary>
+            AppCommunication = 0,
+
+            /// <summary>
+            /// Remote app-control service
+            /// </summary>
+            RemoteAppControl,
+        }
+
+        internal static partial class ConvService
+        {
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_create")]
+            internal static extern int Create(out ConvServiceHandle /* conv_service_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_clone")]
+            internal static extern int Clone(IntPtr /* conv_service_h */ originalHandle, out ConvServiceHandle /* conv_service_h */ targetHandle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_destroy")]
+            internal static extern int Destroy(IntPtr /* conv_service_h */ handle);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_property_string")]
+            internal static extern int GetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, out IntPtr value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_property_string")]
+            internal static extern int SetPropertyString(ConvServiceHandle /* conv_service_h */ handle, string key, string value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_get_type")]
+            internal static extern int GetType(IntPtr /* conv_service_h */ handle, out int /* conv_service_e */ value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_type")]
+            internal static extern int SetType(ConvServiceHandle /* conv_service_h */ handle, int /* conv_service_e */ value);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_start")]
+            internal static extern int Start(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_read")]
+            internal static extern int Read(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_publish")]
+            internal static extern int Publish(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_stop")]
+            internal static extern int Stop(ConvServiceHandle /* conv_service_h */ handle, ConvChannelHandle channel, ConvPayloadHandle payload);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_set_listener_cb")]
+            internal static extern int SetListenerCb(ConvServiceHandle /* conv_service_h */ handle, ConvServiceListenerCallback callback, IntPtr /* void */ userData);
+
+            [DllImport(Libraries.Convergence, EntryPoint = "conv_service_unset_listener_cb")]
+            internal static extern int UnsetListenerCb(ConvServiceHandle /* conv_service_h */ handle);
+
+            [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
+            internal delegate void ConvServiceListenerCallback(IntPtr /* conv_service_h */ serviceHandle, IntPtr channelHandle, int error, IntPtr result, IntPtr /* void */ userData);
+        }
+
+        internal class ConvServiceHandle : TizenSafeHandle
+        {
+            public ConvServiceHandle(): base()
+            {
+
+            }
+
+            public ConvServiceHandle(IntPtr handle)
+                : base(handle)
+            {
+            }
+
+            public override void Destroy()
+            {
+                if (handle != IntPtr.Zero)
+                {
+                    var err = ConvService.Destroy(this.handle);
+                    if (err != (int)ConvErrorCode.None)
+                    {
+                        Log.Error(ErrorFactory.LogTag, "Failed to destroy conv service handle");
+                        throw ErrorFactory.GetException(err);
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
@@ -15,6 +15,7 @@
 */
 
 using System;
+using System.ComponentModel;
 using Tizen.Internals.Errors;
 
 namespace Tizen.Convergence
@@ -25,20 +26,21 @@ namespace Tizen.Convergence
     /// On the server side an instance of the App Communication Service should be created and started by the app. Note, on the client side the service handle shouldn’t be created, but obtained during discovery.
     /// For more information, refer Tizen D2D convergence specification
     /// </summary>
-    public class AppCommunicationService : Service
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalAppCommunicationService : InternalService
     {
         /// <summary>
         /// The constructor
         /// </summary>
         /// <feature>http://tizen.org/feature/convergence.d2d</feature>
         /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
-        public AppCommunicationService() :
-                base(Interop.ServiceType.AppCommunication)
+        public InternalAppCommunicationService() :
+                base(Interop.Internal.ServiceType.AppCommunication)
         {
 
         }
 
-        internal AppCommunicationService(IntPtr serviceHandle) :
+        internal InternalAppCommunicationService(IntPtr serviceHandle) :
                     base(serviceHandle)
         {
 
@@ -57,15 +59,15 @@ namespace Tizen.Convergence
         /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
         /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
         /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
-        public void Start(Channel channel, Payload payload)
+        public void Start(InternalChannel channel, InternalPayload payload)
         {
             if (channel == null)
             {
                 throw new ArgumentNullException();
             }
 
-            Interop.ConvPayloadHandle handle = (payload == null) ? new Interop.ConvPayloadHandle() : payload._payloadHandle;
-            int ret = Interop.ConvService.Start(_serviceHandle, channel._channelHandle, handle);
+            Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
+            int ret = Interop.Internal.ConvService.Start(_serviceHandle, channel._channelHandle, handle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Interop: Failed to start app communication service:" + ErrorFacts.GetErrorMessage(ret));
@@ -85,15 +87,15 @@ namespace Tizen.Convergence
         /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
         /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
         /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
-        public void Read(Channel channel, Payload payload)
+        public void Read(InternalChannel channel, InternalPayload payload)
         {
             if (channel == null)
             {
                 throw new ArgumentNullException();
             }
 
-            Interop.ConvPayloadHandle handle = (payload == null) ? new Interop.ConvPayloadHandle() : payload._payloadHandle;
-            int ret = Interop.ConvService.Read(_serviceHandle, channel._channelHandle, handle);
+            Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
+            int ret = Interop.Internal.ConvService.Read(_serviceHandle, channel._channelHandle, handle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Interop: Failed to read app communication service:" + ErrorFacts.GetErrorMessage(ret));
@@ -114,15 +116,15 @@ namespace Tizen.Convergence
         /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
         /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
         /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
-        public void Publish(Channel channel, Payload payload)
+        public void Publish(InternalChannel channel, InternalPayload payload)
         {
             if (channel == null)
             {
                 throw new ArgumentNullException();
             }
 
-            Interop.ConvPayloadHandle handle = (payload == null) ? new Interop.ConvPayloadHandle() : payload._payloadHandle;
-            int ret = Interop.ConvService.Publish(_serviceHandle, channel._channelHandle, handle);
+            Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
+            int ret = Interop.Internal.ConvService.Publish(_serviceHandle, channel._channelHandle, handle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Interop: Failed to publish app communication service:" + ErrorFacts.GetErrorMessage(ret));
@@ -142,15 +144,15 @@ namespace Tizen.Convergence
         /// <exception cref="InvalidOperationException">Thrown when the request is not supported as per Tizen D2D convergence specification </exception>
         /// <exception cref="ArgumentNullException">Thrown when any of the arugments are null</exception>
         /// <seealso cref="Service.ServiceEventOccurred"> The result of the request is delivered through this event</seealso>
-        public void Stop(Channel channel, Payload payload)
+        public void Stop(InternalChannel channel, InternalPayload payload)
         {
             if (channel == null)
             {
                 throw new ArgumentNullException();
             }
 
-            Interop.ConvPayloadHandle handle = (payload == null) ? new Interop.ConvPayloadHandle() : payload._payloadHandle;
-            int ret = Interop.ConvService.Stop(_serviceHandle, channel._channelHandle, handle);
+            Interop.Internal.ConvPayloadHandle handle = (payload == null) ? new Interop.Internal.ConvPayloadHandle() : payload._payloadHandle;
+            int ret = Interop.Internal.ConvService.Stop(_serviceHandle, channel._channelHandle, handle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Interop: Failed to start stop communication service:" + ErrorFacts.GetErrorMessage(ret));
 
 using System;
 using System.Runtime.InteropServices;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// The Channel class provies a logical session for communicating with AppCommunicationService.
     /// </summary>
-    public class Channel : IDisposable
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalChannel : IDisposable
     {
-        internal Interop.ConvChannelHandle _channelHandle;
+        internal Interop.Internal.ConvChannelHandle _channelHandle;
         internal const string ChannelUriKey = "uri";
         internal const string ChannelIdKey = "channel_id";
 
@@ -36,28 +38,28 @@ namespace Tizen.Convergence
         /// <feature>http://tizen.org/feature/convergence.d2d</feature>
         /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
         /// <exception cref="ArgumentNullException">Throws when the arguments passed are null</exception>
-        public Channel(string uri, string id)
+        public InternalChannel(string uri, string id)
         {
             if (uri == null || id == null)
             {
                 throw new ArgumentNullException();
             }
 
-            int ret = Interop.ConvChannel.Create(out _channelHandle);
+            int ret = Interop.Internal.ConvChannel.Create(out _channelHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create channel");
                 throw ErrorFactory.GetException(ret);
             }
 
-            ret = Interop.ConvChannel.SetString(_channelHandle, ChannelUriKey, uri);
+            ret = Interop.Internal.ConvChannel.SetString(_channelHandle, ChannelUriKey, uri);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create channel");
                 throw ErrorFactory.GetException(ret);
             }
 
-            ret = Interop.ConvChannel.SetString(_channelHandle, ChannelIdKey, id);
+            ret = Interop.Internal.ConvChannel.SetString(_channelHandle, ChannelIdKey, id);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create channel");
@@ -68,12 +70,12 @@ namespace Tizen.Convergence
             Id = id;
         }
 
-        internal Channel(IntPtr channelHandle)
+        internal InternalChannel(IntPtr channelHandle)
         {
-            _channelHandle = new Interop.ConvChannelHandle(channelHandle, false);
+            _channelHandle = new Interop.Internal.ConvChannelHandle(channelHandle, false);
 
             IntPtr stringPtr = IntPtr.Zero;
-            int ret = Interop.ConvChannel.GetString(_channelHandle, ChannelUriKey, out stringPtr);
+            int ret = Interop.Internal.ConvChannel.GetString(_channelHandle, ChannelUriKey, out stringPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create channel");
@@ -82,7 +84,7 @@ namespace Tizen.Convergence
             Uri = Marshal.PtrToStringAnsi(stringPtr);
             Interop.Libc.Free(stringPtr);
 
-            ret = Interop.ConvChannel.GetString(_channelHandle, ChannelIdKey, out stringPtr);
+            ret = Interop.Internal.ConvChannel.GetString(_channelHandle, ChannelIdKey, out stringPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create channel");
 using System;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// The class encapsulates a D2D convergence compliant device information
     /// </summary>
-    public class Device : IDisposable
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalDevice : IDisposable
     {
         internal const string DeviceIdKey = "device_id";
         internal const string DeviceNameKey = "device_name";
         internal const string DeviceTypeKey = "device_type";
-        internal Interop.ConvDeviceHandle _deviceHandle;
-        internal List<Service> _services = new List<Service>();
+        internal Interop.Internal.ConvDeviceHandle _deviceHandle;
+        internal List<InternalService> _services = new List<InternalService>();
 
         /// <summary>
         /// The Unique ID of the device
@@ -49,7 +51,7 @@ namespace Tizen.Convergence
         /// <summary>
         /// List of services supported by the device
         /// </summary>
-        public IEnumerable<Service> Services
+        public IEnumerable<InternalService> Services
         {
             get
             {
@@ -57,9 +59,9 @@ namespace Tizen.Convergence
             }
         }
 
-        internal Device(IntPtr deviceHandle)
+        internal InternalDevice(IntPtr deviceHandle)
         {
-            int ret = Interop.ConvDevice.Clone(deviceHandle, out _deviceHandle);
+            int ret = Interop.Internal.ConvDevice.Clone(deviceHandle, out _deviceHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to clone device");
@@ -67,21 +69,21 @@ namespace Tizen.Convergence
             }
 
             IntPtr stringPtr = IntPtr.Zero;
-            ret = Interop.ConvDevice.GetPropertyString(_deviceHandle, DeviceIdKey, out stringPtr);
+            ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceIdKey, out stringPtr);
             if (ret == (int)ConvErrorCode.None)
             {
                 Id = Marshal.PtrToStringAnsi(stringPtr);
                 Interop.Libc.Free(stringPtr);
             }
 
-            ret = Interop.ConvDevice.GetPropertyString(_deviceHandle, DeviceNameKey, out stringPtr);
+            ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceNameKey, out stringPtr);
             if (ret == (int)ConvErrorCode.None)
             {
                 Name = Marshal.PtrToStringAnsi(stringPtr);
                 Interop.Libc.Free(stringPtr);
             }
 
-            ret = Interop.ConvDevice.GetPropertyString(_deviceHandle, DeviceTypeKey, out stringPtr);
+            ret = Interop.Internal.ConvDevice.GetPropertyString(_deviceHandle, DeviceTypeKey, out stringPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Type = Marshal.PtrToStringAnsi(stringPtr);
@@ -90,12 +92,12 @@ namespace Tizen.Convergence
 
             Log.Debug(ErrorFactory.LogTag, "Device ID ,Name, and Type:[" + Id +"," + Name +"," + Type +"]");
 
-            Interop.ConvDevice.ConvServiceForeachCallback cb = (IntPtr serviceHandle, IntPtr userData) =>
+            Interop.Internal.ConvDevice.ConvServiceForeachCallback cb = (IntPtr serviceHandle, IntPtr userData) =>
             {
-                    _services.Add(Service.GetService(serviceHandle));
+                    _services.Add(InternalService.GetService(serviceHandle));
             };
 
-            ret = Interop.ConvDevice.ForeachService(_deviceHandle, cb, IntPtr.Zero);
+            ret = Interop.Internal.ConvDevice.ForeachService(_deviceHandle, cb, IntPtr.Zero);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to get device services");
@@ -18,24 +18,26 @@ using System;
 using Tizen;
 using System.Threading;
 using System.Threading.Tasks;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// DeviceFinder provides API to find all nearby Tizen D2D convergence compliant devices
     /// </summary>
-    public class DeviceFinder : IDisposable
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalDeviceFinder : IDisposable
     {
-        internal Interop.ConvManagerHandle _convManagerHandle;
+        internal Interop.Internal.ConvManagerHandle _convManagerHandle;
 
         /// <summary>
         /// The constructor
         /// </summary>
         /// <feature>http://tizen.org/feature/convergence.d2d</feature>
         /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
-        public DeviceFinder()
+        public InternalDeviceFinder()
         {
-            int ret = Interop.ConvManager.ConvCreate(out _convManagerHandle);
+            int ret = Interop.Internal.ConvManager.ConvCreate(out _convManagerHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create conv manager handle");
@@ -47,7 +49,7 @@ namespace Tizen.Convergence
         /// <summary>
         /// DeviceFound event is triggered when a device is found during discovery procedure
         /// </summary>
-        public event EventHandler<DeviceFoundEventArgs> DeviceFound;
+        public event EventHandler<InternalDeviceFoundEventArgs> DeviceFound;
 
         /// <summary>
         /// Starts the discovery of nearby devices
@@ -64,32 +66,32 @@ namespace Tizen.Convergence
         public async Task StartFindingAsync(int timeOut, CancellationToken cancellationToken = default(CancellationToken))
         {
             var task = new TaskCompletionSource<bool>();
-            Interop.ConvManager.ConvDiscoveryCallback discoveredCb = (IntPtr deviceHandle, Interop.ConvDiscoveryResult result, IntPtr userData) =>
+            Interop.Internal.ConvManager.ConvDiscoveryCallback discoveredCb = (IntPtr deviceHandle, Interop.Internal.ConvDiscoveryResult result, IntPtr userData) =>
             {
                 Log.Debug(ErrorFactory.LogTag, "discovery callback called with result:[" + result + "]");
                 switch (result)
                 {
-                    case Interop.ConvDiscoveryResult.Success:
+                    case Interop.Internal.ConvDiscoveryResult.Success:
                         {
-                            Device device = new Device(deviceHandle);
-                            DeviceFoundEventArgs deviceFoundEventArgs = new DeviceFoundEventArgs()
+                            InternalDevice device = new InternalDevice(deviceHandle);
+                            InternalDeviceFoundEventArgs deviceFoundEventArgs = new InternalDeviceFoundEventArgs()
                             {
                                 Device = device
                             };
                             DeviceFound?.Invoke(this, deviceFoundEventArgs);
                             break;
                         }
-                    case Interop.ConvDiscoveryResult.Error:
+                    case Interop.Internal.ConvDiscoveryResult.Error:
                         {
                             task.TrySetException(new InvalidOperationException("Discovery error occured"));
                             break;
                         }
-                    case Interop.ConvDiscoveryResult.Lost:
+                    case Interop.Internal.ConvDiscoveryResult.Lost:
                         {
                             task.TrySetException(new InvalidOperationException("Discovery Lost"));
                             break;
                         }
-                    case Interop.ConvDiscoveryResult.Finished:
+                    case Interop.Internal.ConvDiscoveryResult.Finished:
                         {
                             Log.Debug(ErrorFactory.LogTag, "discovery process finished");
                             task.TrySetResult(true);
@@ -97,7 +99,7 @@ namespace Tizen.Convergence
                         }
                 }
             };
-            int ret = Interop.ConvManager.ConvDiscoveryStart(_convManagerHandle, timeOut, discoveredCb, IntPtr.Zero);
+            int ret = Interop.Internal.ConvManager.ConvDiscoveryStart(_convManagerHandle, timeOut, discoveredCb, IntPtr.Zero);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to start finding devices");
@@ -108,7 +110,7 @@ namespace Tizen.Convergence
             {
                 cancellationToken.Register(() =>
                 {
-                    int error = Interop.ConvManager.ConvDiscoveryStop(_convManagerHandle);
+                    int error = Interop.Internal.ConvManager.ConvDiscoveryStop(_convManagerHandle);
                     if (error != (int)ConvErrorCode.None)
                     {
                         Log.Error(ErrorFactory.LogTag, "Failed to stop finding devices" + Internals.Errors.ErrorFacts.GetErrorMessage(error));
 */
 
 using System;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// Contains arguments for the event DeviceFound.
     /// </summary>
-    public class DeviceFoundEventArgs : EventArgs
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalDeviceFoundEventArgs : EventArgs
     {
-        internal DeviceFoundEventArgs() { }
+        internal InternalDeviceFoundEventArgs() { }
 
         /// <summary>
         /// The device found
         /// </summary>
-        public Device Device { get; internal set; }
+        public InternalDevice Device { get; internal set; }
     }
 }
 
 using System;
 using System.Runtime.InteropServices;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// Represents a payload used in Tizen D2D convergence
     /// </summary>
-    public class Payload : IDisposable
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalPayload : IDisposable
     {
-        internal Interop.ConvPayloadHandle _payloadHandle;
+        internal Interop.Internal.ConvPayloadHandle _payloadHandle;
 
         /// <summary>
         /// The constructor
         /// </summary>
         /// <feature>http://tizen.org/feature/convergence.d2d</feature>
         /// <exception cref="NotSupportedException">Thrown if the required feature is not supported.</exception>
-        public Payload()
+        public InternalPayload()
         {
-            int ret = Interop.ConvPayload.Create(out _payloadHandle);
+            int ret = Interop.Internal.ConvPayload.Create(out _payloadHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create payload");
@@ -41,9 +43,9 @@ namespace Tizen.Convergence
             }
         }
 
-        internal Payload(IntPtr payloadHandle)
+        internal InternalPayload(IntPtr payloadHandle)
         {
-            _payloadHandle = new Interop.ConvPayloadHandle(payloadHandle, false);
+            _payloadHandle = new Interop.Internal.ConvPayloadHandle(payloadHandle, false);
         }
 
         /// <summary>
@@ -64,7 +66,7 @@ namespace Tizen.Convergence
             int ret = 0;
             if (value is string)
             {
-                ret = Interop.ConvPayload.SetString(_payloadHandle, key, value);
+                ret = Interop.Internal.ConvPayload.SetString(_payloadHandle, key, value);
                 if (ret != (int)ConvErrorCode.None)
                 {
                     Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
@@ -89,7 +91,7 @@ namespace Tizen.Convergence
             }
 
             int ret = 0;
-            ret = Interop.ConvPayload.SetByte(_payloadHandle, key, value.Length, value);
+            ret = Interop.Internal.ConvPayload.SetByte(_payloadHandle, key, value.Length, value);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
@@ -113,7 +115,7 @@ namespace Tizen.Convergence
             }
 
             int ret = 0;
-            ret = Interop.ConvPayload.SetBinary(_payloadHandle, value.Length, value);
+            ret = Interop.Internal.ConvPayload.SetBinary(_payloadHandle, value.Length, value);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to add binary to payload");
@@ -139,7 +141,7 @@ namespace Tizen.Convergence
 
             IntPtr stringPtr = IntPtr.Zero;
             int ret = 0;
-            ret = Interop.ConvPayload.GetString(_payloadHandle, key, out stringPtr);
+            ret = Interop.Internal.ConvPayload.GetString(_payloadHandle, key, out stringPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
@@ -169,7 +171,7 @@ namespace Tizen.Convergence
             int ret = 0;
             IntPtr byteArrayPtr;
             int byteArraySize;
-            ret = Interop.ConvPayload.GetByte(_payloadHandle, key, out byteArraySize, out byteArrayPtr);
+            ret = Interop.Internal.ConvPayload.GetByte(_payloadHandle, key, out byteArraySize, out byteArrayPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to add string to payload");
@@ -193,7 +195,7 @@ namespace Tizen.Convergence
             int ret = 0;
             IntPtr byteArrayPtr;
             int byteArraySize;
-            ret = Interop.ConvPayload.GetBinary(_payloadHandle, out byteArraySize, out byteArrayPtr);
+            ret = Interop.Internal.ConvPayload.GetBinary(_payloadHandle, out byteArraySize, out byteArrayPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to get binary from payload");
@@ -16,6 +16,7 @@
 
 using System;
 using System.Runtime.InteropServices;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
@@ -23,24 +24,25 @@ namespace Tizen.Convergence
     /// The class abstracts the features provided by Tizen D2D Convergence.
     /// </summary>
     /// <seealso cref="AppCommunicationService"/>
-    public abstract class Service : IDisposable
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public abstract class InternalService : IDisposable
     {
-        internal Interop.ConvServiceHandle _serviceHandle;
+        internal Interop.Internal.ConvServiceHandle _serviceHandle;
         internal const string ServiceIdKey = "service_id";
         internal const string ServiceVersionKey = "service_version";
 
-        private event EventHandler<ServiceEventOccuredEventArgs> _serviceEventOccured;
+        private event EventHandler<InternalServiceEventOccuredEventArgs> _serviceEventOccured;
 
-        internal Service(Interop.ServiceType type)
+        internal InternalService(Interop.Internal.ServiceType type)
         {
-            int ret = Interop.ConvService.Create(out _serviceHandle);
+            int ret = Interop.Internal.ConvService.Create(out _serviceHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create service handle");
                 throw ErrorFactory.GetException(ret);
             }
 
-            ret = Interop.ConvService.SetType(_serviceHandle, (int)type);
+            ret = Interop.Internal.ConvService.SetType(_serviceHandle, (int)type);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to create service handle");
@@ -48,9 +50,9 @@ namespace Tizen.Convergence
             }
         }
 
-        internal Service(IntPtr existingServiceHandle)
+        internal InternalService(IntPtr existingServiceHandle)
         {
-            int ret = Interop.ConvService.Clone(existingServiceHandle, out _serviceHandle);
+            int ret = Interop.Internal.ConvService.Clone(existingServiceHandle, out _serviceHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to clone device");
@@ -58,7 +60,7 @@ namespace Tizen.Convergence
             }
 
             IntPtr stringPtr = IntPtr.Zero;
-            ret = Interop.ConvService.GetPropertyString(_serviceHandle, ServiceIdKey, out stringPtr);
+            ret = Interop.Internal.ConvService.GetPropertyString(_serviceHandle, ServiceIdKey, out stringPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to get service Id");
@@ -68,7 +70,7 @@ namespace Tizen.Convergence
             Id = Marshal.PtrToStringAnsi(stringPtr);
             Interop.Libc.Free(stringPtr);
 
-            ret = Interop.ConvService.GetPropertyString(_serviceHandle, ServiceVersionKey, out stringPtr);
+            ret = Interop.Internal.ConvService.GetPropertyString(_serviceHandle, ServiceVersionKey, out stringPtr);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to get service version");
@@ -92,7 +94,7 @@ namespace Tizen.Convergence
         /// <summary>
         /// The event handler for Service Events(Start/Publish/Read/Stop)
         /// </summary>
-        public event EventHandler<ServiceEventOccuredEventArgs> ServiceEventOccurred
+        public event EventHandler<InternalServiceEventOccuredEventArgs> ServiceEventOccurred
         {
             add
             {
@@ -115,7 +117,7 @@ namespace Tizen.Convergence
         /// <summary>
         /// The event handler for service error events
         /// </summary>
-        public event EventHandler<ServiceErrorOccuredEventArgs> ServiceErrorOccured;
+        public event EventHandler<InternalServiceErrorOccuredEventArgs> ServiceErrorOccured;
 
         /// <summary>
         /// The dispose method
@@ -125,19 +127,19 @@ namespace Tizen.Convergence
             _serviceHandle.Dispose();
         }
 
-        internal static Service GetService(IntPtr serviceHandle)
+        internal static InternalService GetService(IntPtr serviceHandle)
         {
-            Service service = null;
+            InternalService service = null;
             int serviceType;
-            int ret = Interop.ConvService.GetType(serviceHandle, out serviceType);
+            int ret = Interop.Internal.ConvService.GetType(serviceHandle, out serviceType);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to get service version");
                 throw ErrorFactory.GetException(ret);
             }
-            if (serviceType == (int)Interop.ServiceType.AppCommunication)
+            if (serviceType == (int)Interop.Internal.ServiceType.AppCommunication)
             {
-                service = new AppCommunicationService(serviceHandle);
+                service = new InternalAppCommunicationService(serviceHandle);
             }
 
             return service;
@@ -145,7 +147,7 @@ namespace Tizen.Convergence
 
         private void RegisterServiceEventListener()
         {
-            int ret = Interop.ConvService.SetListenerCb(_serviceHandle, serviceEventsCb, IntPtr.Zero);
+            int ret = Interop.Internal.ConvService.SetListenerCb(_serviceHandle, serviceEventsCb, IntPtr.Zero);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to set listener for service events");
@@ -155,7 +157,7 @@ namespace Tizen.Convergence
 
         private void UnregisterServiceEventListener()
         {
-            int ret = Interop.ConvService.UnsetListenerCb(_serviceHandle);
+            int ret = Interop.Internal.ConvService.UnsetListenerCb(_serviceHandle);
             if (ret != (int)ConvErrorCode.None)
             {
                 Log.Error(ErrorFactory.LogTag, "Failed to unset listener for service events");
@@ -169,9 +171,9 @@ namespace Tizen.Convergence
 
             if (error == (int)ConvErrorCode.None)
             {
-                var channel = (channelHandle == IntPtr.Zero) ? null : new Channel(channelHandle);
-                var payload = (resultPayloadHandle == IntPtr.Zero) ? null : new Payload(resultPayloadHandle);
-                _serviceEventOccured?.Invoke(this, new ServiceEventOccuredEventArgs()
+                var channel = (channelHandle == IntPtr.Zero) ? null : new InternalChannel(channelHandle);
+                var payload = (resultPayloadHandle == IntPtr.Zero) ? null : new InternalPayload(resultPayloadHandle);
+                _serviceEventOccured?.Invoke(this, new InternalServiceEventOccuredEventArgs()
                 {
                     Payload = payload,
                     Channel = channel
@@ -179,7 +181,7 @@ namespace Tizen.Convergence
             }
             else
             {
-                var eventArgs = new ServiceErrorOccuredEventArgs()
+                var eventArgs = new InternalServiceErrorOccuredEventArgs()
                 {
                     Exception = ErrorFactory.GetException(error)
                 };
 */
 
 using System;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// Contains arguments for the event ServiceErrorOccured.
     /// </summary>
-    public class ServiceErrorOccuredEventArgs : EventArgs
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalServiceErrorOccuredEventArgs : EventArgs
     {
-        internal ServiceErrorOccuredEventArgs() { }
+        internal InternalServiceErrorOccuredEventArgs() { }
 
         /// <summary>
         /// The exception
 */
 
 using System;
+using System.ComponentModel;
 
 namespace Tizen.Convergence
 {
     /// <summary>
     /// Contains arguments for ServiceEventOccured
     /// </summary>
-    public class ServiceEventOccuredEventArgs : EventArgs
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class InternalServiceEventOccuredEventArgs : EventArgs
     {
-        internal ServiceEventOccuredEventArgs() { }
+        internal InternalServiceEventOccuredEventArgs() { }
 
         /// <summary>
         /// The channel on which the event occured
         /// </summary>
-        public Channel Channel { get; internal set; }
+        public InternalChannel Channel { get; internal set; }
 
         /// <summary>
         /// The payload containing the result
         /// </summary>
-        public Payload Payload { get; internal set; }
+        public InternalPayload Payload { get; internal set; }
     }
 }