Skip to content

Commit

Permalink
Merge pull request #26 from smdn/releases/Smdn.TPSmartHomeDevices.Tap…
Browse files Browse the repository at this point in the history
…o-2.0.0-preview3-1704697691

Release main/Smdn.TPSmartHomeDevices.Tapo-2.0.0-preview3
  • Loading branch information
smdn authored Jan 8, 2024
2 parents 431906b + c4d1ce6 commit 9adf4ac
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Smdn.TPSmartHomeDevices.Tapo.dll (Smdn.TPSmartHomeDevices.Tapo-2.0.0-preview2)
// Smdn.TPSmartHomeDevices.Tapo.dll (Smdn.TPSmartHomeDevices.Tapo-2.0.0-preview3)
// Name: Smdn.TPSmartHomeDevices.Tapo
// AssemblyVersion: 2.0.0.0
// InformationalVersion: 2.0.0-preview2+297c36b69acac89037a580a95eda0233f9529f71
// InformationalVersion: 2.0.0-preview3+431906bdfe9a3cf559bfddbf5593f2ab1e266f1b
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Smdn.Fundamental.PrintableEncoding.Hexadecimal, Version=3.0.1.0, Culture=neutral
// Smdn.TPSmartHomeDevices.Primitives, Version=1.0.0.0, Culture=neutral
// Smdn.TPSmartHomeDevices.Primitives, Version=1.1.0.0, Culture=neutral
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Expand Down Expand Up @@ -46,7 +46,10 @@
using Smdn.TPSmartHomeDevices.Tapo.Protocol;

namespace Smdn.TPSmartHomeDevices.Tapo {
public class L530 : TapoDevice {
public class L530 :
TapoDevice,
IMulticolorSmartLight
{
public static L530 Create<TAddress>(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {}

public L530(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {}
Expand All @@ -62,9 +65,15 @@ public ValueTask SetColorAsync(int hue, int saturation, int? brightness = null,
public ValueTask SetColorHueAsync(int hue, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorSaturationAsync(int saturation, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorTemperatureAsync(int colorTemperature, int? brightness = null, CancellationToken cancellationToken = default) {}
ValueTask IMulticolorSmartLight.SetBrightnessAsync(int brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorAsync(int hue, int saturation, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorTemperatureAsync(int colorTemperature, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
}

public class L900 : TapoDevice {
public class L900 :
TapoDevice,
IMulticolorSmartLight
{
public static L900 Create<TAddress>(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {}

public L900(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {}
Expand All @@ -79,9 +88,16 @@ public ValueTask SetBrightnessAsync(int brightness, CancellationToken cancellati
public ValueTask SetColorAsync(int hue, int saturation, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorHueAsync(int hue, int? brightness, CancellationToken cancellationToken = default) {}
public ValueTask SetColorSaturationAsync(int saturation, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorTemperatureAsync(int colorTemperature, int? brightness = null, CancellationToken cancellationToken = default) {}
ValueTask IMulticolorSmartLight.SetBrightnessAsync(int brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorAsync(int hue, int saturation, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorTemperatureAsync(int colorTemperature, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
}

public class P105 : TapoDevice {
public class P105 :
TapoDevice,
ISmartPlug
{
public static P105 Create<TAddress>(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {}

public P105(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {}
Expand All @@ -99,6 +115,7 @@ public TapoAuthenticationException(string message, Uri endPoint, Exception? inne

public static class TapoCredentailProviderServiceCollectionExtensions {
public static IServiceCollection AddTapoBase64EncodedCredential(this IServiceCollection services, string base64UserNameSHA1Digest, string base64Password) {}
public static IServiceCollection AddTapoBase64EncodedKlapCredentialFromEnvironmentVariable(this IServiceCollection services, string envVarBase64KlapLocalAuthHash) {}
public static IServiceCollection AddTapoCredential(this IServiceCollection services, string email, string password) {}
public static IServiceCollection AddTapoCredentialFromEnvironmentVariable(this IServiceCollection services, string envVarUsername, string envVarPassword) {}
public static IServiceCollection AddTapoCredentialProvider(this IServiceCollection services, ITapoCredentialProvider credentialProvider) {}
Expand Down Expand Up @@ -273,8 +290,6 @@ public override string ToString() {}

namespace Smdn.TPSmartHomeDevices.Tapo.Credentials {
public interface ITapoCredential : IDisposable {
int HashPassword(HashAlgorithm algorithm, Span<byte> destination);
int HashUsername(HashAlgorithm algorithm, Span<byte> destination);
void WritePasswordPropertyValue(Utf8JsonWriter writer);
void WriteUsernamePropertyValue(Utf8JsonWriter writer);
}
Expand All @@ -284,14 +299,19 @@ public interface ITapoCredentialIdentity {

public interface ITapoCredentialProvider {
ITapoCredential GetCredential(ITapoCredentialIdentity? identity);
ITapoKlapCredential GetKlapCredential(ITapoCredentialIdentity? identity);
}

public interface ITapoKlapCredential : IDisposable {
void WriteLocalAuthHash(Span<byte> destination);
}

public static class TapoCredentials {
public const int HexSHA1HashSizeInBytes = 40;

public static string ToBase64EncodedSHA1DigestString(ReadOnlySpan<char> str) {}
public static string ToBase64EncodedString(ReadOnlySpan<char> str) {}
public static bool TryComputeKlapAuthHash(ITapoCredential credential, Span<byte> destination, out int bytesWritten) {}
public static bool TryComputeKlapLocalAuthHash(ReadOnlySpan<byte> username, ReadOnlySpan<byte> password, Span<byte> destination, out int bytesWritten) {}
public static bool TryConvertToHexSHA1Hash(ReadOnlySpan<byte> input, Span<byte> destination, out int bytesWritten) {}
}
}
Expand Down Expand Up @@ -530,5 +550,5 @@ public SetDeviceInfoRequest(string terminalUuid, TParameters parameters) {}
public TResult Result { get; init; }
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.0.
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.3.2.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Smdn.TPSmartHomeDevices.Tapo.dll (Smdn.TPSmartHomeDevices.Tapo-2.0.0-preview2)
// Smdn.TPSmartHomeDevices.Tapo.dll (Smdn.TPSmartHomeDevices.Tapo-2.0.0-preview3)
// Name: Smdn.TPSmartHomeDevices.Tapo
// AssemblyVersion: 2.0.0.0
// InformationalVersion: 2.0.0-preview2+297c36b69acac89037a580a95eda0233f9529f71
// TargetFramework: .NETCoreApp,Version=v7.0
// InformationalVersion: 2.0.0-preview3+431906bdfe9a3cf559bfddbf5593f2ab1e266f1b
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Smdn.Fundamental.PrintableEncoding.Hexadecimal, Version=3.0.1.0, Culture=neutral
// Smdn.TPSmartHomeDevices.Primitives, Version=1.0.0.0, Culture=neutral
// System.Collections, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Http.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// Smdn.TPSmartHomeDevices.Primitives, Version=1.1.0.0, Culture=neutral
// System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Http.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.NetworkInformation, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations

using System;
Expand All @@ -44,7 +44,10 @@
using Smdn.TPSmartHomeDevices.Tapo.Protocol;

namespace Smdn.TPSmartHomeDevices.Tapo {
public class L530 : TapoDevice {
public class L530 :
TapoDevice,
IMulticolorSmartLight
{
public static L530 Create<TAddress>(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {}

public L530(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {}
Expand All @@ -60,9 +63,15 @@ public ValueTask SetColorAsync(int hue, int saturation, int? brightness = null,
public ValueTask SetColorHueAsync(int hue, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorSaturationAsync(int saturation, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorTemperatureAsync(int colorTemperature, int? brightness = null, CancellationToken cancellationToken = default) {}
ValueTask IMulticolorSmartLight.SetBrightnessAsync(int brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorAsync(int hue, int saturation, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorTemperatureAsync(int colorTemperature, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
}

public class L900 : TapoDevice {
public class L900 :
TapoDevice,
IMulticolorSmartLight
{
public static L900 Create<TAddress>(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {}

public L900(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {}
Expand All @@ -77,9 +86,16 @@ public ValueTask SetBrightnessAsync(int brightness, CancellationToken cancellati
public ValueTask SetColorAsync(int hue, int saturation, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorHueAsync(int hue, int? brightness, CancellationToken cancellationToken = default) {}
public ValueTask SetColorSaturationAsync(int saturation, int? brightness = null, CancellationToken cancellationToken = default) {}
public ValueTask SetColorTemperatureAsync(int colorTemperature, int? brightness = null, CancellationToken cancellationToken = default) {}
ValueTask IMulticolorSmartLight.SetBrightnessAsync(int brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorAsync(int hue, int saturation, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
ValueTask IMulticolorSmartLight.SetColorTemperatureAsync(int colorTemperature, int? brightness, TimeSpan transitionPeriod, CancellationToken cancellationToken) {}
}

public class P105 : TapoDevice {
public class P105 :
TapoDevice,
ISmartPlug
{
public static P105 Create<TAddress>(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {}

public P105(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {}
Expand All @@ -97,6 +113,7 @@ public TapoAuthenticationException(string message, Uri endPoint, Exception? inne

public static class TapoCredentailProviderServiceCollectionExtensions {
public static IServiceCollection AddTapoBase64EncodedCredential(this IServiceCollection services, string base64UserNameSHA1Digest, string base64Password) {}
public static IServiceCollection AddTapoBase64EncodedKlapCredentialFromEnvironmentVariable(this IServiceCollection services, string envVarBase64KlapLocalAuthHash) {}
public static IServiceCollection AddTapoCredential(this IServiceCollection services, string email, string password) {}
public static IServiceCollection AddTapoCredentialFromEnvironmentVariable(this IServiceCollection services, string envVarUsername, string envVarPassword) {}
public static IServiceCollection AddTapoCredentialProvider(this IServiceCollection services, ITapoCredentialProvider credentialProvider) {}
Expand Down Expand Up @@ -271,8 +288,6 @@ public override string ToString() {}

namespace Smdn.TPSmartHomeDevices.Tapo.Credentials {
public interface ITapoCredential : IDisposable {
int HashPassword(HashAlgorithm algorithm, Span<byte> destination);
int HashUsername(HashAlgorithm algorithm, Span<byte> destination);
void WritePasswordPropertyValue(Utf8JsonWriter writer);
void WriteUsernamePropertyValue(Utf8JsonWriter writer);
}
Expand All @@ -282,14 +297,19 @@ public interface ITapoCredentialIdentity {

public interface ITapoCredentialProvider {
ITapoCredential GetCredential(ITapoCredentialIdentity? identity);
ITapoKlapCredential GetKlapCredential(ITapoCredentialIdentity? identity);
}

public interface ITapoKlapCredential : IDisposable {
void WriteLocalAuthHash(Span<byte> destination);
}

public static class TapoCredentials {
public const int HexSHA1HashSizeInBytes = 40;

public static string ToBase64EncodedSHA1DigestString(ReadOnlySpan<char> str) {}
public static string ToBase64EncodedString(ReadOnlySpan<char> str) {}
public static bool TryComputeKlapAuthHash(ITapoCredential credential, Span<byte> destination, out int bytesWritten) {}
public static bool TryComputeKlapLocalAuthHash(ReadOnlySpan<byte> username, ReadOnlySpan<byte> password, Span<byte> destination, out int bytesWritten) {}
public static bool TryConvertToHexSHA1Hash(ReadOnlySpan<byte> input, Span<byte> destination, out int bytesWritten) {}
}
}
Expand Down Expand Up @@ -528,5 +548,5 @@ public SetDeviceInfoRequest(string terminalUuid, TParameters parameters) {}
public TResult Result { get; init; }
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.0.
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.3.2.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
Loading

0 comments on commit 9adf4ac

Please sign in to comment.