From c4d1ce671eff8847a51808bd845b144809dfc032 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 8 Jan 2024 07:08:50 +0000 Subject: [PATCH] update API list Smdn.TPSmartHomeDevices.Tapo-2.0.0-preview3 --- ....TPSmartHomeDevices.Tapo-net6.0.apilist.cs | 40 ++++++++--- ...TPSmartHomeDevices.Tapo-net8.0.apilist.cs} | 66 ++++++++++++------- ...HomeDevices.Tapo-netstandard2.1.apilist.cs | 40 ++++++++--- 3 files changed, 103 insertions(+), 43 deletions(-) rename doc/api-list/Smdn.TPSmartHomeDevices.Tapo/{Smdn.TPSmartHomeDevices.Tapo-net7.0.apilist.cs => Smdn.TPSmartHomeDevices.Tapo-net8.0.apilist.cs} (90%) diff --git a/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net6.0.apilist.cs b/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net6.0.apilist.cs index 44adf8f..916c0ac 100644 --- a/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net6.0.apilist.cs +++ b/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net6.0.apilist.cs @@ -1,7 +1,7 @@ -// 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: @@ -9,7 +9,7 @@ // 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 @@ -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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public L530(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public L900(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public P105(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -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) {} @@ -273,8 +290,6 @@ public override string ToString() {} namespace Smdn.TPSmartHomeDevices.Tapo.Credentials { public interface ITapoCredential : IDisposable { - int HashPassword(HashAlgorithm algorithm, Span destination); - int HashUsername(HashAlgorithm algorithm, Span destination); void WritePasswordPropertyValue(Utf8JsonWriter writer); void WriteUsernamePropertyValue(Utf8JsonWriter writer); } @@ -284,6 +299,11 @@ public interface ITapoCredentialIdentity { public interface ITapoCredentialProvider { ITapoCredential GetCredential(ITapoCredentialIdentity? identity); + ITapoKlapCredential GetKlapCredential(ITapoCredentialIdentity? identity); + } + + public interface ITapoKlapCredential : IDisposable { + void WriteLocalAuthHash(Span destination); } public static class TapoCredentials { @@ -291,7 +311,7 @@ public static class TapoCredentials { public static string ToBase64EncodedSHA1DigestString(ReadOnlySpan str) {} public static string ToBase64EncodedString(ReadOnlySpan str) {} - public static bool TryComputeKlapAuthHash(ITapoCredential credential, Span destination, out int bytesWritten) {} + public static bool TryComputeKlapLocalAuthHash(ReadOnlySpan username, ReadOnlySpan password, Span destination, out int bytesWritten) {} public static bool TryConvertToHexSHA1Hash(ReadOnlySpan input, Span destination, out int bytesWritten) {} } } @@ -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) diff --git a/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net7.0.apilist.cs b/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net8.0.apilist.cs similarity index 90% rename from doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net7.0.apilist.cs rename to doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net8.0.apilist.cs index a79ac2d..83bbce3 100644 --- a/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net7.0.apilist.cs +++ b/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-net8.0.apilist.cs @@ -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; @@ -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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public L530(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public L900(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public P105(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -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) {} @@ -271,8 +288,6 @@ public override string ToString() {} namespace Smdn.TPSmartHomeDevices.Tapo.Credentials { public interface ITapoCredential : IDisposable { - int HashPassword(HashAlgorithm algorithm, Span destination); - int HashUsername(HashAlgorithm algorithm, Span destination); void WritePasswordPropertyValue(Utf8JsonWriter writer); void WriteUsernamePropertyValue(Utf8JsonWriter writer); } @@ -282,6 +297,11 @@ public interface ITapoCredentialIdentity { public interface ITapoCredentialProvider { ITapoCredential GetCredential(ITapoCredentialIdentity? identity); + ITapoKlapCredential GetKlapCredential(ITapoCredentialIdentity? identity); + } + + public interface ITapoKlapCredential : IDisposable { + void WriteLocalAuthHash(Span destination); } public static class TapoCredentials { @@ -289,7 +309,7 @@ public static class TapoCredentials { public static string ToBase64EncodedSHA1DigestString(ReadOnlySpan str) {} public static string ToBase64EncodedString(ReadOnlySpan str) {} - public static bool TryComputeKlapAuthHash(ITapoCredential credential, Span destination, out int bytesWritten) {} + public static bool TryComputeKlapLocalAuthHash(ReadOnlySpan username, ReadOnlySpan password, Span destination, out int bytesWritten) {} public static bool TryConvertToHexSHA1Hash(ReadOnlySpan input, Span destination, out int bytesWritten) {} } } @@ -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) diff --git a/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-netstandard2.1.apilist.cs b/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-netstandard2.1.apilist.cs index c66384e..83d87d9 100644 --- a/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-netstandard2.1.apilist.cs +++ b/doc/api-list/Smdn.TPSmartHomeDevices.Tapo/Smdn.TPSmartHomeDevices.Tapo-netstandard2.1.apilist.cs @@ -1,7 +1,7 @@ -// 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: .NETStandard,Version=v2.1 // Configuration: Release // Referenced assemblies: @@ -9,7 +9,7 @@ // 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.Net.Http.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 // System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 // System.Text.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 @@ -35,7 +35,10 @@ using Smdn.TPSmartHomeDevices.Tapo.Protocol; namespace Smdn.TPSmartHomeDevices.Tapo { - public class L530 : TapoDevice { + public class L530 : + TapoDevice, + IMulticolorSmartLight + { public static L530 Create(TAddress deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public L530(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -51,9 +54,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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public L900(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -68,9 +77,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 deviceAddress, IServiceProvider serviceProvider, ITapoCredentialProvider? credential = null) where TAddress : notnull {} public P105(IDeviceEndPoint deviceEndPoint, ITapoCredentialProvider? credential = null, IServiceProvider? serviceProvider = null) {} @@ -88,6 +104,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) {} @@ -261,8 +278,6 @@ public override string ToString() {} namespace Smdn.TPSmartHomeDevices.Tapo.Credentials { public interface ITapoCredential : IDisposable { - int HashPassword(HashAlgorithm algorithm, Span destination); - int HashUsername(HashAlgorithm algorithm, Span destination); [...] WritePasswordPropertyValue(...); [...] WriteUsernamePropertyValue(...); } @@ -272,6 +287,11 @@ public interface ITapoCredentialIdentity { public interface ITapoCredentialProvider { ITapoCredential GetCredential(ITapoCredentialIdentity? identity); + ITapoKlapCredential GetKlapCredential(ITapoCredentialIdentity? identity); + } + + public interface ITapoKlapCredential : IDisposable { + void WriteLocalAuthHash(Span destination); } public static class TapoCredentials { @@ -279,7 +299,7 @@ public static class TapoCredentials { public static string ToBase64EncodedSHA1DigestString(ReadOnlySpan str) {} public static string ToBase64EncodedString(ReadOnlySpan str) {} - public static bool TryComputeKlapAuthHash(ITapoCredential credential, Span destination, out int bytesWritten) {} + public static bool TryComputeKlapLocalAuthHash(ReadOnlySpan username, ReadOnlySpan password, Span destination, out int bytesWritten) {} public static bool TryConvertToHexSHA1Hash(ReadOnlySpan input, Span destination, out int bytesWritten) {} } } @@ -518,5 +538,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)