internal static BluetoothDeviceSdpData ConvertStructToSdpData(BluetoothDeviceSdpStruct structData) { BluetoothDeviceSdpData resultData = new BluetoothDeviceSdpData(); Collection <string> uuidList = null; if (structData.ServiceCount > 0) { IntPtr[] extensionList = new IntPtr[structData.ServiceCount]; Marshal.Copy(structData.ServiceUuid, extensionList, 0, structData.ServiceCount); uuidList = new Collection <string> (); foreach (IntPtr extension in extensionList) { string uuid = Marshal.PtrToStringAnsi(extension); uuidList.Add(uuid); } } resultData.Uuid = uuidList; resultData.Address = structData.DeviceAddress; return(resultData); }
internal ServiceSearchedEventArgs(BluetoothError result, BluetoothDeviceSdpData sdpData) { _result = result; _sdpData = sdpData; }