From 741c62a1af67c3ac018ad52d2663cd2daefdf004 Mon Sep 17 00:00:00 2001 From: Jooseok Park Date: Tue, 21 Mar 2017 11:17:24 +0900 Subject: [PATCH] Remove device name in remote resource - will be deprecated in native api Change-Id: Icd72b48763a10ff7a6d5a4e92dfe25002ed6da46 --- .../Interop/Interop.IoTConnectivity.Client.cs | 3 --- .../IoTConnectivityServerManager.cs | 2 -- .../RemoteResource.cs | 22 ---------------------- 3 files changed, 27 deletions(-) diff --git a/src/Tizen.Network.IoTConnectivity/Interop/Interop.IoTConnectivity.Client.cs b/src/Tizen.Network.IoTConnectivity/Interop/Interop.IoTConnectivity.Client.cs index 2063716..f1d4ace 100755 --- a/src/Tizen.Network.IoTConnectivity/Interop/Interop.IoTConnectivity.Client.cs +++ b/src/Tizen.Network.IoTConnectivity/Interop/Interop.IoTConnectivity.Client.cs @@ -166,9 +166,6 @@ internal static partial class Interop [DllImport(Libraries.IoTCon, EntryPoint = "iotcon_remote_resource_set_checking_interval")] internal static extern int SetTimeInterval(IntPtr resource, int timeInterval); - - [DllImport(Libraries.IoTCon, EntryPoint = "iotcon_remote_resource_get_device_name")] - internal static extern int GetDeviceName(IntPtr resource, out IntPtr deviceName); } internal static partial class IoTCon diff --git a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityServerManager.cs b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityServerManager.cs index 071c34c..dbd9456 100755 --- a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityServerManager.cs +++ b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityServerManager.cs @@ -254,13 +254,11 @@ namespace Tizen.Network.IoTConnectivity /// /// This API sets the name of the local device (the device calling the API).\n /// If the device name is set, clients can get the name using . - /// Clients can also get the name using property. /// /// The device name /// /// /// - /// /// /// IoTConnectivityServerManager.SetDeviceName("my-tizen"); /// diff --git a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/RemoteResource.cs b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/RemoteResource.cs index 2672517..ca57ffc 100755 --- a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/RemoteResource.cs +++ b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/RemoteResource.cs @@ -158,11 +158,6 @@ namespace Tizen.Network.IoTConnectivity public ResourcePolicy Policy { get; private set; } /// - /// The device name of the remote resource - /// - public string DeviceName { get; private set; } - - /// /// The header options of the resource /// /// Thrown when the iotcon is not supported @@ -761,15 +756,6 @@ namespace Tizen.Network.IoTConnectivity Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get remote resource"); throw IoTConnectivityErrorFactory.GetException(ret); } - - /*IntPtr deviceName; - ret = Interop.IoTConnectivity.Client.RemoteResource.GetDeviceName(_remoteResourceHandle, out deviceName); - if (ret != (int)IoTConnectivityError.None) - { - Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get device name of remote resource"); - throw IoTConnectivityErrorFactory.GetException(ret); - } - DeviceName = Marshal.PtrToStringAnsi(deviceName);*/ } private void SetRemoteResource() @@ -819,14 +805,6 @@ namespace Tizen.Network.IoTConnectivity Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get device id"); throw IoTConnectivityErrorFactory.GetException(ret); } - IntPtr deviceName; - ret = Interop.IoTConnectivity.Client.RemoteResource.GetDeviceName(_remoteResourceHandle, out deviceName); - if (ret != (int)IoTConnectivityError.None) - { - Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get device name of remote resource"); - throw IoTConnectivityErrorFactory.GetException(ret); - } - DeviceName = Marshal.PtrToStringAnsi(deviceName); DeviceId = Marshal.PtrToStringAnsi(deviceIdPtr); HostAddress = Marshal.PtrToStringAnsi(hostAddressPtr); UriPath = Marshal.PtrToStringAnsi(uriPathPtr); -- 2.7.4