7038 lines
282 KiB
C#
7038 lines
282 KiB
C#
// <auto-generated>
|
|
// This file was generated by uniffi-bindgen-cs v0.9.0+v0.28.3
|
|
// See https://github.com/NordSecurity/uniffi-bindgen-cs for more information.
|
|
// </auto-generated>
|
|
|
|
#nullable enable
|
|
|
|
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Threading;
|
|
namespace ServicePoint;
|
|
using Brightness = Byte;
|
|
using FfiConverterTypeBrightness = FfiConverterUInt8;
|
|
|
|
|
|
|
|
// This is a helper for safely working with byte buffers returned from the Rust code.
|
|
// A rust-owned buffer is represented by its capacity, its current length, and a
|
|
// pointer to the underlying data.
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
internal struct RustBuffer {
|
|
public ulong capacity;
|
|
public ulong len;
|
|
public IntPtr data;
|
|
|
|
public static RustBuffer Alloc(int size) {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
var buffer = _UniFFILib.ffi_servicepoint_binding_uniffi_rustbuffer_alloc(Convert.ToUInt64(size), ref status);
|
|
if (buffer.data == IntPtr.Zero) {
|
|
throw new AllocationException($"RustBuffer.Alloc() returned null data pointer (size={size})");
|
|
}
|
|
return buffer;
|
|
});
|
|
}
|
|
|
|
public static void Free(RustBuffer buffer) {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.ffi_servicepoint_binding_uniffi_rustbuffer_free(buffer, ref status);
|
|
});
|
|
}
|
|
|
|
public static BigEndianStream MemoryStream(IntPtr data, long length)
|
|
{
|
|
unsafe
|
|
{
|
|
return new BigEndianStream(new UnmanagedMemoryStream((byte*)data.ToPointer(), length));
|
|
}
|
|
}
|
|
|
|
public BigEndianStream AsStream()
|
|
{
|
|
unsafe
|
|
{
|
|
return new BigEndianStream(
|
|
new UnmanagedMemoryStream((byte*)data.ToPointer(), Convert.ToInt64(len))
|
|
);
|
|
}
|
|
}
|
|
|
|
public BigEndianStream AsWriteableStream()
|
|
{
|
|
unsafe
|
|
{
|
|
return new BigEndianStream(
|
|
new UnmanagedMemoryStream(
|
|
(byte*)data.ToPointer(),
|
|
Convert.ToInt64(capacity),
|
|
Convert.ToInt64(capacity),
|
|
FileAccess.Write
|
|
)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
// This is a helper for safely passing byte references into the rust code.
|
|
// It's not actually used at the moment, because there aren't many things that you
|
|
// can take a direct pointer to managed memory, and if we're going to copy something
|
|
// then we might as well copy it into a `RustBuffer`. But it's here for API
|
|
// completeness.
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
internal struct ForeignBytes {
|
|
public int length;
|
|
public IntPtr data;
|
|
}
|
|
|
|
|
|
// The FfiConverter interface handles converter types to and from the FFI
|
|
//
|
|
// All implementing objects should be public to support external types. When a
|
|
// type is external we need to import it's FfiConverter.
|
|
internal abstract class FfiConverter<CsType, FfiType> {
|
|
// Convert an FFI type to a C# type
|
|
public abstract CsType Lift(FfiType value);
|
|
|
|
// Convert C# type to an FFI type
|
|
public abstract FfiType Lower(CsType value);
|
|
|
|
// Read a C# type from a `ByteBuffer`
|
|
public abstract CsType Read(BigEndianStream stream);
|
|
|
|
// Calculate bytes to allocate when creating a `RustBuffer`
|
|
//
|
|
// This must return at least as many bytes as the write() function will
|
|
// write. It can return more bytes than needed, for example when writing
|
|
// Strings we can't know the exact bytes needed until we the UTF-8
|
|
// encoding, so we pessimistically allocate the largest size possible (3
|
|
// bytes per codepoint). Allocating extra bytes is not really a big deal
|
|
// because the `RustBuffer` is short-lived.
|
|
public abstract int AllocationSize(CsType value);
|
|
|
|
// Write a C# type to a `ByteBuffer`
|
|
public abstract void Write(CsType value, BigEndianStream stream);
|
|
|
|
// Lower a value into a `RustBuffer`
|
|
//
|
|
// This method lowers a value into a `RustBuffer` rather than the normal
|
|
// FfiType. It's used by the callback interface code. Callback interface
|
|
// returns are always serialized into a `RustBuffer` regardless of their
|
|
// normal FFI type.
|
|
public RustBuffer LowerIntoRustBuffer(CsType value) {
|
|
var rbuf = RustBuffer.Alloc(AllocationSize(value));
|
|
try {
|
|
var stream = rbuf.AsWriteableStream();
|
|
Write(value, stream);
|
|
rbuf.len = Convert.ToUInt64(stream.Position);
|
|
return rbuf;
|
|
} catch {
|
|
RustBuffer.Free(rbuf);
|
|
throw;
|
|
}
|
|
}
|
|
|
|
// Lift a value from a `RustBuffer`.
|
|
//
|
|
// This here mostly because of the symmetry with `lowerIntoRustBuffer()`.
|
|
// It's currently only used by the `FfiConverterRustBuffer` class below.
|
|
protected CsType LiftFromRustBuffer(RustBuffer rbuf) {
|
|
var stream = rbuf.AsStream();
|
|
try {
|
|
var item = Read(stream);
|
|
if (stream.HasRemaining()) {
|
|
throw new InternalException("junk remaining in buffer after lifting, something is very wrong!!");
|
|
}
|
|
return item;
|
|
} finally {
|
|
RustBuffer.Free(rbuf);
|
|
}
|
|
}
|
|
}
|
|
|
|
// FfiConverter that uses `RustBuffer` as the FfiType
|
|
internal abstract class FfiConverterRustBuffer<CsType>: FfiConverter<CsType, RustBuffer> {
|
|
public override CsType Lift(RustBuffer value) {
|
|
return LiftFromRustBuffer(value);
|
|
}
|
|
public override RustBuffer Lower(CsType value) {
|
|
return LowerIntoRustBuffer(value);
|
|
}
|
|
}
|
|
|
|
|
|
// A handful of classes and functions to support the generated data structures.
|
|
// This would be a good candidate for isolating in its own ffi-support lib.
|
|
// Error runtime.
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
struct UniffiRustCallStatus {
|
|
public sbyte code;
|
|
public RustBuffer error_buf;
|
|
|
|
public bool IsSuccess() {
|
|
return code == 0;
|
|
}
|
|
|
|
public bool IsError() {
|
|
return code == 1;
|
|
}
|
|
|
|
public bool IsPanic() {
|
|
return code == 2;
|
|
}
|
|
}
|
|
|
|
// Base class for all uniffi exceptions
|
|
public class UniffiException: System.Exception {
|
|
public UniffiException(): base() {}
|
|
public UniffiException(string message): base(message) {}
|
|
}
|
|
|
|
public class UndeclaredErrorException: UniffiException {
|
|
public UndeclaredErrorException(string message): base(message) {}
|
|
}
|
|
|
|
public class PanicException: UniffiException {
|
|
public PanicException(string message): base(message) {}
|
|
}
|
|
|
|
public class AllocationException: UniffiException {
|
|
public AllocationException(string message): base(message) {}
|
|
}
|
|
|
|
public class InternalException: UniffiException {
|
|
public InternalException(string message): base(message) {}
|
|
}
|
|
|
|
public class InvalidEnumException: InternalException {
|
|
public InvalidEnumException(string message): base(message) {
|
|
}
|
|
}
|
|
|
|
public class UniffiContractVersionException: UniffiException {
|
|
public UniffiContractVersionException(string message): base(message) {
|
|
}
|
|
}
|
|
|
|
public class UniffiContractChecksumException: UniffiException {
|
|
public UniffiContractChecksumException(string message): base(message) {
|
|
}
|
|
}
|
|
|
|
// Each top-level error class has a companion object that can lift the error from the call status's rust buffer
|
|
interface CallStatusErrorHandler<E> where E: System.Exception {
|
|
E Lift(RustBuffer error_buf);
|
|
}
|
|
|
|
// CallStatusErrorHandler implementation for times when we don't expect a CALL_ERROR
|
|
class NullCallStatusErrorHandler: CallStatusErrorHandler<UniffiException> {
|
|
public static NullCallStatusErrorHandler INSTANCE = new NullCallStatusErrorHandler();
|
|
|
|
public UniffiException Lift(RustBuffer error_buf) {
|
|
RustBuffer.Free(error_buf);
|
|
return new UndeclaredErrorException("library has returned an error not declared in UNIFFI interface file");
|
|
}
|
|
}
|
|
|
|
// Helpers for calling Rust
|
|
// In practice we usually need to be synchronized to call this safely, so it doesn't
|
|
// synchronize itself
|
|
class _UniffiHelpers {
|
|
public delegate void RustCallAction(ref UniffiRustCallStatus status);
|
|
public delegate U RustCallFunc<out U>(ref UniffiRustCallStatus status);
|
|
|
|
// Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err
|
|
public static U RustCallWithError<U, E>(CallStatusErrorHandler<E> errorHandler, RustCallFunc<U> callback)
|
|
where E: UniffiException
|
|
{
|
|
var status = new UniffiRustCallStatus();
|
|
var return_value = callback(ref status);
|
|
if (status.IsSuccess()) {
|
|
return return_value;
|
|
} else if (status.IsError()) {
|
|
throw errorHandler.Lift(status.error_buf);
|
|
} else if (status.IsPanic()) {
|
|
// when the rust code sees a panic, it tries to construct a rustbuffer
|
|
// with the message. but if that code panics, then it just sends back
|
|
// an empty buffer.
|
|
if (status.error_buf.len > 0) {
|
|
throw new PanicException(FfiConverterString.INSTANCE.Lift(status.error_buf));
|
|
} else {
|
|
throw new PanicException("Rust panic");
|
|
}
|
|
} else {
|
|
throw new InternalException($"Unknown rust call status: {status.code}");
|
|
}
|
|
}
|
|
|
|
// Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err
|
|
public static void RustCallWithError<E>(CallStatusErrorHandler<E> errorHandler, RustCallAction callback)
|
|
where E: UniffiException
|
|
{
|
|
_UniffiHelpers.RustCallWithError(errorHandler, (ref UniffiRustCallStatus status) => {
|
|
callback(ref status);
|
|
return 0;
|
|
});
|
|
}
|
|
|
|
// Call a rust function that returns a plain value
|
|
public static U RustCall<U>(RustCallFunc<U> callback) {
|
|
return _UniffiHelpers.RustCallWithError(NullCallStatusErrorHandler.INSTANCE, callback);
|
|
}
|
|
|
|
// Call a rust function that returns a plain value
|
|
public static void RustCall(RustCallAction callback) {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
callback(ref status);
|
|
return 0;
|
|
});
|
|
}
|
|
}
|
|
|
|
static class FFIObjectUtil {
|
|
public static void DisposeAll(params Object?[] list) {
|
|
foreach (var obj in list) {
|
|
Dispose(obj);
|
|
}
|
|
}
|
|
|
|
// Dispose is implemented by recursive type inspection at runtime. This is because
|
|
// generating correct Dispose calls for recursive complex types, e.g. List<List<int>>
|
|
// is quite cumbersome.
|
|
private static void Dispose(dynamic? obj) {
|
|
if (obj == null) {
|
|
return;
|
|
}
|
|
|
|
if (obj is IDisposable disposable) {
|
|
disposable.Dispose();
|
|
return;
|
|
}
|
|
|
|
var type = obj.GetType();
|
|
if (type != null) {
|
|
if (type.IsGenericType) {
|
|
if (type.GetGenericTypeDefinition().IsAssignableFrom(typeof(List<>))) {
|
|
foreach (var value in obj) {
|
|
Dispose(value);
|
|
}
|
|
} else if (type.GetGenericTypeDefinition().IsAssignableFrom(typeof(Dictionary<,>))) {
|
|
foreach (var value in obj.Values) {
|
|
Dispose(value);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Big endian streams are not yet available in dotnet :'(
|
|
// https://github.com/dotnet/runtime/issues/26904
|
|
|
|
class StreamUnderflowException: System.Exception {
|
|
public StreamUnderflowException() {
|
|
}
|
|
}
|
|
|
|
class BigEndianStream {
|
|
Stream stream;
|
|
public BigEndianStream(Stream stream) {
|
|
this.stream = stream;
|
|
}
|
|
|
|
public bool HasRemaining() {
|
|
return (stream.Length - stream.Position) > 0;
|
|
}
|
|
|
|
public long Position {
|
|
get => stream.Position;
|
|
set => stream.Position = value;
|
|
}
|
|
|
|
public void WriteBytes(byte[] value) {
|
|
stream.Write(value, 0, value.Length);
|
|
}
|
|
|
|
public void WriteByte(byte value) {
|
|
stream.WriteByte(value);
|
|
}
|
|
|
|
public void WriteUShort(ushort value) {
|
|
stream.WriteByte((byte)(value >> 8));
|
|
stream.WriteByte((byte)value);
|
|
}
|
|
|
|
public void WriteUInt(uint value) {
|
|
stream.WriteByte((byte)(value >> 24));
|
|
stream.WriteByte((byte)(value >> 16));
|
|
stream.WriteByte((byte)(value >> 8));
|
|
stream.WriteByte((byte)value);
|
|
}
|
|
|
|
public void WriteULong(ulong value) {
|
|
WriteUInt((uint)(value >> 32));
|
|
WriteUInt((uint)value);
|
|
}
|
|
|
|
public void WriteSByte(sbyte value) {
|
|
stream.WriteByte((byte)value);
|
|
}
|
|
|
|
public void WriteShort(short value) {
|
|
WriteUShort((ushort)value);
|
|
}
|
|
|
|
public void WriteInt(int value) {
|
|
WriteUInt((uint)value);
|
|
}
|
|
|
|
public void WriteFloat(float value) {
|
|
unsafe {
|
|
WriteInt(*((int*)&value));
|
|
}
|
|
}
|
|
|
|
public void WriteLong(long value) {
|
|
WriteULong((ulong)value);
|
|
}
|
|
|
|
public void WriteDouble(double value) {
|
|
WriteLong(BitConverter.DoubleToInt64Bits(value));
|
|
}
|
|
|
|
public byte[] ReadBytes(int length) {
|
|
CheckRemaining(length);
|
|
byte[] result = new byte[length];
|
|
stream.Read(result, 0, length);
|
|
return result;
|
|
}
|
|
|
|
public byte ReadByte() {
|
|
CheckRemaining(1);
|
|
return Convert.ToByte(stream.ReadByte());
|
|
}
|
|
|
|
public ushort ReadUShort() {
|
|
CheckRemaining(2);
|
|
return (ushort)(stream.ReadByte() << 8 | stream.ReadByte());
|
|
}
|
|
|
|
public uint ReadUInt() {
|
|
CheckRemaining(4);
|
|
return (uint)(stream.ReadByte() << 24
|
|
| stream.ReadByte() << 16
|
|
| stream.ReadByte() << 8
|
|
| stream.ReadByte());
|
|
}
|
|
|
|
public ulong ReadULong() {
|
|
return (ulong)ReadUInt() << 32 | (ulong)ReadUInt();
|
|
}
|
|
|
|
public sbyte ReadSByte() {
|
|
return (sbyte)ReadByte();
|
|
}
|
|
|
|
public short ReadShort() {
|
|
return (short)ReadUShort();
|
|
}
|
|
|
|
public int ReadInt() {
|
|
return (int)ReadUInt();
|
|
}
|
|
|
|
public float ReadFloat() {
|
|
unsafe {
|
|
int value = ReadInt();
|
|
return *((float*)&value);
|
|
}
|
|
}
|
|
|
|
public long ReadLong() {
|
|
return (long)ReadULong();
|
|
}
|
|
|
|
public double ReadDouble() {
|
|
return BitConverter.Int64BitsToDouble(ReadLong());
|
|
}
|
|
|
|
private void CheckRemaining(int length) {
|
|
if (stream.Length - stream.Position < length) {
|
|
throw new StreamUnderflowException();
|
|
}
|
|
}
|
|
}
|
|
|
|
// Contains loading, initialization code,
|
|
// and the FFI Function declarations in a com.sun.jna.Library.
|
|
|
|
|
|
// This is an implementation detail that will be called internally by the public API.
|
|
static class _UniFFILib {
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiRustFutureContinuationCallback(
|
|
ulong @data,sbyte @pollResult
|
|
);
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureFree(
|
|
ulong @handle
|
|
);
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiCallbackInterfaceFree(
|
|
ulong @handle
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFuture
|
|
{
|
|
public ulong @handle;
|
|
public IntPtr @free;
|
|
}
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructU8
|
|
{
|
|
public byte @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteU8(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructU8 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructI8
|
|
{
|
|
public sbyte @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteI8(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructI8 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructU16
|
|
{
|
|
public ushort @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteU16(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructU16 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructI16
|
|
{
|
|
public short @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteI16(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructI16 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructU32
|
|
{
|
|
public uint @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteU32(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructU32 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructI32
|
|
{
|
|
public int @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteI32(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructI32 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructU64
|
|
{
|
|
public ulong @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteU64(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructU64 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructI64
|
|
{
|
|
public long @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteI64(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructI64 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructF32
|
|
{
|
|
public float @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteF32(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructF32 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructF64
|
|
{
|
|
public double @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteF64(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructF64 @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructPointer
|
|
{
|
|
public IntPtr @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompletePointer(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructPointer @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructRustBuffer
|
|
{
|
|
public RustBuffer @returnValue;
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
public delegate void UniffiForeignFutureCompleteRustBuffer(
|
|
ulong @callbackData,_UniFFILib.UniffiForeignFutureStructRustBuffer @result
|
|
);
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct UniffiForeignFutureStructVoid
|
|
{
|
|
public UniffiRustCallStatus @callStatus;
|
|
}
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
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;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static _UniFFILib() {
|
|
_UniFFILib.uniffiCheckContractApiVersion();
|
|
_UniFFILib.uniffiCheckApiChecksums();
|
|
|
|
}
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_bitvec(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitvec(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_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_bitvec_load(RustBuffer @data,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_new(ulong @size,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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 void uniffi_servicepoint_binding_uniffi_fn_method_bitvec_fill(IntPtr @ptr,sbyte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitvec_get(IntPtr @ptr,ulong @index,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitvec_len(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitmap(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_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_bitmap_load(ulong @width,ulong @height,RustBuffer @data,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_new(ulong @width,ulong @height,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_new_max_sized(ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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 void uniffi_servicepoint_binding_uniffi_fn_method_bitmap_fill(IntPtr @ptr,sbyte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitmap_get(IntPtr @ptr,ulong @x,ulong @y,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitmap_height(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitmap_set(IntPtr @ptr,ulong @x,ulong @y,sbyte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitmap_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_bitmap_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_bitmap_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_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)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_brightnessgrid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_brightnessgrid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgrid_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_brightnessgrid_load(ulong @width,ulong @height,RustBuffer @data,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgrid_new(ulong @width,ulong @height,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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 void uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_fill(IntPtr @ptr,byte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern byte uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_get(IntPtr @ptr,ulong @x,ulong @y,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_height(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_set(IntPtr @ptr,ulong @x,ulong @y,byte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_chargrid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_chargrid_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_chargrid_load(RustBuffer @data,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_chargrid_new(ulong @width,ulong @height,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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 void uniffi_servicepoint_binding_uniffi_fn_method_chargrid_fill(IntPtr @ptr,RustBuffer @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get(IntPtr @ptr,ulong @x,ulong @y,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get_col(IntPtr @ptr,ulong @x,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get_row(IntPtr @ptr,ulong @y,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_chargrid_height(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_chargrid_set(IntPtr @ptr,ulong @x,ulong @y,RustBuffer @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_chargrid_set_col(IntPtr @ptr,ulong @x,RustBuffer @col,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_chargrid_set_row(IntPtr @ptr,ulong @y,RustBuffer @row,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_chargrid_to_cp437(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_command(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_connection(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_connection(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_connection_new(RustBuffer @host,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_cp437grid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_cp437grid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_cp437grid_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_cp437grid_load(ulong @width,ulong @height,RustBuffer @data,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_cp437grid_new(ulong @width,ulong @height,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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 void uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_fill(IntPtr @ptr,byte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern byte uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_get(IntPtr @ptr,ulong @x,ulong @y,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_height(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_set(IntPtr @ptr,ulong @x,ulong @y,byte @value,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_to_utf8(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer ffi_servicepoint_binding_uniffi_rustbuffer_alloc(ulong @size,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer ffi_servicepoint_binding_uniffi_rustbuffer_from_bytes(ForeignBytes @bytes,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rustbuffer_free(RustBuffer @buf,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer ffi_servicepoint_binding_uniffi_rustbuffer_reserve(RustBuffer @buf,ulong @additional,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_u8(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_u8(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_u8(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern byte ffi_servicepoint_binding_uniffi_rust_future_complete_u8(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_i8(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_i8(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_i8(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern sbyte ffi_servicepoint_binding_uniffi_rust_future_complete_i8(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_u16(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_u16(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_u16(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort ffi_servicepoint_binding_uniffi_rust_future_complete_u16(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_i16(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_i16(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_i16(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern short ffi_servicepoint_binding_uniffi_rust_future_complete_i16(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_u32(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_u32(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_u32(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern uint ffi_servicepoint_binding_uniffi_rust_future_complete_u32(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_i32(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_i32(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_i32(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern int ffi_servicepoint_binding_uniffi_rust_future_complete_i32(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_u64(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_u64(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_u64(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ulong ffi_servicepoint_binding_uniffi_rust_future_complete_u64(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_i64(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_i64(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_i64(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern long ffi_servicepoint_binding_uniffi_rust_future_complete_i64(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_f32(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_f32(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_f32(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern float ffi_servicepoint_binding_uniffi_rust_future_complete_f32(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_f64(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_f64(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_f64(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern double ffi_servicepoint_binding_uniffi_rust_future_complete_f64(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_pointer(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_pointer(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_pointer(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr ffi_servicepoint_binding_uniffi_rust_future_complete_pointer(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_rust_buffer(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_rust_buffer(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_rust_buffer(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern RustBuffer ffi_servicepoint_binding_uniffi_rust_future_complete_rust_buffer(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_poll_void(IntPtr @handle,IntPtr @callback,IntPtr @callbackData
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_cancel_void(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_free_void(IntPtr @handle
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern void ffi_servicepoint_binding_uniffi_rust_future_complete_void(IntPtr @handle,ref UniffiRustCallStatus _uniffi_out_err
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_func_get_constants(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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_fill(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_get(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_len(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_set(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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_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)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_fill(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_get(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_height(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_set(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_width(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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_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)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_fill(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_get(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_height(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_set(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_width(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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_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)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_fill(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_col(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_row(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_height(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_col(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_row(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_to_cp437(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_width(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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_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_fill(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_get(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_height(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_set(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_to_utf8(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_load(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_load(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_clone(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_load(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_load(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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_connection_new(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_clone(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_load(
|
|
);
|
|
|
|
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
|
|
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(
|
|
);
|
|
|
|
|
|
|
|
static void uniffiCheckContractApiVersion() {
|
|
var scaffolding_contract_version = _UniFFILib.ffi_servicepoint_binding_uniffi_uniffi_contract_version();
|
|
if (26 != scaffolding_contract_version) {
|
|
throw new UniffiContractVersionException($"ServicePoint: uniffi bindings expected version `26`, library returned `{scaffolding_contract_version}`");
|
|
}
|
|
}
|
|
|
|
static void uniffiCheckApiChecksums() {
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_func_get_constants();
|
|
if (checksum != 59241) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_func_get_constants` checksum `59241`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_copy_raw();
|
|
if (checksum != 44858) {
|
|
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_fill();
|
|
if (checksum != 49206) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_fill` checksum `49206`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_get();
|
|
if (checksum != 4505) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_get` checksum `4505`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_len();
|
|
if (checksum != 20215) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_len` checksum `20215`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_set();
|
|
if (checksum != 35617) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_set` checksum `35617`, 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_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}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_fill();
|
|
if (checksum != 7742) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_fill` checksum `7742`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_get();
|
|
if (checksum != 18964) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_get` checksum `18964`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_height();
|
|
if (checksum != 45228) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_height` checksum `45228`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_set();
|
|
if (checksum != 12299) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_set` checksum `12299`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_width();
|
|
if (checksum != 62870) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_width` checksum `62870`, 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_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}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_fill();
|
|
if (checksum != 46387) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_fill` checksum `46387`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_get();
|
|
if (checksum != 47112) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_get` checksum `47112`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_height();
|
|
if (checksum != 43167) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_height` checksum `43167`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_set();
|
|
if (checksum != 27525) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_set` checksum `27525`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_width();
|
|
if (checksum != 22654) {
|
|
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_fill();
|
|
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 != 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 != 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 != 30868) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_get_row` checksum `30868`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_height();
|
|
if (checksum != 37258) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_height` checksum `37258`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set();
|
|
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 != 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 != 26587) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_set_row` checksum `26587`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_to_cp437();
|
|
if (checksum != 7486) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_to_cp437` checksum `7486`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_width();
|
|
if (checksum != 40166) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_chargrid_width` checksum `40166`, 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_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}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_copy_raw();
|
|
if (checksum != 3828) {
|
|
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_fill();
|
|
if (checksum != 20435) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_fill` checksum `20435`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_get();
|
|
if (checksum != 58760) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_get` checksum `58760`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_height();
|
|
if (checksum != 32386) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_height` checksum `32386`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_set();
|
|
if (checksum != 24881) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_set` checksum `24881`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_to_utf8();
|
|
if (checksum != 36603) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_to_utf8` checksum `36603`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_cp437grid_width();
|
|
if (checksum != 11243) {
|
|
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) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_clone` checksum `35610`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_load();
|
|
if (checksum != 4260) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_load` checksum `4260`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_new();
|
|
if (checksum != 11119) {
|
|
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) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_clone` checksum `54327`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_load();
|
|
if (checksum != 51708) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_load` checksum `51708`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new();
|
|
if (checksum != 40771) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new` checksum `40771`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized();
|
|
if (checksum != 47687) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized` checksum `47687`, 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}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_clone();
|
|
if (checksum != 56444) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_clone` checksum `56444`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_load();
|
|
if (checksum != 224) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_load` checksum `224`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_new();
|
|
if (checksum != 45722) {
|
|
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) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_clone` checksum `5903`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_load();
|
|
if (checksum != 45804) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_load` checksum `45804`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_new();
|
|
if (checksum != 2094) {
|
|
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_connection_new();
|
|
if (checksum != 7315) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_connection_new` checksum `7315`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_clone();
|
|
if (checksum != 60629) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_clone` checksum `60629`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_load();
|
|
if (checksum != 9195) {
|
|
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_load` checksum `9195`, library returned `{checksum}`");
|
|
}
|
|
}
|
|
{
|
|
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_new();
|
|
if (checksum != 8874) {
|
|
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}`");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Public interface members begin here.
|
|
|
|
#pragma warning disable 8625
|
|
|
|
|
|
|
|
|
|
class FfiConverterUInt8: FfiConverter<byte, byte> {
|
|
public static FfiConverterUInt8 INSTANCE = new FfiConverterUInt8();
|
|
|
|
public override byte Lift(byte value) {
|
|
return value;
|
|
}
|
|
|
|
public override byte Read(BigEndianStream stream) {
|
|
return stream.ReadByte();
|
|
}
|
|
|
|
public override byte Lower(byte value) {
|
|
return value;
|
|
}
|
|
|
|
public override int AllocationSize(byte value) {
|
|
return 1;
|
|
}
|
|
|
|
public override void Write(byte value, BigEndianStream stream) {
|
|
stream.WriteByte(value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class FfiConverterUInt64: FfiConverter<ulong, ulong> {
|
|
public static FfiConverterUInt64 INSTANCE = new FfiConverterUInt64();
|
|
|
|
public override ulong Lift(ulong value) {
|
|
return value;
|
|
}
|
|
|
|
public override ulong Read(BigEndianStream stream) {
|
|
return stream.ReadULong();
|
|
}
|
|
|
|
public override ulong Lower(ulong value) {
|
|
return value;
|
|
}
|
|
|
|
public override int AllocationSize(ulong value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(ulong value, BigEndianStream stream) {
|
|
stream.WriteULong(value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class FfiConverterBoolean: FfiConverter<bool, sbyte> {
|
|
public static FfiConverterBoolean INSTANCE = new FfiConverterBoolean();
|
|
|
|
public override bool Lift(sbyte value) {
|
|
return value != 0;
|
|
}
|
|
|
|
public override bool Read(BigEndianStream stream) {
|
|
return Lift(stream.ReadSByte());
|
|
}
|
|
|
|
public override sbyte Lower(bool value) {
|
|
return value ? (sbyte)1 : (sbyte)0;
|
|
}
|
|
|
|
public override int AllocationSize(bool value) {
|
|
return (sbyte)1;
|
|
}
|
|
|
|
public override void Write(bool value, BigEndianStream stream) {
|
|
stream.WriteSByte(Lower(value));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class FfiConverterString: FfiConverter<string, RustBuffer> {
|
|
public static FfiConverterString INSTANCE = new FfiConverterString();
|
|
|
|
// Note: we don't inherit from FfiConverterRustBuffer, because we use a
|
|
// special encoding when lowering/lifting. We can use `RustBuffer.len` to
|
|
// store our length and avoid writing it out to the buffer.
|
|
public override string Lift(RustBuffer value) {
|
|
try {
|
|
var bytes = value.AsStream().ReadBytes(Convert.ToInt32(value.len));
|
|
return System.Text.Encoding.UTF8.GetString(bytes);
|
|
} finally {
|
|
RustBuffer.Free(value);
|
|
}
|
|
}
|
|
|
|
public override string Read(BigEndianStream stream) {
|
|
var length = stream.ReadInt();
|
|
var bytes = stream.ReadBytes(length);
|
|
return System.Text.Encoding.UTF8.GetString(bytes);
|
|
}
|
|
|
|
public override RustBuffer Lower(string value) {
|
|
var bytes = System.Text.Encoding.UTF8.GetBytes(value);
|
|
var rbuf = RustBuffer.Alloc(bytes.Length);
|
|
rbuf.AsWriteableStream().WriteBytes(bytes);
|
|
return rbuf;
|
|
}
|
|
|
|
// TODO(CS)
|
|
// We aren't sure exactly how many bytes our string will be once it's UTF-8
|
|
// encoded. Allocate 3 bytes per unicode codepoint which will always be
|
|
// enough.
|
|
public override int AllocationSize(string value) {
|
|
const int sizeForLength = 4;
|
|
var sizeForString = System.Text.Encoding.UTF8.GetByteCount(value);
|
|
return sizeForLength + sizeForString;
|
|
}
|
|
|
|
public override void Write(string value, BigEndianStream stream) {
|
|
var bytes = System.Text.Encoding.UTF8.GetBytes(value);
|
|
stream.WriteInt(bytes.Length);
|
|
stream.WriteBytes(bytes);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
class FfiConverterByteArray: FfiConverterRustBuffer<byte[]> {
|
|
public static FfiConverterByteArray INSTANCE = new FfiConverterByteArray();
|
|
|
|
public override byte[] Read(BigEndianStream stream) {
|
|
var length = stream.ReadInt();
|
|
return stream.ReadBytes(length);
|
|
}
|
|
|
|
public override int AllocationSize(byte[] value) {
|
|
return 4 + value.Length;
|
|
}
|
|
|
|
public override void Write(byte[] value, BigEndianStream stream) {
|
|
stream.WriteInt(value.Length);
|
|
stream.WriteBytes(value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IBitVec: IEquatable<BitVec> {
|
|
byte[] CopyRaw();
|
|
void Fill(bool @value);
|
|
bool Get(ulong @index);
|
|
ulong Len();
|
|
void Set(ulong @index, bool @value);
|
|
}
|
|
public class BitVec : IBitVec, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public BitVec(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~BitVec() {
|
|
Destroy();
|
|
}
|
|
public BitVec(ulong @size) :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_new(FfiConverterUInt64.INSTANCE.Lower(@size), ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitvec(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitvec(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
public byte[] CopyRaw() {
|
|
return CallWithPointer(thisPtr => FfiConverterByteArray.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_copy_raw(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Fill(bool @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_fill(thisPtr, FfiConverterBoolean.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public bool Get(ulong @index) {
|
|
return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_get(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@index), ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Len() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_len(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Set(ulong @index, bool @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@index), FfiConverterBoolean.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
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) {
|
|
return new BitVec(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_clone(FfiConverterTypeBitVec.INSTANCE.Lower(@other), ref _status)
|
|
));
|
|
}
|
|
|
|
public static BitVec Load(byte[] @data) {
|
|
return new BitVec(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_load(FfiConverterByteArray.INSTANCE.Lower(@data), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
class FfiConverterTypeBitVec: FfiConverter<BitVec, IntPtr> {
|
|
public static FfiConverterTypeBitVec INSTANCE = new FfiConverterTypeBitVec();
|
|
|
|
|
|
public override IntPtr Lower(BitVec value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override BitVec Lift(IntPtr value) {
|
|
return new BitVec(value);
|
|
}
|
|
|
|
public override BitVec Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(BitVec value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(BitVec value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IBitVecCommand: IEquatable<BitVecCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<BitVecCommand, IntPtr> {
|
|
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<Bitmap> {
|
|
byte[] CopyRaw();
|
|
void Fill(bool @value);
|
|
bool Get(ulong @x, ulong @y);
|
|
ulong Height();
|
|
void Set(ulong @x, ulong @y, bool @value);
|
|
ulong Width();
|
|
}
|
|
public class Bitmap : IBitmap, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public Bitmap(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~Bitmap() {
|
|
Destroy();
|
|
}
|
|
public Bitmap(ulong @width, ulong @height) :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_new(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitmap(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitmap(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
public byte[] CopyRaw() {
|
|
return CallWithPointer(thisPtr => FfiConverterByteArray.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_copy_raw(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Fill(bool @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_fill(thisPtr, FfiConverterBoolean.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public bool Get(ulong @x, ulong @y) {
|
|
return CallWithPointer(thisPtr => FfiConverterBoolean.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_get(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Height() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_height(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Set(ulong @x, ulong @y, bool @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterBoolean.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public ulong Width() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitmap_width(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
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) {
|
|
return new Bitmap(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_clone(FfiConverterTypeBitmap.INSTANCE.Lower(@other), ref _status)
|
|
));
|
|
}
|
|
|
|
public static Bitmap Load(ulong @width, ulong @height, byte[] @data) {
|
|
return new Bitmap(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_load(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), FfiConverterByteArray.INSTANCE.Lower(@data), ref _status)
|
|
));
|
|
}
|
|
|
|
public static Bitmap NewMaxSized() {
|
|
return new Bitmap(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_new_max_sized( ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
class FfiConverterTypeBitmap: FfiConverter<Bitmap, IntPtr> {
|
|
public static FfiConverterTypeBitmap INSTANCE = new FfiConverterTypeBitmap();
|
|
|
|
|
|
public override IntPtr Lower(Bitmap value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override Bitmap Lift(IntPtr value) {
|
|
return new Bitmap(value);
|
|
}
|
|
|
|
public override Bitmap Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(Bitmap value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(Bitmap value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IBitmapCommand: IEquatable<BitmapCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
Packet AsPacket();
|
|
Bitmap GetBitmap();
|
|
void SetBitmap(Bitmap @bitmap);
|
|
}
|
|
public class BitmapCommand : IBitmapCommand, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public BitmapCommand(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~BitmapCommand() {
|
|
Destroy();
|
|
}
|
|
public BitmapCommand(ulong @offsetX, ulong @offsetY, Bitmap @bitmap, CompressionCode @compression) :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _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_bitmapcommand(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitmapcommand(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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_bitmapcommand_as_generic(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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 FfiConverterTypeBitmapCommand: FfiConverter<BitmapCommand, IntPtr> {
|
|
public static FfiConverterTypeBitmapCommand INSTANCE = new FfiConverterTypeBitmapCommand();
|
|
|
|
|
|
public override IntPtr Lower(BitmapCommand value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override BitmapCommand Lift(IntPtr value) {
|
|
return new BitmapCommand(value);
|
|
}
|
|
|
|
public override BitmapCommand Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(BitmapCommand value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(BitmapCommand value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IBrightnessGrid: IEquatable<BrightnessGrid> {
|
|
byte[] CopyRaw();
|
|
void Fill(Brightness @value);
|
|
Brightness Get(ulong @x, ulong @y);
|
|
ulong Height();
|
|
void Set(ulong @x, ulong @y, Brightness @value);
|
|
ulong Width();
|
|
}
|
|
public class BrightnessGrid : IBrightnessGrid, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public BrightnessGrid(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~BrightnessGrid() {
|
|
Destroy();
|
|
}
|
|
public BrightnessGrid(ulong @width, ulong @height) :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgrid_new(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_brightnessgrid(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_brightnessgrid(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
public byte[] CopyRaw() {
|
|
return CallWithPointer(thisPtr => FfiConverterByteArray.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_copy_raw(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Fill(Brightness @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_fill(thisPtr, FfiConverterTypeBrightness.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public Brightness Get(ulong @x, ulong @y) {
|
|
return CallWithPointer(thisPtr => FfiConverterTypeBrightness.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_get(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Height() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_height(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Set(ulong @x, ulong @y, Brightness @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterTypeBrightness.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public ulong Width() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_width(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
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) {
|
|
return new BrightnessGrid(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgrid_clone(FfiConverterTypeBrightnessGrid.INSTANCE.Lower(@other), ref _status)
|
|
));
|
|
}
|
|
|
|
public static BrightnessGrid Load(ulong @width, ulong @height, byte[] @data) {
|
|
return new BrightnessGrid(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_brightnessgrid_load(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), FfiConverterByteArray.INSTANCE.Lower(@data), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
class FfiConverterTypeBrightnessGrid: FfiConverter<BrightnessGrid, IntPtr> {
|
|
public static FfiConverterTypeBrightnessGrid INSTANCE = new FfiConverterTypeBrightnessGrid();
|
|
|
|
|
|
public override IntPtr Lower(BrightnessGrid value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override BrightnessGrid Lift(IntPtr value) {
|
|
return new BrightnessGrid(value);
|
|
}
|
|
|
|
public override BrightnessGrid Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(BrightnessGrid value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(BrightnessGrid value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IBrightnessGridCommand: IEquatable<BrightnessGridCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<BrightnessGridCommand, IntPtr> {
|
|
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<CharGrid> {
|
|
string AsString();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
void Fill(string @value);
|
|
/// <exception cref="ServicePointException"></exception>
|
|
string Get(ulong @x, ulong @y);
|
|
/// <exception cref="ServicePointException"></exception>
|
|
string GetCol(ulong @x);
|
|
/// <exception cref="ServicePointException"></exception>
|
|
string GetRow(ulong @y);
|
|
ulong Height();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
void Set(ulong @x, ulong @y, string @value);
|
|
/// <exception cref="ServicePointException"></exception>
|
|
void SetCol(ulong @x, string @col);
|
|
/// <exception cref="ServicePointException"></exception>
|
|
void SetRow(ulong @y, string @row);
|
|
Cp437Grid ToCp437();
|
|
ulong Width();
|
|
}
|
|
public class CharGrid : ICharGrid, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public CharGrid(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~CharGrid() {
|
|
Destroy();
|
|
}
|
|
public CharGrid(ulong @width, ulong @height) :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_chargrid_new(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_chargrid(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_chargrid(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
public string AsString() {
|
|
return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_as_string(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public void Fill(string @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_fill(thisPtr, FfiConverterString.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public string Get(ulong @x, ulong @y) {
|
|
return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift(
|
|
_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)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public string GetCol(ulong @x) {
|
|
return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get_col(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public string GetRow(ulong @y) {
|
|
return CallWithPointer(thisPtr => FfiConverterString.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_get_row(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@y), ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Height() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_height(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public void Set(ulong @x, ulong @y, string @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_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)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public void SetCol(ulong @x, string @col) {
|
|
CallWithPointer(thisPtr =>
|
|
_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)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public void SetRow(ulong @y, string @row) {
|
|
CallWithPointer(thisPtr =>
|
|
_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)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public Cp437Grid ToCp437() {
|
|
return CallWithPointer(thisPtr => FfiConverterTypeCp437Grid.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_to_cp437(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Width() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_chargrid_width(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
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) {
|
|
return new CharGrid(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_chargrid_clone(FfiConverterTypeCharGrid.INSTANCE.Lower(@other), ref _status)
|
|
));
|
|
}
|
|
|
|
public static CharGrid Load(string @data) {
|
|
return new CharGrid(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_chargrid_load(FfiConverterString.INSTANCE.Lower(@data), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
class FfiConverterTypeCharGrid: FfiConverter<CharGrid, IntPtr> {
|
|
public static FfiConverterTypeCharGrid INSTANCE = new FfiConverterTypeCharGrid();
|
|
|
|
|
|
public override IntPtr Lower(CharGrid value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override CharGrid Lift(IntPtr value) {
|
|
return new CharGrid(value);
|
|
}
|
|
|
|
public override CharGrid Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(CharGrid value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(CharGrid value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface ICharGridCommand: IEquatable<CharGridCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<CharGridCommand, IntPtr> {
|
|
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<ClearCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
Packet AsPacket();
|
|
}
|
|
public class ClearCommand : IClearCommand, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public ClearCommand(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~ClearCommand() {
|
|
Destroy();
|
|
}
|
|
public ClearCommand() :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_clearcommand_new( ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_clearcommand(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_clearcommand(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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_clearcommand_as_generic(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<ClearCommand, IntPtr> {
|
|
public static FfiConverterTypeClearCommand INSTANCE = new FfiConverterTypeClearCommand();
|
|
|
|
|
|
public override IntPtr Lower(ClearCommand value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override ClearCommand Lift(IntPtr value) {
|
|
return new ClearCommand(value);
|
|
}
|
|
|
|
public override ClearCommand Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(ClearCommand value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(ClearCommand value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface ICommand {
|
|
/// <exception cref="ServicePointException"></exception>
|
|
Packet AsPacket();
|
|
}
|
|
public class Command : ICommand, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public Command(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~Command() {
|
|
Destroy();
|
|
}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_command(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_command(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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)
|
|
)));
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
class FfiConverterTypeCommand: FfiConverter<Command, IntPtr> {
|
|
public static FfiConverterTypeCommand INSTANCE = new FfiConverterTypeCommand();
|
|
|
|
|
|
public override IntPtr Lower(Command value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override Command Lift(IntPtr value) {
|
|
return new Command(value);
|
|
}
|
|
|
|
public override Command Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(Command value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(Command value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IConnection {
|
|
/// <exception cref="ServicePointException"></exception>
|
|
void SendCommand(Command @command);
|
|
/// <exception cref="ServicePointException"></exception>
|
|
void SendPacket(Packet @command);
|
|
}
|
|
public class Connection : IConnection, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public Connection(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~Connection() {
|
|
Destroy();
|
|
}
|
|
public Connection(string @host) :
|
|
this(
|
|
_UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_connection_new(FfiConverterString.INSTANCE.Lower(@host), ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_connection(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_connection(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
public void SendCommand(Command @command) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCallWithError(FfiConverterTypeServicePointError.INSTANCE, (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_connection_send_command(thisPtr, FfiConverterTypeCommand.INSTANCE.Lower(@command), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
class FfiConverterTypeConnection: FfiConverter<Connection, IntPtr> {
|
|
public static FfiConverterTypeConnection INSTANCE = new FfiConverterTypeConnection();
|
|
|
|
|
|
public override IntPtr Lower(Connection value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override Connection Lift(IntPtr value) {
|
|
return new Connection(value);
|
|
}
|
|
|
|
public override Connection Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(Connection value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(Connection value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface ICp437Grid: IEquatable<Cp437Grid> {
|
|
byte[] CopyRaw();
|
|
void Fill(byte @value);
|
|
byte Get(ulong @x, ulong @y);
|
|
ulong Height();
|
|
void Set(ulong @x, ulong @y, byte @value);
|
|
CharGrid ToUtf8();
|
|
ulong Width();
|
|
}
|
|
public class Cp437Grid : ICp437Grid, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public Cp437Grid(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~Cp437Grid() {
|
|
Destroy();
|
|
}
|
|
public Cp437Grid(ulong @width, ulong @height) :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_cp437grid_new(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_cp437grid(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_cp437grid(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> func)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
return func(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
|
|
public byte[] CopyRaw() {
|
|
return CallWithPointer(thisPtr => FfiConverterByteArray.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_copy_raw(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Fill(byte @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_fill(thisPtr, FfiConverterUInt8.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public byte Get(ulong @x, ulong @y) {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt8.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_get(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Height() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_height(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public void Set(ulong @x, ulong @y, byte @value) {
|
|
CallWithPointer(thisPtr =>
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterUInt8.INSTANCE.Lower(@value), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
|
|
public CharGrid ToUtf8() {
|
|
return CallWithPointer(thisPtr => FfiConverterTypeCharGrid.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_to_utf8(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
public ulong Width() {
|
|
return CallWithPointer(thisPtr => FfiConverterUInt64.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_width(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
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) {
|
|
return new Cp437Grid(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_cp437grid_clone(FfiConverterTypeCp437Grid.INSTANCE.Lower(@other), ref _status)
|
|
));
|
|
}
|
|
|
|
public static Cp437Grid Load(ulong @width, ulong @height, byte[] @data) {
|
|
return new Cp437Grid(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_cp437grid_load(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), FfiConverterByteArray.INSTANCE.Lower(@data), ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
class FfiConverterTypeCp437Grid: FfiConverter<Cp437Grid, IntPtr> {
|
|
public static FfiConverterTypeCp437Grid INSTANCE = new FfiConverterTypeCp437Grid();
|
|
|
|
|
|
public override IntPtr Lower(Cp437Grid value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override Cp437Grid Lift(IntPtr value) {
|
|
return new Cp437Grid(value);
|
|
}
|
|
|
|
public override Cp437Grid Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(Cp437Grid value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(Cp437Grid value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface ICp437GridCommand: IEquatable<Cp437GridCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<Cp437GridCommand, IntPtr> {
|
|
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<FadeOutCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
Packet AsPacket();
|
|
}
|
|
public class FadeOutCommand : IFadeOutCommand, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public FadeOutCommand(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~FadeOutCommand() {
|
|
Destroy();
|
|
}
|
|
public FadeOutCommand() :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_fadeoutcommand_new( ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_fadeoutcommand(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_fadeoutcommand(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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_fadeoutcommand_as_generic(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<FadeOutCommand, IntPtr> {
|
|
public static FfiConverterTypeFadeOutCommand INSTANCE = new FfiConverterTypeFadeOutCommand();
|
|
|
|
|
|
public override IntPtr Lower(FadeOutCommand value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override FadeOutCommand Lift(IntPtr value) {
|
|
return new FadeOutCommand(value);
|
|
}
|
|
|
|
public override FadeOutCommand Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(FadeOutCommand value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(FadeOutCommand value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IGlobalBrightnessCommand: IEquatable<GlobalBrightnessCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<GlobalBrightnessCommand, IntPtr> {
|
|
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<HardResetCommand> {
|
|
Command AsGeneric();
|
|
/// <exception cref="ServicePointException"></exception>
|
|
Packet AsPacket();
|
|
}
|
|
public class HardResetCommand : IHardResetCommand, IDisposable {
|
|
protected IntPtr pointer;
|
|
private int _wasDestroyed = 0;
|
|
private long _callCounter = 1;
|
|
|
|
public HardResetCommand(IntPtr pointer) {
|
|
this.pointer = pointer;
|
|
}
|
|
|
|
~HardResetCommand() {
|
|
Destroy();
|
|
}
|
|
public HardResetCommand() :
|
|
this(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_hardresetcommand_new( ref _status)
|
|
)) {}
|
|
|
|
protected void FreeRustArcPtr() {
|
|
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_hardresetcommand(this.pointer, ref status);
|
|
});
|
|
}
|
|
|
|
protected IntPtr CloneRustArcPtr() {
|
|
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
|
|
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_hardresetcommand(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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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_hardresetcommand_as_generic(thisPtr, ref _status)
|
|
)));
|
|
}
|
|
|
|
|
|
/// <exception cref="ServicePointException"></exception>
|
|
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<HardResetCommand, IntPtr> {
|
|
public static FfiConverterTypeHardResetCommand INSTANCE = new FfiConverterTypeHardResetCommand();
|
|
|
|
|
|
public override IntPtr Lower(HardResetCommand value) {
|
|
return value.CallWithPointer(thisPtr => thisPtr);
|
|
}
|
|
|
|
public override HardResetCommand Lift(IntPtr value) {
|
|
return new HardResetCommand(value);
|
|
}
|
|
|
|
public override HardResetCommand Read(BigEndianStream stream) {
|
|
return Lift(new IntPtr(stream.ReadLong()));
|
|
}
|
|
|
|
public override int AllocationSize(HardResetCommand value) {
|
|
return 8;
|
|
}
|
|
|
|
public override void Write(HardResetCommand value, BigEndianStream stream) {
|
|
stream.WriteLong(Lower(value).ToInt64());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IHeader: IEquatable<Header> {
|
|
}
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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<Header, IntPtr> {
|
|
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<Packet> {
|
|
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<IntPtr> action)
|
|
{
|
|
IncrementCallCounter();
|
|
try {
|
|
action(CloneRustArcPtr());
|
|
}
|
|
finally {
|
|
DecrementCallCounter();
|
|
}
|
|
}
|
|
|
|
internal T CallWithPointer<T>(Func<IntPtr, T> 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<Packet, IntPtr> {
|
|
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,
|
|
ulong @tileHeight,
|
|
ulong @pixelWidth,
|
|
ulong @pixelHeight,
|
|
ulong @pixelCount
|
|
) {
|
|
}
|
|
|
|
class FfiConverterTypeConstants: FfiConverterRustBuffer<Constants> {
|
|
public static FfiConverterTypeConstants INSTANCE = new FfiConverterTypeConstants();
|
|
|
|
public override Constants Read(BigEndianStream stream) {
|
|
return new Constants(
|
|
@tileSize: FfiConverterUInt64.INSTANCE.Read(stream),
|
|
@tileWidth: FfiConverterUInt64.INSTANCE.Read(stream),
|
|
@tileHeight: FfiConverterUInt64.INSTANCE.Read(stream),
|
|
@pixelWidth: FfiConverterUInt64.INSTANCE.Read(stream),
|
|
@pixelHeight: FfiConverterUInt64.INSTANCE.Read(stream),
|
|
@pixelCount: FfiConverterUInt64.INSTANCE.Read(stream)
|
|
);
|
|
}
|
|
|
|
public override int AllocationSize(Constants value) {
|
|
return 0
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(value.@tileSize)
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(value.@tileWidth)
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(value.@tileHeight)
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(value.@pixelWidth)
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(value.@pixelHeight)
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(value.@pixelCount);
|
|
}
|
|
|
|
public override void Write(Constants value, BigEndianStream stream) {
|
|
FfiConverterUInt64.INSTANCE.Write(value.@tileSize, stream);
|
|
FfiConverterUInt64.INSTANCE.Write(value.@tileWidth, stream);
|
|
FfiConverterUInt64.INSTANCE.Write(value.@tileHeight, stream);
|
|
FfiConverterUInt64.INSTANCE.Write(value.@pixelWidth, stream);
|
|
FfiConverterUInt64.INSTANCE.Write(value.@pixelHeight, stream);
|
|
FfiConverterUInt64.INSTANCE.Write(value.@pixelCount, stream);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum BinaryOperation: int {
|
|
|
|
Overwrite,
|
|
And,
|
|
Or,
|
|
Xor
|
|
}
|
|
|
|
class FfiConverterTypeBinaryOperation: FfiConverterRustBuffer<BinaryOperation> {
|
|
public static FfiConverterTypeBinaryOperation INSTANCE = new FfiConverterTypeBinaryOperation();
|
|
|
|
public override BinaryOperation Read(BigEndianStream stream) {
|
|
var value = stream.ReadInt() - 1;
|
|
if (Enum.IsDefined(typeof(BinaryOperation), value)) {
|
|
return (BinaryOperation)value;
|
|
} else {
|
|
throw new InternalException(String.Format("invalid enum value '{0}' in FfiConverterTypeBinaryOperation.Read()", value));
|
|
}
|
|
}
|
|
|
|
public override int AllocationSize(BinaryOperation value) {
|
|
return 4;
|
|
}
|
|
|
|
public override void Write(BinaryOperation value, BigEndianStream stream) {
|
|
stream.WriteInt((int)value + 1);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public enum CompressionCode: int {
|
|
|
|
/// <summary>
|
|
/// no compression
|
|
/// </summary>
|
|
Uncompressed,
|
|
/// <summary>
|
|
/// compress using flate2 with zlib header
|
|
/// </summary>
|
|
Zlib,
|
|
/// <summary>
|
|
/// compress using bzip2
|
|
/// </summary>
|
|
Bzip2,
|
|
/// <summary>
|
|
/// compress using lzma
|
|
/// </summary>
|
|
Lzma,
|
|
/// <summary>
|
|
/// compress using Zstandard
|
|
/// </summary>
|
|
Zstd
|
|
}
|
|
|
|
class FfiConverterTypeCompressionCode: FfiConverterRustBuffer<CompressionCode> {
|
|
public static FfiConverterTypeCompressionCode INSTANCE = new FfiConverterTypeCompressionCode();
|
|
|
|
public override CompressionCode Read(BigEndianStream stream) {
|
|
var value = stream.ReadInt() - 1;
|
|
if (Enum.IsDefined(typeof(CompressionCode), value)) {
|
|
return (CompressionCode)value;
|
|
} else {
|
|
throw new InternalException(String.Format("invalid enum value '{0}' in FfiConverterTypeCompressionCode.Read()", value));
|
|
}
|
|
}
|
|
|
|
public override int AllocationSize(CompressionCode value) {
|
|
return 4;
|
|
}
|
|
|
|
public override void Write(CompressionCode value, BigEndianStream stream) {
|
|
stream.WriteInt((int)value + 1);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class ServicePointException: UniffiException {
|
|
ServicePointException() : base() {}
|
|
ServicePointException(String @Message) : base(@Message) {}
|
|
|
|
// Each variant is a nested class
|
|
|
|
|
|
public class IoException : ServicePointException {
|
|
// Members
|
|
public string @error;
|
|
|
|
// Constructor
|
|
public IoException(
|
|
string @error) : base(
|
|
"@error" + "=" + @error) {
|
|
|
|
this.@error = @error;
|
|
}
|
|
}
|
|
|
|
|
|
public class InvalidBrightness : ServicePointException {
|
|
// Members
|
|
public byte @value;
|
|
|
|
// Constructor
|
|
public InvalidBrightness(
|
|
byte @value) : base(
|
|
"@value" + "=" + @value) {
|
|
|
|
this.@value = @value;
|
|
}
|
|
}
|
|
|
|
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() {}
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
class FfiConverterTypeServicePointError : FfiConverterRustBuffer<ServicePointException>, CallStatusErrorHandler<ServicePointException> {
|
|
public static FfiConverterTypeServicePointError INSTANCE = new FfiConverterTypeServicePointError();
|
|
|
|
public override ServicePointException Read(BigEndianStream stream) {
|
|
var value = stream.ReadInt();
|
|
switch (value) {
|
|
case 1:
|
|
return new ServicePointException.IoException(
|
|
FfiConverterString.INSTANCE.Read(stream));
|
|
case 2:
|
|
return new ServicePointException.InvalidBrightness(
|
|
FfiConverterUInt8.INSTANCE.Read(stream));
|
|
case 3:
|
|
return new ServicePointException.InvalidPacket();
|
|
case 4:
|
|
return new ServicePointException.StringNotOneChar(
|
|
FfiConverterString.INSTANCE.Read(stream));
|
|
case 5:
|
|
return new ServicePointException.InvalidSeriesLength(
|
|
FfiConverterUInt64.INSTANCE.Read(stream),
|
|
FfiConverterUInt64.INSTANCE.Read(stream));
|
|
case 6:
|
|
return new ServicePointException.OutOfBounds();
|
|
default:
|
|
throw new InternalException(String.Format("invalid error value '{0}' in FfiConverterTypeServicePointError.Read()", value));
|
|
}
|
|
}
|
|
|
|
public override int AllocationSize(ServicePointException value) {
|
|
switch (value) {
|
|
|
|
case ServicePointException.IoException variant_value:
|
|
return 4
|
|
+ FfiConverterString.INSTANCE.AllocationSize(variant_value.@error);
|
|
|
|
case ServicePointException.InvalidBrightness variant_value:
|
|
return 4
|
|
+ FfiConverterUInt8.INSTANCE.AllocationSize(variant_value.@value);
|
|
|
|
case ServicePointException.InvalidPacket variant_value:
|
|
return 4;
|
|
|
|
case ServicePointException.StringNotOneChar variant_value:
|
|
return 4
|
|
+ FfiConverterString.INSTANCE.AllocationSize(variant_value.@value);
|
|
|
|
case ServicePointException.InvalidSeriesLength variant_value:
|
|
return 4
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(variant_value.@actual)
|
|
+ FfiConverterUInt64.INSTANCE.AllocationSize(variant_value.@expected);
|
|
|
|
case ServicePointException.OutOfBounds variant_value:
|
|
return 4;
|
|
default:
|
|
throw new InternalException(String.Format("invalid error value '{0}' in FfiConverterTypeServicePointError.AllocationSize()", value));
|
|
}
|
|
}
|
|
|
|
public override void Write(ServicePointException value, BigEndianStream stream) {
|
|
switch (value) {
|
|
case ServicePointException.IoException variant_value:
|
|
stream.WriteInt(1);
|
|
FfiConverterString.INSTANCE.Write(variant_value.@error, stream);
|
|
break;
|
|
case ServicePointException.InvalidBrightness variant_value:
|
|
stream.WriteInt(2);
|
|
FfiConverterUInt8.INSTANCE.Write(variant_value.@value, stream);
|
|
break;
|
|
case ServicePointException.InvalidPacket variant_value:
|
|
stream.WriteInt(3);
|
|
break;
|
|
case ServicePointException.StringNotOneChar variant_value:
|
|
stream.WriteInt(4);
|
|
FfiConverterString.INSTANCE.Write(variant_value.@value, stream);
|
|
break;
|
|
case ServicePointException.InvalidSeriesLength variant_value:
|
|
stream.WriteInt(5);
|
|
FfiConverterUInt64.INSTANCE.Write(variant_value.@actual, stream);
|
|
FfiConverterUInt64.INSTANCE.Write(variant_value.@expected, stream);
|
|
break;
|
|
case ServicePointException.OutOfBounds variant_value:
|
|
stream.WriteInt(6);
|
|
break;
|
|
default:
|
|
throw new InternalException(String.Format("invalid error value '{0}' in FfiConverterTypeServicePointError.Write()", value));
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Typealias from the type name used in the UDL file to the builtin type. This
|
|
* is needed because the UDL type name is used in function/method signatures.
|
|
* It's also what we have an external type that references a custom type.
|
|
*/
|
|
|
|
|
|
#pragma warning restore 8625
|
|
public static class ServicepointBindingUniffiMethods {
|
|
public static Constants GetConstants() {
|
|
return FfiConverterTypeConstants.INSTANCE.Lift(
|
|
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
|
|
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_func_get_constants( ref _status)
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|