Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 1413280

Browse files
committed
v1.0.4 commit
1 parent 04934eb commit 1413280

File tree

6 files changed

+25
-15
lines changed

6 files changed

+25
-15
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PM> Install-Package Warble.Net
1010

1111
Or add a **PackageReference** tag to your *.csproj file:
1212
```xml
13-
<PackageReference Include="Warble.Net" Version="[1.0, 2.0)" />
13+
<PackageReference Include="Warble.Net" Version="[1.0.4, 2.0)" />
1414
```
1515

1616
Linux developers will also need to build Warble on their machine and place the .so files in the appropriate folders.

Warble.NetStandard/Gatt.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public Gatt(string mac, string hci = null, string addrType = null) {
3535
options[0].key = "mac";
3636
options[0].value = mac;
3737
if (hci != null && RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
38-
options[1].key = "hci";
39-
options[1].value = hci;
38+
options[actualSize].key = "hci";
39+
options[actualSize].value = hci;
4040
actualSize++;
4141
}
4242
if (addrType != null) {
43-
options[2].key = "address-type";
44-
options[2].value = addrType;
43+
options[actualSize].key = "address-type";
44+
options[actualSize].value = addrType;
4545
actualSize++;
4646
}
4747

Warble.NetStandard/GattChar.cs

+13-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class GattChar {
1313
/// </summary>
1414
public String Uuid { get => Marshal.PtrToStringAnsi(warble_gattchar_get_uuid(WarbleGattChar)); }
1515
/// <summary>
16-
/// Handler to process characteristic notifications
16+
/// Handler to process characteristic notifications, <see cref="EnableNotificationsAsync"/>
1717
/// </summary>
1818
public Action<byte[]> OnNotificationReceived { get; set; }
1919

@@ -102,20 +102,29 @@ private async Task EditNotification(Action<FnVoid_VoidP_WarbleGattCharP_CharP> f
102102
await warbleTaskSrc.Task;
103103
}
104104
/// <summary>
105-
/// Enables characteristic notifications, which are forwarded to <see cref="OnNotificationReceived"/>
105+
/// Enables characteristic notifications, which are forwarded to the <see cref="OnNotificationReceived"/> delegate
106106
/// </summary>
107107
/// <returns>Null when notifications are enabled</returns>
108108
/// <exception cref="WarbleException">If notify enable operation fails</exception>
109-
public Task EnableNotifications() {
109+
public Task EnableNotificationsAsync() {
110110
return EditNotification(completed => warble_gattchar_enable_notifications_async(WarbleGattChar, IntPtr.Zero, completed));
111111
}
112112
/// <summary>
113113
/// Disables characteristic notifications
114114
/// </summary>
115115
/// <returns>Null when notifications are disabled</returns>
116116
/// <exception cref="WarbleException">If notify disable operation fails</exception>
117-
public Task DisableNotifications() {
117+
public Task DisableNotificationsAsync() {
118118
return EditNotification(completed => warble_gattchar_disable_notifications_async(WarbleGattChar, IntPtr.Zero, completed));
119119
}
120+
121+
[Obsolete("Deprecated in v1.0.4, use EnableNotificationsAsync instead")]
122+
public Task EnableNotifications() {
123+
return EnableNotificationsAsync();
124+
}
125+
[Obsolete("Deprecated in v1.0.4, use DisableNotificationsAsync instead")]
126+
public Task DisableNotifications() {
127+
return DisableNotificationsAsync();
128+
}
120129
}
121130
}

Warble.NetStandard/Warble.NetStandard.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
<AssemblyName>Warble.NetStandard</AssemblyName>
66
<RootNamespace>MbientLab.Warble</RootNamespace>
77
<SignAssembly>false</SignAssembly>
8-
<AssemblyOriginatorKeyFile>mbientlab.pfx</AssemblyOriginatorKeyFile>
9-
<DelaySign>false</DelaySign>
8+
<Version>1.0.4</Version>
9+
<NeutralLanguage>en-US</NeutralLanguage>
10+
<AssemblyVersion>1.0.0.0</AssemblyVersion>
1011
</PropertyGroup>
1112

1213
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

nuget/Warble.NetStandard.nuspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<metadata minClientVersion="4.1">
44
<id>Warble.Net</id>
55
<title>Warble.Net</title>
6-
<version>1.0.0</version>
6+
<version>1.0.4</version>
77
<authors>MbientLab</authors>
88
<owners>MbientLab</owners>
99
<licenseUrl>https://mbientlab.com/license/</licenseUrl>
1010
<projectUrl>https://github.com/mbientlab/Warble.NET</projectUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1212
<copyright>Copyright 2018(c). MbientLab Inc</copyright>
1313
<summary>.NET Standard C# Bluetooth LE API</summary>
14-
<description>Warble.NET provides a platform agnostic C# API for both Linux and Windows 10.</description>
14+
<description>Warble.NET provides a platform agnostic C# API around the Warble C library</description>
1515
<tags>bluetoothle netstandard2.0 native</tags>
1616
</metadata>
1717
<files>
@@ -20,4 +20,4 @@
2020
<file src="..\clibs\warble\vs2017\Release\warble.dll" target="runtimes\win10-x86\native" />
2121
<file src="..\clibs\warble\vs2017\x64\Release\warble.dll" target="runtimes\win10-x64\native" />
2222
</files>
23-
</package>
23+
</package>

0 commit comments

Comments
 (0)