diff --git a/ServicePoint.Example/Program.cs b/ServicePoint.Example/Program.cs index 624bba5..2c59d4d 100644 --- a/ServicePoint.Example/Program.cs +++ b/ServicePoint.Example/Program.cs @@ -1,12 +1,13 @@ using System.Threading; using ServicePoint; -var connection = new Connection("127.0.0.1:2342"); -connection.Send(Command.Clear()); +//var connection = new Connection("127.0.0.1:2342"); +var connection = new FakeConnection(); +connection.Send(new ClearCommand()); -connection.Send(Command.Brightness(5)); +connection.Send(new GlobalBrightnessCommand(5)); -connection.Send(Command.Utf8Data(0,0, CharGrid.Load("This is a test"))); +connection.Send(new CharGridCommand(0, 0, CharGrid.Load("This is a test"))); var pixels = Bitmap.NewMaxSized(); for (ulong offset = 0; offset < pixels.Width(); offset++) @@ -16,6 +17,6 @@ for (ulong offset = 0; offset < pixels.Width(); offset++) for (ulong y = 0; y < pixels.Height(); y++) pixels.Set((y + offset) % pixels.Width(), y, true); - connection.Send(Command.BitmapLinearWin(0, 0, pixels, CompressionCode.Lzma)); + connection.Send(new BitmapCommand(0, 0, pixels, CompressionCode.Lzma)); Thread.Sleep(14); } diff --git a/ServicePoint.Example/ServicePoint.Example.csproj b/ServicePoint.Example/ServicePoint.Example.csproj index 3e99664..72bbb6c 100644 --- a/ServicePoint.Example/ServicePoint.Example.csproj +++ b/ServicePoint.Example/ServicePoint.Example.csproj @@ -12,4 +12,8 @@ + + true + true + diff --git a/ServicePoint.Tests/CharGridTests.cs b/ServicePoint.Tests/CharGridTests.cs index de849c6..a9673f9 100644 --- a/ServicePoint.Tests/CharGridTests.cs +++ b/ServicePoint.Tests/CharGridTests.cs @@ -12,7 +12,7 @@ public class CharGridTests Assert.Equal(" ", grid.Get(1, 1)); grid.Set(1, 1, "-"); Assert.Equal("-", grid.Get(1, 1)); - Assert.Throws(() => grid.Get(8, 2)); + Assert.Throws(() => grid.Get(8, 2)); } [Fact] @@ -22,8 +22,8 @@ public class CharGridTests Assert.Equal("\0\0\0", grid.GetRow(0)); grid.Fill(" "); Assert.Equal(" ", grid.GetCol(1)); - Assert.Throws(() => grid.GetCol(3)); - Assert.Throws(() => grid.SetRow(1, "Text")); + Assert.Throws(() => grid.GetCol(3)); + Assert.Throws(() => grid.SetRow(1, "Text")); grid.SetRow(1, "Foo"); Assert.Equal("Foo", grid.GetRow(1)); Assert.Equal(" o", grid.GetCol(2)); diff --git a/ServicePoint.Tests/CommandTests.cs b/ServicePoint.Tests/CommandTests.cs index 4687162..370e1a1 100644 --- a/ServicePoint.Tests/CommandTests.cs +++ b/ServicePoint.Tests/CommandTests.cs @@ -2,41 +2,48 @@ namespace ServicePoint.Tests; public class CommandTests { - private Connection _connection = Connection.NewFake(); + private IConnection _connection = new FakeConnection(); [Fact] public void ClearSendable() { - _connection.Send(Command.Clear()); + _connection.Send(new ClearCommand()); + } + + [Fact] + public void GenericAsPacket() + { + var command = new ClearCommand(); + Assert.Equal(command.AsPacket(), command.AsGeneric().AsPacket()); } [Fact] public void BrightnessSendable() { - _connection.Send(Command.Brightness(5)); + _connection.Send(new GlobalBrightnessCommand(5)); } [Fact] public void InvalidBrightnessThrows() { - Assert.Throws(() => Command.Brightness(42)); + Assert.Throws(() => new GlobalBrightnessCommand(42)); } [Fact] public void FadeOutSendable() { - _connection.Send(Command.FadeOut()); + _connection.Send(new FadeOutCommand()); } [Fact] public void HardResetSendable() { - _connection.Send(Command.HardReset()); + _connection.Send(new HardResetCommand()); } [Fact] public void BitmapLinearWinSendable() { - _connection.Send(Command.BitmapLinearWin(0, 0, Bitmap.NewMaxSized(), CompressionCode.Uncompressed)); + _connection.Send(new BitmapCommand(0, 0, Bitmap.NewMaxSized(), CompressionCode.Uncompressed)); } } diff --git a/ServicePoint.Tests/GlobalUsings.cs b/ServicePoint.Tests/GlobalUsings.cs index a09810b..6833402 100644 --- a/ServicePoint.Tests/GlobalUsings.cs +++ b/ServicePoint.Tests/GlobalUsings.cs @@ -1,2 +1,3 @@ global using Xunit; global using ServicePoint; +global using System; diff --git a/ServicePoint/ConnectionExtensions.cs b/ServicePoint/ConnectionExtensions.cs new file mode 100644 index 0000000..6cb81b0 --- /dev/null +++ b/ServicePoint/ConnectionExtensions.cs @@ -0,0 +1,15 @@ +namespace ServicePoint; + +public static class ConnectionExtensions +{ + public static void Send(this IConnection connection, Packet packet) => connection.SendPacket(packet); + public static void Send(this IConnection connection, Command command) => connection.SendCommand(command); + public static void Send(this IConnection connection, IClearCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, IFadeOutCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, IBitmapCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, IBitVecCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, IBrightnessGridCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, IHardResetCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, ICharGridCommand command) => connection.SendPacket(command.AsPacket()); + public static void Send(this IConnection connection, IGlobalBrightnessCommand command) => connection.SendPacket(command.AsPacket()); +} diff --git a/ServicePoint/FakeConnection.cs b/ServicePoint/FakeConnection.cs new file mode 100644 index 0000000..7017fee --- /dev/null +++ b/ServicePoint/FakeConnection.cs @@ -0,0 +1,14 @@ +namespace ServicePoint; + +public sealed class FakeConnection() : IConnection +{ + public void SendCommand(Command command) + { + SendPacket(command.AsPacket()); + } + + public void SendPacket(Packet packet) + { + _ = packet.AsBytes(); + } +} diff --git a/ServicePoint/ServicePoint.csproj b/ServicePoint/ServicePoint.csproj index 8749854..a115847 100644 --- a/ServicePoint/ServicePoint.csproj +++ b/ServicePoint/ServicePoint.csproj @@ -23,7 +23,17 @@ true - + + true + true + + + + + + + + @@ -33,14 +43,18 @@ - + libservicepoint_binding_uniffi.so + + - + libservicepoint_binding_uniffi.so + + diff --git a/ServicePoint/servicepoint_binding_uniffi.cs b/ServicePoint/servicepoint_binding_uniffi.cs index 622d21d..5900c86 100644 --- a/ServicePoint/servicepoint_binding_uniffi.cs +++ b/ServicePoint/servicepoint_binding_uniffi.cs @@ -624,6 +624,160 @@ static class _UniFFILib { public delegate void UniffiForeignFutureCompleteVoid( ulong @callbackData,_UniFFILib.UniffiForeignFutureStructVoid @result ); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void UniffiCallbackInterfaceCommandMethod0( + ulong @uniffiHandle,ref IntPtr @uniffiOutReturn,ref UniffiRustCallStatus _uniffi_out_err + ); + [StructLayout(LayoutKind.Sequential)] + public struct UniffiVTableCallbackInterfaceCommand + { + public IntPtr @asPacket; + public IntPtr @uniffiFree; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -882,10 +1036,6 @@ static class _UniFFILib { public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_bitvec_copy_raw(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitvec_equals(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitvec_fill(IntPtr @ptr,sbyte @value,ref UniffiRustCallStatus _uniffi_out_err ); @@ -902,6 +1052,70 @@ static class _UniFFILib { public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitvec_set(IntPtr @ptr,ulong @index,sbyte @value,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_bitvec_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitvec_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitvec_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitvec_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_bitveccommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitveccommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitveccommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitveccommand_new(ulong @offset,IntPtr @bitvec,RustBuffer @compression,RustBuffer @operation,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_get_bitvec(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_set_bitvec(IntPtr @ptr,IntPtr @bitvec,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_bitmap(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); @@ -930,10 +1144,6 @@ static class _UniFFILib { public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_bitmap_copy_raw(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitmap_equals(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitmap_fill(IntPtr @ptr,sbyte @value,ref UniffiRustCallStatus _uniffi_out_err ); @@ -955,15 +1165,67 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_bitmaplegacycommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_bitmap_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitmaplegacycommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitmap_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmaplegacycommand_new(ref UniffiRustCallStatus _uniffi_out_err + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitmap_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitmap_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_bitmapcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitmapcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmapcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmapcommand_new(ulong @offsetX,ulong @offsetY,IntPtr @bitmap,RustBuffer @compression,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_get_bitmap(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_set_bitmap(IntPtr @ptr,IntPtr @bitmap,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -990,10 +1252,6 @@ static class _UniFFILib { public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_copy_raw(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_equals(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern void uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_fill(IntPtr @ptr,byte @value,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1014,6 +1272,70 @@ static class _UniFFILib { public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_width(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_brightnessgridcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_brightnessgridcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgridcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgridcommand_new(ulong @offsetX,ulong @offsetY,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_get_grid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_set_grid(IntPtr @ptr,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_chargrid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1038,10 +1360,6 @@ static class _UniFFILib { public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_chargrid_as_string(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_chargrid_equals(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern void uniffi_servicepoint_binding_uniffi_fn_method_chargrid_fill(IntPtr @ptr,RustBuffer @value,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1082,6 +1400,70 @@ static class _UniFFILib { public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_chargrid_width(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_chargrid_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_chargrid_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_chargrid_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_chargrid_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_chargridcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_chargridcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_chargridcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_chargridcommand_new(ulong @offsetX,ulong @offsetY,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_get_grid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_set_grid(IntPtr @ptr,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_clearcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1090,10 +1472,38 @@ static class _UniFFILib { public static extern void uniffi_servicepoint_binding_uniffi_fn_free_clearcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_clearcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_clearcommand_new(ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_command(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1103,47 +1513,7 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear(ulong @offset,IntPtr @bitvec,RustBuffer @compression,RustBuffer @operation,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_win(ulong @offsetX,ulong @offsetY,IntPtr @bitmap,RustBuffer @compression,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_brightness(byte @brightness,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_char_brightness(ulong @offsetX,ulong @offsetY,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_clear(ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_cp437_data(ulong @offsetX,ulong @offsetY,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_fade_out(ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_hard_reset(ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_command_utf8_data(ulong @offsetX,ulong @offsetY,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_command_equals(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_command_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -1159,7 +1529,11 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern void uniffi_servicepoint_binding_uniffi_fn_method_connection_send(IntPtr @ptr,IntPtr @command,ref UniffiRustCallStatus _uniffi_out_err + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_connection_send_command(IntPtr @ptr,IntPtr @command,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_connection_send_packet(IntPtr @ptr,IntPtr @command,ref UniffiRustCallStatus _uniffi_out_err ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -1186,10 +1560,6 @@ static class _UniFFILib { public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_copy_raw(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_equals(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern void uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_fill(IntPtr @ptr,byte @value,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1214,6 +1584,70 @@ static class _UniFFILib { public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_width(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_cp437gridcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_cp437gridcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_cp437gridcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_cp437gridcommand_new(ulong @offsetX,ulong @offsetY,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_get_grid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_set_grid(IntPtr @ptr,IntPtr @grid,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_fadeoutcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1222,10 +1656,78 @@ static class _UniFFILib { public static extern void uniffi_servicepoint_binding_uniffi_fn_free_fadeoutcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_fadeoutcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_fadeoutcommand_new(ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_globalbrightnesscommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_globalbrightnesscommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_globalbrightnesscommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_globalbrightnesscommand_new(byte @brightness,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_hardresetcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); @@ -1234,10 +1736,106 @@ static class _UniFFILib { public static extern void uniffi_servicepoint_binding_uniffi_fn_free_hardresetcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_hardresetcommand_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_hardresetcommand_new(ref UniffiRustCallStatus _uniffi_out_err ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_as_generic(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_as_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_header(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_header(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_header_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_header_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_header_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_header_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_header_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_free_packet(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_packet_clone(IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_packet_as_bytes(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_packet_get_header(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern void uniffi_servicepoint_binding_uniffi_fn_method_packet_set_header(IntPtr @ptr,IntPtr @header,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_packet_uniffi_trait_debug(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_packet_uniffi_trait_eq_eq(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_packet_uniffi_trait_eq_ne(IntPtr @ptr,IntPtr @other,ref UniffiRustCallStatus _uniffi_out_err + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_packet_uniffi_trait_hash(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_func_get_constants(ref UniffiRustCallStatus _uniffi_out_err ); @@ -1474,10 +2072,6 @@ static class _UniFFILib { public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_copy_raw( ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_equals( - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_fill( ); @@ -1495,11 +2089,23 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_copy_raw( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_as_generic( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_equals( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_get_bitvec( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_set_bitvec( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_copy_raw( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -1523,11 +2129,23 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_copy_raw( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_as_generic( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_equals( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_get_bitmap( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_set_bitmap( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_copy_raw( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -1551,11 +2169,23 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_as_string( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_as_generic( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_equals( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_get_grid( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_set_grid( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_as_string( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -1599,21 +2229,45 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_command_equals( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_as_generic( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_connection_send( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_get_grid( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_set_grid( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_clearcommand_as_generic( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_clearcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_command_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_connection_send_command( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_connection_send_packet( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_copy_raw( ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_equals( - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_fill( ); @@ -1638,6 +2292,58 @@ static class _UniFFILib { public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_width( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_as_generic( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_get_grid( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_set_grid( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_fadeoutcommand_as_generic( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_fadeoutcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_globalbrightnesscommand_as_generic( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_globalbrightnesscommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_hardresetcommand_as_generic( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_hardresetcommand_as_packet( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_packet_as_bytes( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_packet_get_header( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_packet_set_header( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_clone( ); @@ -1650,6 +2356,14 @@ static class _UniFFILib { public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_new( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitveccommand_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitveccommand_new( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_clone( ); @@ -1667,7 +2381,11 @@ static class _UniFFILib { ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmaplegacycommand_new( + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmapcommand_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmapcommand_new( ); [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] @@ -1682,6 +2400,14 @@ static class _UniFFILib { public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_new( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgridcommand_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgridcommand_new( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_clone( ); @@ -1694,50 +2420,22 @@ static class _UniFFILib { public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_new( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_chargridcommand_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_chargridcommand_new( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_clone( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_new( ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_win( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_brightness( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_char_brightness( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_clear( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_clone( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_cp437_data( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_fade_out( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_hard_reset( - ); - - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_utf8_data( - ); - [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_connection_new( ); @@ -1754,14 +2452,46 @@ static class _UniFFILib { public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_new( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437gridcommand_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437gridcommand_new( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_clone( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_new( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_globalbrightnesscommand_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_globalbrightnesscommand_new( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_clone( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_new( ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_header_clone( + ); + + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_packet_clone( + ); + [DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)] public static extern uint ffi_servicepoint_binding_uniffi_uniffi_contract_version( ); @@ -1788,12 +2518,6 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_copy_raw` checksum `44858`, library returned `{checksum}`"); } } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_equals(); - if (checksum != 56950) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_equals` checksum `56950`, library returned `{checksum}`"); - } - } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_fill(); if (checksum != 49206) { @@ -1819,15 +2543,33 @@ static class _UniFFILib { } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_copy_raw(); - if (checksum != 22381) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_copy_raw` checksum `22381`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_as_generic(); + if (checksum != 1623) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_as_generic` checksum `1623`, library returned `{checksum}`"); } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_equals(); - if (checksum != 11420) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_equals` checksum `11420`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_as_packet(); + if (checksum != 6501) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_as_packet` checksum `6501`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_get_bitvec(); + if (checksum != 35445) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_get_bitvec` checksum `35445`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_set_bitvec(); + if (checksum != 18698) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitveccommand_set_bitvec` checksum `18698`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_copy_raw(); + if (checksum != 22381) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_copy_raw` checksum `22381`, library returned `{checksum}`"); } } { @@ -1861,15 +2603,33 @@ static class _UniFFILib { } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_copy_raw(); - if (checksum != 5114) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_copy_raw` checksum `5114`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_as_generic(); + if (checksum != 31448) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_as_generic` checksum `31448`, library returned `{checksum}`"); } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_equals(); - if (checksum != 28824) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_equals` checksum `28824`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_as_packet(); + if (checksum != 40948) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_as_packet` checksum `40948`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_get_bitmap(); + if (checksum != 43570) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_get_bitmap` checksum `43570`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_set_bitmap(); + if (checksum != 44899) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmapcommand_set_bitmap` checksum `44899`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_copy_raw(); + if (checksum != 5114) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_copy_raw` checksum `5114`, library returned `{checksum}`"); } } { @@ -1902,40 +2662,58 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_width` checksum `22654`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_as_generic(); + if (checksum != 57896) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_as_generic` checksum `57896`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_as_packet(); + if (checksum != 40746) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_as_packet` checksum `40746`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_get_grid(); + if (checksum != 58339) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_get_grid` checksum `58339`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_set_grid(); + if (checksum != 13174) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgridcommand_set_grid` checksum `13174`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_as_string(); if (checksum != 28188) { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_as_string` checksum `28188`, library returned `{checksum}`"); } } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_equals(); - if (checksum != 60616) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_equals` checksum `60616`, library returned `{checksum}`"); - } - } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_fill(); - if (checksum != 45391) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_fill` checksum `45391`, library returned `{checksum}`"); + if (checksum != 49338) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_fill` checksum `49338`, library returned `{checksum}`"); } } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get(); - if (checksum != 1811) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get` checksum `1811`, library returned `{checksum}`"); + if (checksum != 52633) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get` checksum `52633`, library returned `{checksum}`"); } } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_col(); - if (checksum != 37658) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_col` checksum `37658`, library returned `{checksum}`"); + if (checksum != 31106) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_col` checksum `31106`, library returned `{checksum}`"); } } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_row(); - if (checksum != 55496) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_row` checksum `55496`, library returned `{checksum}`"); + if (checksum != 30868) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_row` checksum `30868`, library returned `{checksum}`"); } } { @@ -1946,20 +2724,20 @@ static class _UniFFILib { } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set(); - if (checksum != 31547) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set` checksum `31547`, library returned `{checksum}`"); + if (checksum != 59324) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set` checksum `59324`, library returned `{checksum}`"); } } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_col(); - if (checksum != 13241) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_col` checksum `13241`, library returned `{checksum}`"); + if (checksum != 8537) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_col` checksum `8537`, library returned `{checksum}`"); } } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_row(); - if (checksum != 59373) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_row` checksum `59373`, library returned `{checksum}`"); + if (checksum != 26587) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_row` checksum `26587`, library returned `{checksum}`"); } } { @@ -1975,15 +2753,57 @@ static class _UniFFILib { } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_command_equals(); - if (checksum != 10396) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_command_equals` checksum `10396`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_as_generic(); + if (checksum != 17720) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_as_generic` checksum `17720`, library returned `{checksum}`"); } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_connection_send(); - if (checksum != 32639) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_connection_send` checksum `32639`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_as_packet(); + if (checksum != 12750) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_as_packet` checksum `12750`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_get_grid(); + if (checksum != 28257) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_get_grid` checksum `28257`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_set_grid(); + if (checksum != 39172) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargridcommand_set_grid` checksum `39172`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_clearcommand_as_generic(); + if (checksum != 14615) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_clearcommand_as_generic` checksum `14615`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_clearcommand_as_packet(); + if (checksum != 15735) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_clearcommand_as_packet` checksum `15735`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_command_as_packet(); + if (checksum != 40844) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_command_as_packet` checksum `40844`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_connection_send_command(); + if (checksum != 21768) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_connection_send_command` checksum `21768`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_connection_send_packet(); + if (checksum != 11692) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_connection_send_packet` checksum `11692`, library returned `{checksum}`"); } } { @@ -1992,12 +2812,6 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_copy_raw` checksum `3828`, library returned `{checksum}`"); } } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_equals(); - if (checksum != 21521) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_equals` checksum `21521`, library returned `{checksum}`"); - } - } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_fill(); if (checksum != 20435) { @@ -2034,6 +2848,84 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_width` checksum `11243`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_as_generic(); + if (checksum != 16290) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_as_generic` checksum `16290`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_as_packet(); + if (checksum != 24571) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_as_packet` checksum `24571`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_get_grid(); + if (checksum != 54611) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_get_grid` checksum `54611`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_set_grid(); + if (checksum != 9019) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437gridcommand_set_grid` checksum `9019`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_fadeoutcommand_as_generic(); + if (checksum != 50416) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_fadeoutcommand_as_generic` checksum `50416`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_fadeoutcommand_as_packet(); + if (checksum != 28105) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_fadeoutcommand_as_packet` checksum `28105`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_globalbrightnesscommand_as_generic(); + if (checksum != 8240) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_globalbrightnesscommand_as_generic` checksum `8240`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_globalbrightnesscommand_as_packet(); + if (checksum != 45114) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_globalbrightnesscommand_as_packet` checksum `45114`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_hardresetcommand_as_generic(); + if (checksum != 23881) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_hardresetcommand_as_generic` checksum `23881`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_hardresetcommand_as_packet(); + if (checksum != 32987) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_hardresetcommand_as_packet` checksum `32987`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_packet_as_bytes(); + if (checksum != 30669) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_packet_as_bytes` checksum `30669`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_packet_get_header(); + if (checksum != 20431) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_packet_get_header` checksum `20431`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_packet_set_header(); + if (checksum != 32669) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_packet_set_header` checksum `32669`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_clone(); if (checksum != 35610) { @@ -2052,6 +2944,18 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_new` checksum `11119`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitveccommand_clone(); + if (checksum != 50608) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitveccommand_clone` checksum `50608`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitveccommand_new(); + if (checksum != 15427) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitveccommand_new` checksum `15427`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_clone(); if (checksum != 54327) { @@ -2077,9 +2981,15 @@ static class _UniFFILib { } } { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmaplegacycommand_new(); - if (checksum != 44315) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmaplegacycommand_new` checksum `44315`, library returned `{checksum}`"); + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmapcommand_clone(); + if (checksum != 22204) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmapcommand_clone` checksum `22204`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmapcommand_new(); + if (checksum != 43588) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmapcommand_new` checksum `43588`, library returned `{checksum}`"); } } { @@ -2100,6 +3010,18 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_new` checksum `45722`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgridcommand_clone(); + if (checksum != 30408) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgridcommand_clone` checksum `30408`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgridcommand_new(); + if (checksum != 10901) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgridcommand_new` checksum `10901`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_clone(); if (checksum != 5903) { @@ -2118,72 +3040,30 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_new` checksum `2094`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_chargridcommand_clone(); + if (checksum != 29333) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_chargridcommand_clone` checksum `29333`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_chargridcommand_new(); + if (checksum != 61094) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_chargridcommand_new` checksum `61094`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_clone(); + if (checksum != 984) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_clone` checksum `984`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_new(); if (checksum != 340) { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_new` checksum `340`, library returned `{checksum}`"); } } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear(); - if (checksum != 62752) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear` checksum `62752`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_win(); - if (checksum != 32012) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_win` checksum `32012`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_brightness(); - if (checksum != 60895) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_brightness` checksum `60895`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_char_brightness(); - if (checksum != 50477) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_char_brightness` checksum `50477`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_clear(); - if (checksum != 20330) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_clear` checksum `20330`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_clone(); - if (checksum != 42470) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_clone` checksum `42470`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_cp437_data(); - if (checksum != 63131) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_cp437_data` checksum `63131`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_fade_out(); - if (checksum != 13752) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_fade_out` checksum `13752`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_hard_reset(); - if (checksum != 62911) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_hard_reset` checksum `62911`, library returned `{checksum}`"); - } - } - { - var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_utf8_data(); - if (checksum != 60950) { - throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_utf8_data` checksum `60950`, library returned `{checksum}`"); - } - } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_connection_new(); if (checksum != 7315) { @@ -2208,18 +3088,66 @@ static class _UniFFILib { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_new` checksum `8874`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437gridcommand_clone(); + if (checksum != 22140) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437gridcommand_clone` checksum `22140`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437gridcommand_new(); + if (checksum != 30916) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437gridcommand_new` checksum `30916`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_clone(); + if (checksum != 23041) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_clone` checksum `23041`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_new(); if (checksum != 9933) { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_new` checksum `9933`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_globalbrightnesscommand_clone(); + if (checksum != 58167) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_globalbrightnesscommand_clone` checksum `58167`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_globalbrightnesscommand_new(); + if (checksum != 26922) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_globalbrightnesscommand_new` checksum `26922`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_clone(); + if (checksum != 26505) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_clone` checksum `26505`, library returned `{checksum}`"); + } + } { var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_new(); if (checksum != 65216) { throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_new` checksum `65216`, library returned `{checksum}`"); } } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_header_clone(); + if (checksum != 40397) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_header_clone` checksum `40397`, library returned `{checksum}`"); + } + } + { + var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_packet_clone(); + if (checksum != 60606) { + throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_packet_clone` checksum `60606`, library returned `{checksum}`"); + } + } } } @@ -2376,9 +3304,8 @@ class FfiConverterByteArray: FfiConverterRustBuffer { -public interface IBitVec { +public interface IBitVec: IEquatable { byte[] CopyRaw(); - bool Equals(BitVec @other); void Fill(bool @value); bool Get(ulong @index); ulong Len(); @@ -2486,14 +3413,6 @@ public class BitVec : IBitVec, IDisposable { } - public bool Equals(BitVec @other) { - return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_equals(thisPtr, FfiConverterTypeBitVec.INSTANCE.Lower(@other), ref _status) -))); - } - - public void Fill(bool @value) { CallWithPointer(thisPtr => _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => @@ -2528,6 +3447,25 @@ public class BitVec : IBitVec, IDisposable { + public bool Equals(BitVec? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeBitVec.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is BitVec)) return false; + return Equals(obj as BitVec); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_uniffi_trait_hash(thisPtr, ref _status) +))); + } public static BitVec Clone(BitVec @other) { @@ -2573,9 +3511,200 @@ class FfiConverterTypeBitVec: FfiConverter { -public interface IBitmap { +public interface IBitVecCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); + BitVec GetBitvec(); + void SetBitvec(BitVec @bitvec); +} +public class BitVecCommand : IBitVecCommand, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public BitVecCommand(IntPtr pointer) { + this.pointer = pointer; + } + + ~BitVecCommand() { + Destroy(); + } + public BitVecCommand(ulong @offset, BitVec @bitvec, CompressionCode @compression, BinaryOperation @operation) : + this( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitveccommand_new(FfiConverterUInt64.INSTANCE.Lower(@offset), FfiConverterTypeBitVec.INSTANCE.Lower(@bitvec), FfiConverterTypeCompressionCode.INSTANCE.Lower(@compression), FfiConverterTypeBinaryOperation.INSTANCE.Lower(@operation), ref _status) +)) {} + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitveccommand(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitveccommand(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_as_packet(thisPtr, ref _status) +))); + } + + + public BitVec GetBitvec() { + return CallWithPointer(thisPtr => FfiConverterTypeBitVec.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_get_bitvec(thisPtr, ref _status) +))); + } + + + public void SetBitvec(BitVec @bitvec) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_set_bitvec(thisPtr, FfiConverterTypeBitVec.INSTANCE.Lower(@bitvec), ref _status) +)); + } + + + + public bool Equals(BitVecCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeBitVecCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is BitVecCommand)) return false; + return Equals(obj as BitVecCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitveccommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static BitVecCommand Clone(BitVecCommand @other) { + return new BitVecCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitveccommand_clone(FfiConverterTypeBitVecCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypeBitVecCommand: FfiConverter { + public static FfiConverterTypeBitVecCommand INSTANCE = new FfiConverterTypeBitVecCommand(); + + + public override IntPtr Lower(BitVecCommand value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override BitVecCommand Lift(IntPtr value) { + return new BitVecCommand(value); + } + + public override BitVecCommand Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(BitVecCommand value) { + return 8; + } + + public override void Write(BitVecCommand value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + +public interface IBitmap: IEquatable { byte[] CopyRaw(); - bool Equals(Bitmap @other); void Fill(bool @value); bool Get(ulong @x, ulong @y); ulong Height(); @@ -2684,14 +3813,6 @@ public class Bitmap : IBitmap, IDisposable { } - public bool Equals(Bitmap @other) { - return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_equals(thisPtr, FfiConverterTypeBitmap.INSTANCE.Lower(@other), ref _status) -))); - } - - public void Fill(bool @value) { CallWithPointer(thisPtr => _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => @@ -2734,6 +3855,25 @@ public class Bitmap : IBitmap, IDisposable { } + public bool Equals(Bitmap? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeBitmap.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is Bitmap)) return false; + return Equals(obj as Bitmap); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_uniffi_trait_hash(thisPtr, ref _status) +))); + } public static Bitmap Clone(Bitmap @other) { @@ -2786,35 +3926,40 @@ class FfiConverterTypeBitmap: FfiConverter { -public interface IBitmapLegacyCommand { +public interface IBitmapCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); + Bitmap GetBitmap(); + void SetBitmap(Bitmap @bitmap); } -public class BitmapLegacyCommand : IBitmapLegacyCommand, IDisposable { +public class BitmapCommand : IBitmapCommand, IDisposable { protected IntPtr pointer; private int _wasDestroyed = 0; private long _callCounter = 1; - public BitmapLegacyCommand(IntPtr pointer) { + public BitmapCommand(IntPtr pointer) { this.pointer = pointer; } - ~BitmapLegacyCommand() { + ~BitmapCommand() { Destroy(); } - public BitmapLegacyCommand() : + public BitmapCommand(ulong @offsetX, ulong @offsetY, Bitmap @bitmap, CompressionCode @compression) : this( _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmaplegacycommand_new( ref _status) + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmapcommand_new(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeBitmap.INSTANCE.Lower(@bitmap), FfiConverterTypeCompressionCode.INSTANCE.Lower(@compression), ref _status) )) {} protected void FreeRustArcPtr() { _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitmaplegacycommand(this.pointer, ref status); + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitmapcommand(this.pointer, ref status); }); } protected IntPtr CloneRustArcPtr() { return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { - return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitmaplegacycommand(this.pointer, ref status); + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitmapcommand(this.pointer, ref status); }); } @@ -2882,39 +4027,99 @@ public class BitmapLegacyCommand : IBitmapLegacyCommand, IDisposable { } + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_as_packet(thisPtr, ref _status) +))); + } + + + public Bitmap GetBitmap() { + return CallWithPointer(thisPtr => FfiConverterTypeBitmap.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_get_bitmap(thisPtr, ref _status) +))); + } + + + public void SetBitmap(Bitmap @bitmap) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_set_bitmap(thisPtr, FfiConverterTypeBitmap.INSTANCE.Lower(@bitmap), ref _status) +)); + } + + + + public bool Equals(BitmapCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeBitmapCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is BitmapCommand)) return false; + return Equals(obj as BitmapCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmapcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + public static BitmapCommand Clone(BitmapCommand @other) { + return new BitmapCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmapcommand_clone(FfiConverterTypeBitmapCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + } -class FfiConverterTypeBitmapLegacyCommand: FfiConverter { - public static FfiConverterTypeBitmapLegacyCommand INSTANCE = new FfiConverterTypeBitmapLegacyCommand(); +class FfiConverterTypeBitmapCommand: FfiConverter { + public static FfiConverterTypeBitmapCommand INSTANCE = new FfiConverterTypeBitmapCommand(); - public override IntPtr Lower(BitmapLegacyCommand value) { + public override IntPtr Lower(BitmapCommand value) { return value.CallWithPointer(thisPtr => thisPtr); } - public override BitmapLegacyCommand Lift(IntPtr value) { - return new BitmapLegacyCommand(value); + public override BitmapCommand Lift(IntPtr value) { + return new BitmapCommand(value); } - public override BitmapLegacyCommand Read(BigEndianStream stream) { + public override BitmapCommand Read(BigEndianStream stream) { return Lift(new IntPtr(stream.ReadLong())); } - public override int AllocationSize(BitmapLegacyCommand value) { + public override int AllocationSize(BitmapCommand value) { return 8; } - public override void Write(BitmapLegacyCommand value, BigEndianStream stream) { + public override void Write(BitmapCommand value, BigEndianStream stream) { stream.WriteLong(Lower(value).ToInt64()); } } -public interface IBrightnessGrid { +public interface IBrightnessGrid: IEquatable { byte[] CopyRaw(); - bool Equals(BrightnessGrid @other); void Fill(Brightness @value); Brightness Get(ulong @x, ulong @y); ulong Height(); @@ -3023,14 +4228,6 @@ public class BrightnessGrid : IBrightnessGrid, IDisposable { } - public bool Equals(BrightnessGrid @other) { - return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_equals(thisPtr, FfiConverterTypeBrightnessGrid.INSTANCE.Lower(@other), ref _status) -))); - } - - public void Fill(Brightness @value) { CallWithPointer(thisPtr => _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => @@ -3073,6 +4270,25 @@ public class BrightnessGrid : IBrightnessGrid, IDisposable { } + public bool Equals(BrightnessGrid? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeBrightnessGrid.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is BrightnessGrid)) return false; + return Equals(obj as BrightnessGrid); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_uniffi_trait_hash(thisPtr, ref _status) +))); + } public static BrightnessGrid Clone(BrightnessGrid @other) { @@ -3118,22 +4334,214 @@ class FfiConverterTypeBrightnessGrid: FfiConverter { -public interface ICharGrid { +public interface IBrightnessGridCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); + BrightnessGrid GetGrid(); + void SetGrid(BrightnessGrid @grid); +} +public class BrightnessGridCommand : IBrightnessGridCommand, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public BrightnessGridCommand(IntPtr pointer) { + this.pointer = pointer; + } + + ~BrightnessGridCommand() { + Destroy(); + } + public BrightnessGridCommand(ulong @offsetX, ulong @offsetY, BrightnessGrid @grid) : + this( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgridcommand_new(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeBrightnessGrid.INSTANCE.Lower(@grid), ref _status) +)) {} + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_brightnessgridcommand(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_brightnessgridcommand(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_as_packet(thisPtr, ref _status) +))); + } + + + public BrightnessGrid GetGrid() { + return CallWithPointer(thisPtr => FfiConverterTypeBrightnessGrid.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_get_grid(thisPtr, ref _status) +))); + } + + + public void SetGrid(BrightnessGrid @grid) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_set_grid(thisPtr, FfiConverterTypeBrightnessGrid.INSTANCE.Lower(@grid), ref _status) +)); + } + + + + public bool Equals(BrightnessGridCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeBrightnessGridCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is BrightnessGridCommand)) return false; + return Equals(obj as BrightnessGridCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgridcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static BrightnessGridCommand Clone(BrightnessGridCommand @other) { + return new BrightnessGridCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgridcommand_clone(FfiConverterTypeBrightnessGridCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypeBrightnessGridCommand: FfiConverter { + public static FfiConverterTypeBrightnessGridCommand INSTANCE = new FfiConverterTypeBrightnessGridCommand(); + + + public override IntPtr Lower(BrightnessGridCommand value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override BrightnessGridCommand Lift(IntPtr value) { + return new BrightnessGridCommand(value); + } + + public override BrightnessGridCommand Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(BrightnessGridCommand value) { + return 8; + } + + public override void Write(BrightnessGridCommand value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + +public interface ICharGrid: IEquatable { string AsString(); - bool Equals(CharGrid @other); - /// + /// void Fill(string @value); + /// string Get(ulong @x, ulong @y); - /// + /// string GetCol(ulong @x); - /// + /// string GetRow(ulong @y); ulong Height(); - /// + /// void Set(ulong @x, ulong @y, string @value); - /// + /// void SetCol(ulong @x, string @col); - /// + /// void SetRow(ulong @y, string @row); Cp437Grid ToCp437(); ulong Width(); @@ -3240,45 +4648,38 @@ public class CharGrid : ICharGrid, IDisposable { } - public bool Equals(CharGrid @other) { - return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_equals(thisPtr, FfiConverterTypeCharGrid.INSTANCE.Lower(@other), ref _status) -))); - } - - - /// + /// public void Fill(string @value) { CallWithPointer(thisPtr => - _UniffiHelpers.RustCallWithError(FfiConverterTypeCharGridError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_fill(thisPtr, FfiConverterString.INSTANCE.Lower(@value), ref _status) )); } + /// public string Get(ulong @x, ulong @y) { return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), ref _status) ))); } - /// + /// public string GetCol(ulong @x) { return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift( - _UniffiHelpers.RustCallWithError(FfiConverterTypeCharGridError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get_col(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), ref _status) ))); } - /// + /// public string GetRow(ulong @y) { return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift( - _UniffiHelpers.RustCallWithError(FfiConverterTypeCharGridError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get_row(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@y), ref _status) ))); } @@ -3292,30 +4693,30 @@ public class CharGrid : ICharGrid, IDisposable { } - /// + /// public void Set(ulong @x, ulong @y, string @value) { CallWithPointer(thisPtr => - _UniffiHelpers.RustCallWithError(FfiConverterTypeCharGridError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterString.INSTANCE.Lower(@value), ref _status) )); } - /// + /// public void SetCol(ulong @x, string @col) { CallWithPointer(thisPtr => - _UniffiHelpers.RustCallWithError(FfiConverterTypeCharGridError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_set_col(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterString.INSTANCE.Lower(@col), ref _status) )); } - /// + /// public void SetRow(ulong @y, string @row) { CallWithPointer(thisPtr => - _UniffiHelpers.RustCallWithError(FfiConverterTypeCharGridError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_set_row(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterString.INSTANCE.Lower(@row), ref _status) )); } @@ -3338,6 +4739,25 @@ public class CharGrid : ICharGrid, IDisposable { } + public bool Equals(CharGrid? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeCharGrid.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is CharGrid)) return false; + return Equals(obj as CharGrid); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_uniffi_trait_hash(thisPtr, ref _status) +))); + } public static CharGrid Clone(CharGrid @other) { @@ -3383,7 +4803,202 @@ class FfiConverterTypeCharGrid: FfiConverter { -public interface IClearCommand { +public interface ICharGridCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); + CharGrid GetGrid(); + void SetGrid(CharGrid @grid); +} +public class CharGridCommand : ICharGridCommand, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public CharGridCommand(IntPtr pointer) { + this.pointer = pointer; + } + + ~CharGridCommand() { + Destroy(); + } + public CharGridCommand(ulong @offsetX, ulong @offsetY, CharGrid @grid) : + this( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_chargridcommand_new(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeCharGrid.INSTANCE.Lower(@grid), ref _status) +)) {} + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_chargridcommand(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_chargridcommand(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_as_packet(thisPtr, ref _status) +))); + } + + + public CharGrid GetGrid() { + return CallWithPointer(thisPtr => FfiConverterTypeCharGrid.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_get_grid(thisPtr, ref _status) +))); + } + + + public void SetGrid(CharGrid @grid) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_set_grid(thisPtr, FfiConverterTypeCharGrid.INSTANCE.Lower(@grid), ref _status) +)); + } + + + + public bool Equals(CharGridCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeCharGridCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is CharGridCommand)) return false; + return Equals(obj as CharGridCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargridcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static CharGridCommand Clone(CharGridCommand @other) { + return new CharGridCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_chargridcommand_clone(FfiConverterTypeCharGridCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypeCharGridCommand: FfiConverter { + public static FfiConverterTypeCharGridCommand INSTANCE = new FfiConverterTypeCharGridCommand(); + + + public override IntPtr Lower(CharGridCommand value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override CharGridCommand Lift(IntPtr value) { + return new CharGridCommand(value); + } + + public override CharGridCommand Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(CharGridCommand value) { + return 8; + } + + public override void Write(CharGridCommand value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + +public interface IClearCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); } public class ClearCommand : IClearCommand, IDisposable { protected IntPtr pointer; @@ -3479,8 +5094,52 @@ public class ClearCommand : IClearCommand, IDisposable { } + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_as_packet(thisPtr, ref _status) +))); + } + + + public bool Equals(ClearCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeClearCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is ClearCommand)) return false; + return Equals(obj as ClearCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_clearcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + public static ClearCommand Clone(ClearCommand @other) { + return new ClearCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_clearcommand_clone(FfiConverterTypeClearCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + } class FfiConverterTypeClearCommand: FfiConverter { public static FfiConverterTypeClearCommand INSTANCE = new FfiConverterTypeClearCommand(); @@ -3510,7 +5169,8 @@ class FfiConverterTypeClearCommand: FfiConverter { public interface ICommand { - bool Equals(Command @other); + /// + Packet AsPacket(); } public class Command : ICommand, IDisposable { protected IntPtr pointer; @@ -3601,88 +5261,17 @@ public class Command : ICommand, IDisposable { } - public bool Equals(Command @other) { - return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_command_equals(thisPtr, FfiConverterTypeCommand.INSTANCE.Lower(@other), ref _status) + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_command_as_packet(thisPtr, ref _status) ))); } - public static Command BitmapLinear(ulong @offset, BitVec @bitvec, CompressionCode @compression, BinaryOperation @operation) { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear(FfiConverterUInt64.INSTANCE.Lower(@offset), FfiConverterTypeBitVec.INSTANCE.Lower(@bitvec), FfiConverterTypeCompressionCode.INSTANCE.Lower(@compression), FfiConverterTypeBinaryOperation.INSTANCE.Lower(@operation), ref _status) -)); - } - - public static Command BitmapLinearWin(ulong @offsetX, ulong @offsetY, Bitmap @bitmap, CompressionCode @compression) { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_win(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeBitmap.INSTANCE.Lower(@bitmap), FfiConverterTypeCompressionCode.INSTANCE.Lower(@compression), ref _status) -)); - } - - /// - public static Command Brightness(byte @brightness) { - return new Command( - _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_brightness(FfiConverterUInt8.INSTANCE.Lower(@brightness), ref _status) -)); - } - - public static Command CharBrightness(ulong @offsetX, ulong @offsetY, BrightnessGrid @grid) { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_char_brightness(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeBrightnessGrid.INSTANCE.Lower(@grid), ref _status) -)); - } - - public static Command Clear() { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_clear( ref _status) -)); - } - - public static Command Clone(Command @other) { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_clone(FfiConverterTypeCommand.INSTANCE.Lower(@other), ref _status) -)); - } - - public static Command Cp437Data(ulong @offsetX, ulong @offsetY, Cp437Grid @grid) { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_cp437_data(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeCp437Grid.INSTANCE.Lower(@grid), ref _status) -)); - } - - public static Command FadeOut() { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_fade_out( ref _status) -)); - } - - public static Command HardReset() { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_hard_reset( ref _status) -)); - } - - public static Command Utf8Data(ulong @offsetX, ulong @offsetY, CharGrid @grid) { - return new Command( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_utf8_data(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeCharGrid.INSTANCE.Lower(@grid), ref _status) -)); - } - - } class FfiConverterTypeCommand: FfiConverter { public static FfiConverterTypeCommand INSTANCE = new FfiConverterTypeCommand(); @@ -3713,7 +5302,9 @@ class FfiConverterTypeCommand: FfiConverter { public interface IConnection { /// - void Send(Command @command); + void SendCommand(Command @command); + /// + void SendPacket(Packet @command); } public class Connection : IConnection, IDisposable { protected IntPtr pointer; @@ -3810,10 +5401,20 @@ public class Connection : IConnection, IDisposable { /// - public void Send(Command @command) { + public void SendCommand(Command @command) { CallWithPointer(thisPtr => _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_connection_send(thisPtr, FfiConverterTypeCommand.INSTANCE.Lower(@command), ref _status) + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_connection_send_command(thisPtr, FfiConverterTypeCommand.INSTANCE.Lower(@command), ref _status) +)); + } + + + + /// + public void SendPacket(Packet @command) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_connection_send_packet(thisPtr, FfiConverterTypePacket.INSTANCE.Lower(@command), ref _status) )); } @@ -3849,9 +5450,8 @@ class FfiConverterTypeConnection: FfiConverter { -public interface ICp437Grid { +public interface ICp437Grid: IEquatable { byte[] CopyRaw(); - bool Equals(Cp437Grid @other); void Fill(byte @value); byte Get(ulong @x, ulong @y); ulong Height(); @@ -3961,14 +5561,6 @@ public class Cp437Grid : ICp437Grid, IDisposable { } - public bool Equals(Cp437Grid @other) { - return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( - _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => - _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_equals(thisPtr, FfiConverterTypeCp437Grid.INSTANCE.Lower(@other), ref _status) -))); - } - - public void Fill(byte @value) { CallWithPointer(thisPtr => _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => @@ -4019,6 +5611,25 @@ public class Cp437Grid : ICp437Grid, IDisposable { } + public bool Equals(Cp437Grid? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeCp437Grid.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is Cp437Grid)) return false; + return Equals(obj as Cp437Grid); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_uniffi_trait_hash(thisPtr, ref _status) +))); + } public static Cp437Grid Clone(Cp437Grid @other) { @@ -4064,7 +5675,202 @@ class FfiConverterTypeCp437Grid: FfiConverter { -public interface IFadeOutCommand { +public interface ICp437GridCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); + Cp437Grid GetGrid(); + void SetGrid(Cp437Grid @grid); +} +public class Cp437GridCommand : ICp437GridCommand, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public Cp437GridCommand(IntPtr pointer) { + this.pointer = pointer; + } + + ~Cp437GridCommand() { + Destroy(); + } + public Cp437GridCommand(ulong @offsetX, ulong @offsetY, Cp437Grid @grid) : + this( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_cp437gridcommand_new(FfiConverterUInt64.INSTANCE.Lower(@offsetX), FfiConverterUInt64.INSTANCE.Lower(@offsetY), FfiConverterTypeCp437Grid.INSTANCE.Lower(@grid), ref _status) +)) {} + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_cp437gridcommand(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_cp437gridcommand(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_as_packet(thisPtr, ref _status) +))); + } + + + public Cp437Grid GetGrid() { + return CallWithPointer(thisPtr => FfiConverterTypeCp437Grid.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_get_grid(thisPtr, ref _status) +))); + } + + + public void SetGrid(Cp437Grid @grid) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_set_grid(thisPtr, FfiConverterTypeCp437Grid.INSTANCE.Lower(@grid), ref _status) +)); + } + + + + public bool Equals(Cp437GridCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeCp437GridCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is Cp437GridCommand)) return false; + return Equals(obj as Cp437GridCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437gridcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static Cp437GridCommand Clone(Cp437GridCommand @other) { + return new Cp437GridCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_cp437gridcommand_clone(FfiConverterTypeCp437GridCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypeCp437GridCommand: FfiConverter { + public static FfiConverterTypeCp437GridCommand INSTANCE = new FfiConverterTypeCp437GridCommand(); + + + public override IntPtr Lower(Cp437GridCommand value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override Cp437GridCommand Lift(IntPtr value) { + return new Cp437GridCommand(value); + } + + public override Cp437GridCommand Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(Cp437GridCommand value) { + return 8; + } + + public override void Write(Cp437GridCommand value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + +public interface IFadeOutCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); } public class FadeOutCommand : IFadeOutCommand, IDisposable { protected IntPtr pointer; @@ -4160,8 +5966,52 @@ public class FadeOutCommand : IFadeOutCommand, IDisposable { } + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_as_packet(thisPtr, ref _status) +))); + } + + + public bool Equals(FadeOutCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeFadeOutCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is FadeOutCommand)) return false; + return Equals(obj as FadeOutCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_fadeoutcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + public static FadeOutCommand Clone(FadeOutCommand @other) { + return new FadeOutCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_fadeoutcommand_clone(FfiConverterTypeFadeOutCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + } class FfiConverterTypeFadeOutCommand: FfiConverter { public static FfiConverterTypeFadeOutCommand INSTANCE = new FfiConverterTypeFadeOutCommand(); @@ -4190,7 +6040,183 @@ class FfiConverterTypeFadeOutCommand: FfiConverter { -public interface IHardResetCommand { +public interface IGlobalBrightnessCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); +} +public class GlobalBrightnessCommand : IGlobalBrightnessCommand, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public GlobalBrightnessCommand(IntPtr pointer) { + this.pointer = pointer; + } + + ~GlobalBrightnessCommand() { + Destroy(); + } + public GlobalBrightnessCommand(Brightness @brightness) : + this( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_globalbrightnesscommand_new(FfiConverterTypeBrightness.INSTANCE.Lower(@brightness), ref _status) +)) {} + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_globalbrightnesscommand(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_globalbrightnesscommand(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_as_packet(thisPtr, ref _status) +))); + } + + + public bool Equals(GlobalBrightnessCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeGlobalBrightnessCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is GlobalBrightnessCommand)) return false; + return Equals(obj as GlobalBrightnessCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_globalbrightnesscommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static GlobalBrightnessCommand Clone(GlobalBrightnessCommand @other) { + return new GlobalBrightnessCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_globalbrightnesscommand_clone(FfiConverterTypeGlobalBrightnessCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypeGlobalBrightnessCommand: FfiConverter { + public static FfiConverterTypeGlobalBrightnessCommand INSTANCE = new FfiConverterTypeGlobalBrightnessCommand(); + + + public override IntPtr Lower(GlobalBrightnessCommand value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override GlobalBrightnessCommand Lift(IntPtr value) { + return new GlobalBrightnessCommand(value); + } + + public override GlobalBrightnessCommand Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(GlobalBrightnessCommand value) { + return 8; + } + + public override void Write(GlobalBrightnessCommand value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + +public interface IHardResetCommand: IEquatable { + Command AsGeneric(); + /// + Packet AsPacket(); } public class HardResetCommand : IHardResetCommand, IDisposable { protected IntPtr pointer; @@ -4286,8 +6312,52 @@ public class HardResetCommand : IHardResetCommand, IDisposable { } + public Command AsGeneric() { + return CallWithPointer(thisPtr => FfiConverterTypeCommand.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_as_generic(thisPtr, ref _status) +))); + } + + + /// + public Packet AsPacket() { + return CallWithPointer(thisPtr => FfiConverterTypePacket.INSTANCE.Lift( + _UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_as_packet(thisPtr, ref _status) +))); + } + + + public bool Equals(HardResetCommand? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeHardResetCommand.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is HardResetCommand)) return false; + return Equals(obj as HardResetCommand); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_hardresetcommand_uniffi_trait_hash(thisPtr, ref _status) +))); + } + public static HardResetCommand Clone(HardResetCommand @other) { + return new HardResetCommand( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_hardresetcommand_clone(FfiConverterTypeHardResetCommand.INSTANCE.Lower(@other), ref _status) +)); + } + + } class FfiConverterTypeHardResetCommand: FfiConverter { public static FfiConverterTypeHardResetCommand INSTANCE = new FfiConverterTypeHardResetCommand(); @@ -4316,6 +6386,330 @@ class FfiConverterTypeHardResetCommand: FfiConverter { +public interface IHeader: IEquatable
{ +} +public class Header : IHeader, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public Header(IntPtr pointer) { + this.pointer = pointer; + } + + ~Header() { + Destroy(); + } + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_header(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_header(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public bool Equals(Header? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_header_uniffi_trait_eq_eq(thisPtr, FfiConverterTypeHeader.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is Header)) return false; + return Equals(obj as Header); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_header_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static Header Clone(Header @other) { + return new Header( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_header_clone(FfiConverterTypeHeader.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypeHeader: FfiConverter { + public static FfiConverterTypeHeader INSTANCE = new FfiConverterTypeHeader(); + + + public override IntPtr Lower(Header value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override Header Lift(IntPtr value) { + return new Header(value); + } + + public override Header Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(Header value) { + return 8; + } + + public override void Write(Header value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + +public interface IPacket: IEquatable { + byte[] AsBytes(); + Header GetHeader(); + void SetHeader(Header @header); +} +public class Packet : IPacket, IDisposable { + protected IntPtr pointer; + private int _wasDestroyed = 0; + private long _callCounter = 1; + + public Packet(IntPtr pointer) { + this.pointer = pointer; + } + + ~Packet() { + Destroy(); + } + + protected void FreeRustArcPtr() { + _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_packet(this.pointer, ref status); + }); + } + + protected IntPtr CloneRustArcPtr() { + return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => { + return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_packet(this.pointer, ref status); + }); + } + + public void Destroy() + { + // Only allow a single call to this method. + if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0) + { + // This decrement always matches the initial count of 1 given at creation time. + if (Interlocked.Decrement(ref _callCounter) == 0) + { + FreeRustArcPtr(); + } + } + } + + public void Dispose() + { + Destroy(); + GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead. + } + + private void IncrementCallCounter() + { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + long count; + do + { + count = Interlocked.Read(ref _callCounter); + if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name)); + if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name)); + + } while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count); + } + + private void DecrementCallCounter() + { + // This decrement always matches the increment we performed above. + if (Interlocked.Decrement(ref _callCounter) == 0) { + FreeRustArcPtr(); + } + } + + internal void CallWithPointer(Action action) + { + IncrementCallCounter(); + try { + action(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + internal T CallWithPointer(Func func) + { + IncrementCallCounter(); + try { + return func(CloneRustArcPtr()); + } + finally { + DecrementCallCounter(); + } + } + + + public byte[] AsBytes() { + return CallWithPointer(thisPtr => FfiConverterByteArray.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_packet_as_bytes(thisPtr, ref _status) +))); + } + + + public Header GetHeader() { + return CallWithPointer(thisPtr => FfiConverterTypeHeader.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_packet_get_header(thisPtr, ref _status) +))); + } + + + public void SetHeader(Header @header) { + CallWithPointer(thisPtr => + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_packet_set_header(thisPtr, FfiConverterTypeHeader.INSTANCE.Lower(@header), ref _status) +)); + } + + + + public bool Equals(Packet? other) + { + if (other is null) return false; + return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_packet_uniffi_trait_eq_eq(thisPtr, FfiConverterTypePacket.INSTANCE.Lower(@other), ref _status) +))); + } + public override bool Equals(object? obj) + { + if (obj is null || !(obj is Packet)) return false; + return Equals(obj as Packet); + } + public override int GetHashCode() { + return (int)CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_packet_uniffi_trait_hash(thisPtr, ref _status) +))); + } + + + public static Packet Clone(Packet @other) { + return new Packet( + _UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) => + _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_packet_clone(FfiConverterTypePacket.INSTANCE.Lower(@other), ref _status) +)); + } + + +} +class FfiConverterTypePacket: FfiConverter { + public static FfiConverterTypePacket INSTANCE = new FfiConverterTypePacket(); + + + public override IntPtr Lower(Packet value) { + return value.CallWithPointer(thisPtr => thisPtr); + } + + public override Packet Lift(IntPtr value) { + return new Packet(value); + } + + public override Packet Read(BigEndianStream stream) { + return Lift(new IntPtr(stream.ReadLong())); + } + + public override int AllocationSize(Packet value) { + return 8; + } + + public override void Write(Packet value, BigEndianStream stream) { + stream.WriteLong(Lower(value).ToInt64()); + } +} + + + public record Constants ( ulong @tileSize, ulong @tileWidth, @@ -4399,137 +6793,6 @@ class FfiConverterTypeBinaryOperation: FfiConverterRustBuffer { -public class CharGridException: UniffiException { - CharGridException() : base() {} - CharGridException(String @Message) : base(@Message) {} - - // Each variant is a nested class - - - public class StringNotOneChar : CharGridException { - // Members - public string @value; - - // Constructor - public StringNotOneChar( - string @value) : base( - "@value" + "=" + @value) { - - this.@value = @value; - } - } - - - public class InvalidSeriesLength : CharGridException { - // Members - public ulong @actual; - public ulong @expected; - - // Constructor - public InvalidSeriesLength( - ulong @actual, - ulong @expected) : base( - "@actual" + "=" + @actual+ ", " + - "@expected" + "=" + @expected) { - - this.@actual = @actual; - - this.@expected = @expected; - } - } - - - public class OutOfBounds : CharGridException { - // Members - public ulong @index; - public ulong @size; - - // Constructor - public OutOfBounds( - ulong @index, - ulong @size) : base( - "@index" + "=" + @index+ ", " + - "@size" + "=" + @size) { - - this.@index = @index; - - this.@size = @size; - } - } - - - -} - -class FfiConverterTypeCharGridError : FfiConverterRustBuffer, CallStatusErrorHandler { - public static FfiConverterTypeCharGridError INSTANCE = new FfiConverterTypeCharGridError(); - - public override CharGridException Read(BigEndianStream stream) { - var value = stream.ReadInt(); - switch (value) { - case 1: - return new CharGridException.StringNotOneChar( - FfiConverterString.INSTANCE.Read(stream)); - case 2: - return new CharGridException.InvalidSeriesLength( - FfiConverterUInt64.INSTANCE.Read(stream), - FfiConverterUInt64.INSTANCE.Read(stream)); - case 3: - return new CharGridException.OutOfBounds( - FfiConverterUInt64.INSTANCE.Read(stream), - FfiConverterUInt64.INSTANCE.Read(stream)); - default: - throw new InternalException(String.Format("invalid error value '{0}' in FfiConverterTypeCharGridError.Read()", value)); - } - } - - public override int AllocationSize(CharGridException value) { - switch (value) { - - case CharGridException.StringNotOneChar variant_value: - return 4 - + FfiConverterString.INSTANCE.AllocationSize(variant_value.@value); - - case CharGridException.InvalidSeriesLength variant_value: - return 4 - + FfiConverterUInt64.INSTANCE.AllocationSize(variant_value.@actual) - + FfiConverterUInt64.INSTANCE.AllocationSize(variant_value.@expected); - - case CharGridException.OutOfBounds variant_value: - return 4 - + FfiConverterUInt64.INSTANCE.AllocationSize(variant_value.@index) - + FfiConverterUInt64.INSTANCE.AllocationSize(variant_value.@size); - default: - throw new InternalException(String.Format("invalid error value '{0}' in FfiConverterTypeCharGridError.AllocationSize()", value)); - } - } - - public override void Write(CharGridException value, BigEndianStream stream) { - switch (value) { - case CharGridException.StringNotOneChar variant_value: - stream.WriteInt(1); - FfiConverterString.INSTANCE.Write(variant_value.@value, stream); - break; - case CharGridException.InvalidSeriesLength variant_value: - stream.WriteInt(2); - FfiConverterUInt64.INSTANCE.Write(variant_value.@actual, stream); - FfiConverterUInt64.INSTANCE.Write(variant_value.@expected, stream); - break; - case CharGridException.OutOfBounds variant_value: - stream.WriteInt(3); - FfiConverterUInt64.INSTANCE.Write(variant_value.@index, stream); - FfiConverterUInt64.INSTANCE.Write(variant_value.@size, stream); - break; - default: - throw new InternalException(String.Format("invalid error value '{0}' in FfiConverterTypeCharGridError.Write()", value)); - } - } -} - - - - - public enum CompressionCode: int { /// @@ -4615,6 +6878,49 @@ public class ServicePointException: UniffiException { } } + public class InvalidPacket : ServicePointException { + public InvalidPacket() : base() {} + } + + + + public class StringNotOneChar : ServicePointException { + // Members + public string @value; + + // Constructor + public StringNotOneChar( + string @value) : base( + "@value" + "=" + @value) { + + this.@value = @value; + } + } + + + public class InvalidSeriesLength : ServicePointException { + // Members + public ulong @actual; + public ulong @expected; + + // Constructor + public InvalidSeriesLength( + ulong @actual, + ulong @expected) : base( + "@actual" + "=" + @actual+ ", " + + "@expected" + "=" + @expected) { + + this.@actual = @actual; + + this.@expected = @expected; + } + } + + public class OutOfBounds : ServicePointException { + public OutOfBounds() : base() {} + } + + } @@ -4631,6 +6937,17 @@ class FfiConverterTypeServicePointError : FfiConverterRustBuffer