-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
296 additions
and
76 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/Uno.UWP/Devices/Bluetooth/Advertisement/BluetoothLEAdvertisement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Windows.Devices.Bluetooth.Advertisement | ||
{ | ||
public partial class BluetoothLEAdvertisement | ||
{ | ||
public string LocalName { get; set; } | ||
public BluetoothLEAdvertisementFlags? Flags { get; set; } | ||
public IList<BluetoothLEAdvertisementDataSection> DataSections { get; internal set; } | ||
public IList<BluetoothLEManufacturerData> ManufacturerData { get; internal set; } | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/Uno.UWP/Devices/Bluetooth/Advertisement/BluetoothLEAdvertisementDataSection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.Advertisement | ||
{ | ||
public partial class BluetoothLEAdvertisementDataSection | ||
{ | ||
public byte DataType { get; set; } | ||
public Storage.Streams.IBuffer Data { get; set; } | ||
public BluetoothLEAdvertisementDataSection(byte dataType, Storage.Streams.IBuffer data) | ||
{ | ||
DataType = dataType; | ||
Data = data; | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Uno.UWP/Devices/Bluetooth/Advertisement/BluetoothLEAdvertisementFlags.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.Advertisement | ||
{ | ||
public enum BluetoothLEAdvertisementFlags : uint | ||
{ | ||
None = 0, | ||
LimitedDiscoverableMode = 1, | ||
GeneralDiscoverableMode = 2, | ||
ClassicNotSupported = 4, | ||
DualModeControllerCapable = 8, | ||
DualModeHostCapable = 16, | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Uno.UWP/Devices/Bluetooth/Advertisement/BluetoothLEManufacturerData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.Advertisement | ||
{ | ||
public partial class BluetoothLEManufacturerData | ||
{ | ||
public Storage.Streams.IBuffer Data { get; set; } | ||
public ushort CompanyId { get; set; } | ||
public BluetoothLEManufacturerData( ushort companyId, Storage.Streams.IBuffer data) | ||
{ | ||
CompanyId = companyId; | ||
Data = data; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattCharacteristic.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
| ||
using System; | ||
|
||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattCharacteristic | ||
{ | ||
public GattCharacteristicProperties CharacteristicProperties { get; internal set; } | ||
public Guid Uuid { get; internal set; } | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattCharacteristicProperties.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public enum GattCharacteristicProperties : uint | ||
{ | ||
None = 0, | ||
Broadcast = 1, | ||
Read = 2, | ||
WriteWithoutResponse = 4, | ||
Write = 8, | ||
Notify = 16, | ||
Indicate = 32, | ||
AuthenticatedSignedWrites = 64, | ||
ExtendedProperties = 128, | ||
ReliableWrites = 256, | ||
WritableAuxiliaries = 512, | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattCharacteristicsResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
| ||
using System.Collections.Generic; | ||
|
||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattCharacteristicsResult | ||
{ | ||
public IReadOnlyList<GattCharacteristic> Characteristics { get; internal set; } | ||
public byte? ProtocolError { get; internal set; } | ||
public GattCommunicationStatus Status { get; internal set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattCommunicationStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public enum GattCommunicationStatus | ||
{ | ||
Success = 0, | ||
Unreachable = 1, | ||
ProtocolError = 2, | ||
AccessDenied = 3, | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
|
||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattDescriptor | ||
{ | ||
public Guid Uuid { get; internal set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattDescriptorsResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattDescriptorsResult | ||
{ | ||
public IReadOnlyList<GattDescriptor> Descriptors { get; internal set; } | ||
public byte? ProtocolError { get; internal set; } | ||
public GattCommunicationStatus Status { get; internal set; } | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattDeviceService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
| ||
using System; | ||
|
||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattDeviceService : IDisposable | ||
{ | ||
public Guid Uuid { get; internal set; } | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattDeviceServicesResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattDeviceServicesResult | ||
{ | ||
public byte? ProtocolError { get; internal set; } | ||
public IReadOnlyList<GattDeviceService> Services { get; internal set; } | ||
public GattCommunicationStatus Status { get; internal set; } | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattProtocolError.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public static partial class GattProtocolError | ||
{ | ||
public static byte AttributeNotFound => 10; | ||
public static byte AttributeNotLong => 11; | ||
public static byte InsufficientAuthentication => 5; | ||
public static byte InsufficientAuthorization => 8; | ||
public static byte InsufficientEncryption => 15; | ||
public static byte InsufficientEncryptionKeySize => 12; | ||
public static byte InsufficientResources => 17; | ||
public static byte InvalidAttributeValueLength => 13; | ||
public static byte InvalidHandle => 1; | ||
public static byte InvalidOffset => 7; | ||
public static byte InvalidPdu => 4; | ||
public static byte PrepareQueueFull => 9; | ||
public static byte ReadNotPermitted => 2; | ||
public static byte RequestNotSupported => 6; | ||
public static byte UnlikelyError => 14; | ||
public static byte UnsupportedGroupType => 15; | ||
public static byte WriteNotPermitted => 3; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/Uno.UWP/Devices/Bluetooth/GenericAttributeProfile/GattReadResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
| ||
namespace Windows.Devices.Bluetooth.GenericAttributeProfile | ||
{ | ||
public partial class GattReadResult | ||
{ | ||
public GattCommunicationStatus Status { get; internal set; } | ||
public Storage.Streams.IBuffer Value { get; internal set; } | ||
public byte? ProtocolError { get; internal set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
| ||
namespace Windows.Devices.Enumeration | ||
{ | ||
public partial class DeviceAccessInformation | ||
{ | ||
public DeviceAccessStatus CurrentStatus { get; internal set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
| ||
#pragma warning disable 108 // new keyword hiding | ||
#pragma warning disable 114 // new keyword hiding | ||
namespace Windows.Devices.Enumeration | ||
{ | ||
public enum DeviceAccessStatus | ||
{ | ||
Unspecified = 0, | ||
Allowed = 1, | ||
DeniedByUser = 2, | ||
DeniedBySystem = 3, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.