From 7316ebbb18667e5fafe403a1df9ec0fe818345ac Mon Sep 17 00:00:00 2001 From: Jooseok Park Date: Fri, 24 Mar 2017 14:10:14 +0900 Subject: [PATCH] Add EventContinue attribute - after receiving finding callback, the stop functionality for finding callback is needed Change-Id: Ief35781171ec040a4fe478d9c016898dd39a621b --- .../DeviceInformationFoundEventArgs.cs | 5 +++++ .../Tizen.Network.IoTConnectivity/IoTConnectivityClientManager.cs | 7 +++++++ .../PlatformInformationFoundEventArgs.cs | 5 +++++ .../Tizen.Network.IoTConnectivity/ResourceFoundEventArgs.cs | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/DeviceInformationFoundEventArgs.cs b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/DeviceInformationFoundEventArgs.cs index 76b56cd..fe585a5 100755 --- a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/DeviceInformationFoundEventArgs.cs +++ b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/DeviceInformationFoundEventArgs.cs @@ -30,6 +30,11 @@ namespace Tizen.Network.IoTConnectivity public int RequestId { get; internal set; } /// + /// Indicates to continuously receive the event for finding device information. + /// + public bool EventContinue { get; set; } + + /// /// Indicates human friendly name for device /// public string Name { get; internal set; } diff --git a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityClientManager.cs b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityClientManager.cs index 7711b44..066d8ce 100755 --- a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityClientManager.cs +++ b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/IoTConnectivityClientManager.cs @@ -488,6 +488,8 @@ namespace Tizen.Network.IoTConnectivity Resource = resource }; ResourceFound?.Invoke(null, e); + Log.Info(IoTConnectivityErrorFactory.LogTag, "e.EventContinue : " + e.EventContinue); + return e.EventContinue; } else { @@ -585,6 +587,8 @@ namespace Tizen.Network.IoTConnectivity return true; } DeviceInformationFound?.Invoke(null, e); + Log.Info(IoTConnectivityErrorFactory.LogTag, "e.EventContinue : " + e.EventContinue); + return e.EventContinue; } else { @@ -683,6 +687,8 @@ namespace Tizen.Network.IoTConnectivity return true; ; } PlatformInformationFound?.Invoke(null, e); + Log.Info(IoTConnectivityErrorFactory.LogTag, "e.EventContinue : " + e.EventContinue); + return e.EventContinue; } else { @@ -790,6 +796,7 @@ namespace Tizen.Network.IoTConnectivity DeviceInformationFoundEventArgs e = new DeviceInformationFoundEventArgs() { RequestId = requestId, + EventContinue = true, Name = Marshal.PtrToStringAnsi(name), SpecVersion = Marshal.PtrToStringAnsi(specVersion), DeviceId = Marshal.PtrToStringAnsi(deviceId), diff --git a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/PlatformInformationFoundEventArgs.cs b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/PlatformInformationFoundEventArgs.cs index 633083d..c6e6642 100755 --- a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/PlatformInformationFoundEventArgs.cs +++ b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/PlatformInformationFoundEventArgs.cs @@ -30,6 +30,11 @@ namespace Tizen.Network.IoTConnectivity public int RequestId { get; internal set; } /// + /// Indicates to continuously receive the event for finding platform information. + /// + public bool EventContinue { get; set; } + + /// /// Indicates the platform identifier /// public string PlatformId { get; internal set; } diff --git a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceFoundEventArgs.cs b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceFoundEventArgs.cs index 5b1338b..7195cf1 100755 --- a/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceFoundEventArgs.cs +++ b/src/Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/ResourceFoundEventArgs.cs @@ -33,6 +33,11 @@ namespace Tizen.Network.IoTConnectivity public int RequestId { get; internal set; } /// + /// Indicates to continuously receive the event for finding resource. + /// + public bool EventContinue { get; set; } + + /// /// Remote resource which is found after . /// /// -- 2.7.4