[Bluetooth][Non-ACR] Add log for converting devcie info (#3303)
authorWootak Jung <wootak.jung@samsung.com>
Tue, 13 Jul 2021 02:20:15 +0000 (11:20 +0900)
committerGitHub <noreply@github.com>
Tue, 13 Jul 2021 02:20:15 +0000 (11:20 +0900)
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs

index b5f32ea..5d97666 100644 (file)
@@ -261,18 +261,21 @@ namespace Tizen.Network.Bluetooth
                 IntPtr[] extensionList = new IntPtr[device.ServiceCount];
                 Marshal.Copy (device.ServiceUuidList, extensionList, 0, device.ServiceCount);
                 uuidList = new Collection<string> ();
+                Log.Info(Globals.LogTag, "UUID Count: " + device.ServiceCount);
                 foreach (IntPtr extension in extensionList) {
-                    if (extension != IntPtr.Zero)
-                    {
+                    if (extension != IntPtr.Zero) {
                         string uuid = Marshal.PtrToStringAnsi (extension, UuidLengthMax);
+                        Log.Info(Globals.LogTag, "UUID: " + uuid);
                         uuidList.Add (uuid);
                     }
                 }
             }
 
             resultDevice.RemoteDeviceAddress = device.Address;
-            if (device.Name != IntPtr.Zero)
+            if (device.Name != IntPtr.Zero) {
                 resultDevice.RemoteDeviceName = Marshal.PtrToStringAnsi(device.Name, DeviceNameLengthMax);
+                Log.Info(Globals.LogTag, "Device Name: " + resultDevice.RemoteDeviceName);
+            }
             resultDevice.RemoteDeviceClass = new BluetoothClass();
             resultDevice.Class.MajorType = device.Class.MajorDeviceClassType;
             resultDevice.Class.MinorType = device.Class.MinorDeviceClassType;
@@ -301,18 +304,21 @@ namespace Tizen.Network.Bluetooth
                 IntPtr[] extensionList = new IntPtr[structDevice.ServiceCount];
                 Marshal.Copy (structDevice.ServiceUuidList, extensionList, 0, structDevice.ServiceCount);
                 uuidList = new Collection<string> ();
+                Log.Info(Globals.LogTag, "UUID Count: " + structDevice.ServiceCount);
                 foreach (IntPtr extension in extensionList) {
-                    if (extension != IntPtr.Zero)
-                    {
+                    if (extension != IntPtr.Zero) {
                         string uuid = Marshal.PtrToStringAnsi(extension, UuidLengthMax);
+                        Log.Info(Globals.LogTag, "UUID: " + uuid);
                         uuidList.Add(uuid);
                     }
                 }
             }
 
             resultDevice.RemoteDeviceAddress = structDevice.Address;
-            if (structDevice.Name != IntPtr.Zero)
+            if (structDevice.Name != IntPtr.Zero) {
                 resultDevice.RemoteDeviceName = Marshal.PtrToStringAnsi(structDevice.Name, DeviceNameLengthMax);
+                Log.Info(Globals.LogTag, "Device Name: " + resultDevice.RemoteDeviceName);
+            }
 
             resultDevice.RemoteDeviceClass = new BluetoothClass();
             resultDevice.Class.MajorType = structDevice.Class.MajorDeviceClassType;
@@ -345,8 +351,10 @@ namespace Tizen.Network.Bluetooth
                 IntPtr[] extensionList = new IntPtr[structData.ServiceCount];
                 Marshal.Copy (structData.ServiceUuid, extensionList, 0, structData.ServiceCount);
                 uuidList = new Collection<string> ();
+                Log.Info(Globals.LogTag, "UUID Count: " + structData.ServiceCount);
                 foreach (IntPtr extension in extensionList) {
                     string uuid = Marshal.PtrToStringAnsi (extension);
+                    Log.Info(Globals.LogTag, "UUID: " + uuid);
                     uuidList.Add (uuid);
                 }
             }