From 607a2a7ee7a5adffb3013f66cdc947e24c1245e9 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Sun, 22 Sep 2024 10:19:42 -0600 Subject: [PATCH] update the formatting --- library/src/main/java/libxmtp-version.txt | 2 +- library/src/main/java/xmtpv3.kt | 3702 +++++++++++---------- 2 files changed, 1886 insertions(+), 1818 deletions(-) diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index 6895738b7..561bf0f66 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: cd0fc5c +Version: cd0fc5cb Branch: main Date: 2024-09-20 15:05:17 +0000 diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index 396626164..707ea5294 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -17,22 +17,27 @@ package uniffi.xmtpv3 // compile the Rust component. The easiest way to ensure this is to bundle the Kotlin // helpers directly inline like we're doing here. -import com.sun.jna.Callback import com.sun.jna.Library +import com.sun.jna.IntegerType import com.sun.jna.Native import com.sun.jna.Pointer import com.sun.jna.Structure +import com.sun.jna.Callback import com.sun.jna.ptr.* -import kotlinx.coroutines.CancellableContinuation -import kotlinx.coroutines.suspendCancellableCoroutine import java.nio.ByteBuffer import java.nio.ByteOrder import java.nio.CharBuffer import java.nio.charset.CodingErrorAction +import java.util.concurrent.atomic.AtomicLong import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicBoolean -import java.util.concurrent.atomic.AtomicLong import kotlin.coroutines.resume +import kotlinx.coroutines.CancellableContinuation +import kotlinx.coroutines.DelicateCoroutinesApi +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.Job +import kotlinx.coroutines.launch +import kotlinx.coroutines.suspendCancellableCoroutine // 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 @@ -44,20 +49,13 @@ open class RustBuffer : Structure() { // When dealing with these fields, make sure to call `toULong()`. @JvmField var capacity: Long = 0 - @JvmField var len: Long = 0 - @JvmField var data: Pointer? = null - class ByValue : - RustBuffer(), - Structure.ByValue - - class ByReference : - RustBuffer(), - Structure.ByReference + class ByValue : RustBuffer(), Structure.ByValue + class ByReference : RustBuffer(), Structure.ByReference internal fun setValue(other: RustBuffer) { capacity = other.capacity @@ -66,21 +64,16 @@ open class RustBuffer : Structure() { } companion object { - internal fun alloc(size: ULong = 0UL) = - uniffiRustCall { status -> - // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_xmtpv3_rustbuffer_alloc(size.toLong(), status) - }.also { - if (it.data == null) { - throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=$size)") - } + internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> + // Note: need to convert the size to a `Long` value to make this work with JVM. + UniffiLib.INSTANCE.ffi_xmtpv3_rustbuffer_alloc(size.toLong(), status) + }.also { + if (it.data == null) { + throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") } + } - internal fun create( - capacity: ULong, - len: ULong, - data: Pointer?, - ): RustBuffer.ByValue { + internal fun create(capacity: ULong, len: ULong, data: Pointer?): RustBuffer.ByValue { var buf = RustBuffer.ByValue() buf.capacity = capacity.toLong() buf.len = len.toLong() @@ -88,10 +81,9 @@ open class RustBuffer : Structure() { return buf } - internal fun free(buf: RustBuffer.ByValue) = - uniffiRustCall { status -> - UniffiLib.INSTANCE.ffi_xmtpv3_rustbuffer_free(buf, status) - } + internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> + UniffiLib.INSTANCE.ffi_xmtpv3_rustbuffer_free(buf, status) + } } @Suppress("TooGenericExceptionThrown") @@ -143,13 +135,10 @@ class RustBufferByReference : ByReference(16) { open class ForeignBytes : Structure() { @JvmField var len: Int = 0 - @JvmField var data: Pointer? = null - class ByValue : - ForeignBytes(), - Structure.ByValue + class ByValue : ForeignBytes(), Structure.ByValue } // The FfiConverter interface handles converter types to and from the FFI @@ -177,10 +166,7 @@ public interface FfiConverter { fun allocationSize(value: KotlinType): ULong // Write a Kotlin type to a `ByteBuffer` - fun write( - value: KotlinType, - buf: ByteBuffer, - ) + fun write(value: KotlinType, buf: ByteBuffer) // Lower a value into a `RustBuffer` // @@ -191,10 +177,9 @@ public interface FfiConverter { fun lowerIntoRustBuffer(value: KotlinType): RustBuffer.ByValue { val rbuf = RustBuffer.alloc(allocationSize(value)) try { - val bbuf = - rbuf.data!!.getByteBuffer(0, rbuf.capacity).also { - it.order(ByteOrder.BIG_ENDIAN) - } + val bbuf = rbuf.data!!.getByteBuffer(0, rbuf.capacity).also { + it.order(ByteOrder.BIG_ENDIAN) + } write(value, bbuf) rbuf.writeField("len", bbuf.position().toLong()) return rbuf @@ -225,7 +210,6 @@ public interface FfiConverter { // FfiConverter that uses `RustBuffer` as the FfiType public interface FfiConverterRustBuffer : FfiConverter { override fun lift(value: RustBuffer.ByValue) = liftFromRustBuffer(value) - override fun lower(value: KotlinType) = lowerIntoRustBuffer(value) } // A handful of classes and functions to support the generated data structures. @@ -239,25 +223,25 @@ internal const val UNIFFI_CALL_UNEXPECTED_ERROR = 2.toByte() internal open class UniffiRustCallStatus : Structure() { @JvmField var code: Byte = 0 - @JvmField var error_buf: RustBuffer.ByValue = RustBuffer.ByValue() - class ByValue : - UniffiRustCallStatus(), - Structure.ByValue + class ByValue : UniffiRustCallStatus(), Structure.ByValue - fun isSuccess(): Boolean = code == UNIFFI_CALL_SUCCESS + fun isSuccess(): Boolean { + return code == UNIFFI_CALL_SUCCESS + } - fun isError(): Boolean = code == UNIFFI_CALL_ERROR + fun isError(): Boolean { + return code == UNIFFI_CALL_ERROR + } - fun isPanic(): Boolean = code == UNIFFI_CALL_UNEXPECTED_ERROR + fun isPanic(): Boolean { + return code == UNIFFI_CALL_UNEXPECTED_ERROR + } companion object { - fun create( - code: Byte, - errorBuf: RustBuffer.ByValue, - ): UniffiRustCallStatus.ByValue { + fun create(code: Byte, errorBuf: RustBuffer.ByValue): UniffiRustCallStatus.ByValue { val callStatus = UniffiRustCallStatus.ByValue() callStatus.code = code callStatus.error_buf = errorBuf @@ -266,13 +250,11 @@ internal open class UniffiRustCallStatus : Structure() { } } -class InternalException( - message: String, -) : kotlin.Exception(message) +class InternalException(message: String) : kotlin.Exception(message) // Each top-level error class has a companion object that can lift the error from the call status's rust buffer interface UniffiRustCallStatusErrorHandler { - fun lift(error_buf: RustBuffer.ByValue): E + fun lift(error_buf: RustBuffer.ByValue): E; } // Helpers for calling Rust @@ -322,8 +304,9 @@ object UniffiNullRustCallStatusErrorHandler : UniffiRustCallStatusErrorHandler uniffiRustCall(callback: (UniffiRustCallStatus) -> U): U = - uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback) +private inline fun uniffiRustCall(callback: (UniffiRustCallStatus) -> U): U { + return uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback) +} internal inline fun uniffiTraitInterfaceCall( callStatus: UniffiRustCallStatus, @@ -362,9 +345,7 @@ internal inline fun uniffiTraitInterfaceCallWithError // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = - java.util.concurrent.atomic - .AtomicLong(0) + private val counter = java.util.concurrent.atomic.AtomicLong(0) val size: Int get() = map.size @@ -377,12 +358,14 @@ internal class UniffiHandleMap { } // Get an object from the handle map - fun get(handle: Long): T = - map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") + fun get(handle: Long): T { + return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") + } // Remove an entry from the handlemap and get the Kotlin object back - fun remove(handle: Long): T = - map.remove(handle) ?: throw InternalException("UniffiHandleMap: Invalid handle") + fun remove(handle: Long): T { + return map.remove(handle) ?: throw InternalException("UniffiHandleMap: Invalid handle") + } } // Contains loading, initialization code, @@ -393,18 +376,18 @@ private fun findLibraryName(componentName: String): String { if (libOverride != null) { return libOverride } - return "xmtpv3" + return "uniffi_xmtpv3" } -private inline fun loadIndirect(componentName: String): Lib = - Native.load(findLibraryName(componentName), Lib::class.java) +private inline fun loadIndirect( + componentName: String, +): Lib { + return Native.load(findLibraryName(componentName), Lib::class.java) +} // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { - fun callback( - `data`: Long, - `pollResult`: Byte, - ) + fun callback(`data`: Long, `pollResult`: Byte) } internal interface UniffiForeignFutureFree : com.sun.jna.Callback { @@ -423,13 +406,13 @@ internal open class UniffiForeignFuture( class UniffiByValue( `handle`: Long = 0.toLong(), `free`: UniffiForeignFutureFree? = null, - ) : UniffiForeignFuture(`handle`, `free`), - Structure.ByValue + ) : UniffiForeignFuture(`handle`, `free`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFuture) { `handle` = other.`handle` `free` = other.`free` } + } @Structure.FieldOrder("returnValue", "callStatus") @@ -440,20 +423,17 @@ internal open class UniffiForeignFutureStructU8( class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU8(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructU8(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructU8.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU8.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -464,20 +444,17 @@ internal open class UniffiForeignFutureStructI8( class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI8(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructI8(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructI8.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI8.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -488,20 +465,17 @@ internal open class UniffiForeignFutureStructU16( class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU16(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructU16(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructU16.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU16.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -512,20 +486,17 @@ internal open class UniffiForeignFutureStructI16( class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI16(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructI16(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructI16.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI16.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -536,20 +507,17 @@ internal open class UniffiForeignFutureStructU32( class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU32(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructU32(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructU32.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU32.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -560,20 +528,17 @@ internal open class UniffiForeignFutureStructI32( class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI32(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructI32(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructI32.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI32.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -584,20 +549,17 @@ internal open class UniffiForeignFutureStructU64( class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU64(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructU64(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructU64.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU64.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -608,20 +570,17 @@ internal open class UniffiForeignFutureStructI64( class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI64(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructI64(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructI64.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI64.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -632,20 +591,17 @@ internal open class UniffiForeignFutureStructF32( class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructF32(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructF32(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructF32.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructF32.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -656,20 +612,17 @@ internal open class UniffiForeignFutureStructF64( class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructF64(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructF64(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructF64.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructF64.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -680,20 +633,17 @@ internal open class UniffiForeignFutureStructPointer( class UniffiByValue( `returnValue`: Pointer = Pointer.NULL, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructPointer(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructPointer(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructPointer.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructPointer.UniffiByValue) } @Structure.FieldOrder("returnValue", "callStatus") @@ -704,13 +654,13 @@ internal open class UniffiForeignFutureStructRustBuffer( class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructRustBuffer(`returnValue`, `callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructRustBuffer(`returnValue`, `callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { @@ -726,19 +676,16 @@ internal open class UniffiForeignFutureStructVoid( ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructVoid(`callStatus`), - Structure.ByValue + ) : UniffiForeignFutureStructVoid(`callStatus`), Structure.ByValue internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { `callStatus` = other.`callStatus` } + } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructVoid.UniffiByValue, - ) + fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructVoid.UniffiByValue) } internal interface UniffiCallbackInterfaceFfiInboxOwnerMethod0 : com.sun.jna.Callback { @@ -814,6 +761,7 @@ internal open class UniffiVTableCallbackInterfaceFfiInboxOwner( `sign` = other.`sign` `uniffiFree` = other.`uniffiFree` } + } @Structure.FieldOrder("log", "uniffiFree") @@ -824,13 +772,13 @@ internal open class UniffiVTableCallbackInterfaceFfiLogger( class UniffiByValue( `log`: UniffiCallbackInterfaceFfiLoggerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiLogger(`log`, `uniffiFree`), - Structure.ByValue + ) : UniffiVTableCallbackInterfaceFfiLogger(`log`, `uniffiFree`), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiLogger) { `log` = other.`log` `uniffiFree` = other.`uniffiFree` } + } @Structure.FieldOrder("onConversation", "uniffiFree") @@ -848,6 +796,7 @@ internal open class UniffiVTableCallbackInterfaceFfiConversationCallback( `onConversation` = other.`onConversation` `uniffiFree` = other.`uniffiFree` } + } @Structure.FieldOrder("onMessage", "uniffiFree") @@ -865,6 +814,7 @@ internal open class UniffiVTableCallbackInterfaceFfiMessageCallback( `onMessage` = other.`onMessage` `uniffiFree` = other.`uniffiFree` } + } @Structure.FieldOrder("onMessage", "uniffiFree") @@ -882,8 +832,10 @@ internal open class UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback( `onMessage` = other.`onMessage` `uniffiFree` = other.`uniffiFree` } + } + // A JNA Library to expose the extern-C FFI definitions. // This is an implementation detail which will be called internally by the public API. @@ -909,229 +861,191 @@ internal interface UniffiLib : Library { } fun uniffi_xmtpv3_fn_clone_fficonversations( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_fficonversations( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_fficonversations_create_group( - `ptr`: Pointer, - `accountAddresses`: RustBuffer.ByValue, - `opts`: RustBuffer.ByValue, + `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, `opts`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_fficonversations_list( - `ptr`: Pointer, - `opts`: RustBuffer.ByValue, + `ptr`: Pointer, `opts`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_fficonversations_process_streamed_welcome_message( - `ptr`: Pointer, - `envelopeBytes`: RustBuffer.ByValue, + `ptr`: Pointer, `envelopeBytes`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_fficonversations_stream( - `ptr`: Pointer, - `callback`: Long, + `ptr`: Pointer, `callback`: Long, ): Long fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_messages( - `ptr`: Pointer, - `messageCallback`: Long, + `ptr`: Pointer, `messageCallback`: Long, ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_sync(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_fficonversations_sync( + `ptr`: Pointer, + ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_sync_all_groups(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_fficonversations_sync_all_groups( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_clone_ffigroup( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffigroup( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffigroup_add_admin( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_add_members( - `ptr`: Pointer, - `accountAddresses`: RustBuffer.ByValue, + `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_add_members_by_inbox_id( - `ptr`: Pointer, - `inboxIds`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxIds`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_add_super_admin( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_added_by_inbox_id( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_admin_list( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_consent_state( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_created_at_ns( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_find_messages( - `ptr`: Pointer, - `opts`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `opts`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_group_description( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_group_image_url_square( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_group_metadata( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_method_ffigroup_group_name( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_group_permissions( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_method_ffigroup_group_pinned_frame_url( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_id( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_is_active( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Byte fun uniffi_xmtpv3_fn_method_ffigroup_is_admin( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): Byte fun uniffi_xmtpv3_fn_method_ffigroup_is_super_admin( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): Byte - fun uniffi_xmtpv3_fn_method_ffigroup_list_members(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffigroup_list_members( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffigroup_process_streamed_group_message( - `ptr`: Pointer, - `envelopeBytes`: RustBuffer.ByValue, + `ptr`: Pointer, `envelopeBytes`: RustBuffer.ByValue, ): Long - fun uniffi_xmtpv3_fn_method_ffigroup_publish_messages(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffigroup_publish_messages( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffigroup_remove_admin( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_remove_members( - `ptr`: Pointer, - `accountAddresses`: RustBuffer.ByValue, + `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_remove_members_by_inbox_id( - `ptr`: Pointer, - `inboxIds`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxIds`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_remove_super_admin( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_send( - `ptr`: Pointer, - `contentBytes`: RustBuffer.ByValue, + `ptr`: Pointer, `contentBytes`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_send_optimistic( - `ptr`: Pointer, - `contentBytes`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `contentBytes`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroup_stream( - `ptr`: Pointer, - `messageCallback`: Long, + `ptr`: Pointer, `messageCallback`: Long, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_super_admin_list( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffigroup_sync(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffigroup_sync( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffigroup_update_consent_state( - `ptr`: Pointer, - `state`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `state`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffigroup_update_group_description( - `ptr`: Pointer, - `groupDescription`: RustBuffer.ByValue, + `ptr`: Pointer, `groupDescription`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_update_group_image_url_square( - `ptr`: Pointer, - `groupImageUrlSquare`: RustBuffer.ByValue, + `ptr`: Pointer, `groupImageUrlSquare`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_update_group_name( - `ptr`: Pointer, - `groupName`: RustBuffer.ByValue, + `ptr`: Pointer, `groupName`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_update_group_pinned_frame_url( - `ptr`: Pointer, - `pinnedFrameUrl`: RustBuffer.ByValue, + `ptr`: Pointer, `pinnedFrameUrl`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffigroup_update_permission_policy( @@ -1142,58 +1056,47 @@ internal interface UniffiLib : Library { ): Long fun uniffi_xmtpv3_fn_clone_ffigroupmetadata( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffigroupmetadata( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffigroupmetadata_conversation_type( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigroupmetadata_creator_inbox_id( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_clone_ffigrouppermissions( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffigrouppermissions( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_set( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_type( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_clone_ffisignaturerequest( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffisignaturerequest( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffisignaturerequest_add_ecdsa_signature( - `ptr`: Pointer, - `signatureBytes`: RustBuffer.ByValue, + `ptr`: Pointer, `signatureBytes`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature( @@ -1204,102 +1107,92 @@ internal interface UniffiLib : Library { `blockNumber`: Long, ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready( + `ptr`: Pointer, + ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures( + `ptr`: Pointer, + ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_clone_ffistreamcloser( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffistreamcloser( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffistreamcloser_end( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit - fun uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffistreamcloser_is_closed( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Byte fun uniffi_xmtpv3_fn_clone_ffiv2apiclient( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffiv2apiclient( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffiv2apiclient_batch_query( - `ptr`: Pointer, - `req`: RustBuffer.ByValue, + `ptr`: Pointer, `req`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffiv2apiclient_publish( - `ptr`: Pointer, - `request`: RustBuffer.ByValue, - `authToken`: RustBuffer.ByValue, + `ptr`: Pointer, `request`: RustBuffer.ByValue, `authToken`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffiv2apiclient_query( - `ptr`: Pointer, - `request`: RustBuffer.ByValue, + `ptr`: Pointer, `request`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffiv2apiclient_set_app_version( - `ptr`: Pointer, - `version`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `version`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffiv2apiclient_subscribe( - `ptr`: Pointer, - `request`: RustBuffer.ByValue, - `callback`: Long, + `ptr`: Pointer, `request`: RustBuffer.ByValue, `callback`: Long, ): Long fun uniffi_xmtpv3_fn_clone_ffiv2subscription( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffiv2subscription( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit - fun uniffi_xmtpv3_fn_method_ffiv2subscription_end(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffiv2subscription_end( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffiv2subscription_is_closed( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Byte fun uniffi_xmtpv3_fn_method_ffiv2subscription_update( - `ptr`: Pointer, - `req`: RustBuffer.ByValue, + `ptr`: Pointer, `req`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_clone_ffixmtpclient( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_free_ffixmtpclient( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit fun uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet( @@ -1309,101 +1202,96 @@ internal interface UniffiLib : Library { ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_apply_signature_request( - `ptr`: Pointer, - `signatureRequest`: Pointer, + `ptr`: Pointer, `signatureRequest`: Pointer, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_can_message( - `ptr`: Pointer, - `accountAddresses`: RustBuffer.ByValue, + `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_conversations( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Pointer - fun uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_find_inbox_id( - `ptr`: Pointer, - `address`: RustBuffer.ByValue, + `ptr`: Pointer, `address`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_get_consent_state( - `ptr`: Pointer, - `entityType`: RustBuffer.ByValue, - `entity`: RustBuffer.ByValue, + `ptr`: Pointer, `entityType`: RustBuffer.ByValue, `entity`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_get_latest_inbox_state( - `ptr`: Pointer, - `inboxId`: RustBuffer.ByValue, + `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_group( - `ptr`: Pointer, - `groupId`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `groupId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_id( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_state( - `ptr`: Pointer, - `refreshFromNetwork`: Byte, + `ptr`: Pointer, `refreshFromNetwork`: Byte, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_installation_id( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffixmtpclient_message( - `ptr`: Pointer, - `messageId`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, `messageId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_method_ffixmtpclient_register_identity( - `ptr`: Pointer, - `signatureRequest`: Pointer, + `ptr`: Pointer, `signatureRequest`: Pointer, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_release_db_connection( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): Unit - fun uniffi_xmtpv3_fn_method_ffixmtpclient_request_history_sync(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_request_history_sync( + `ptr`: Pointer, + ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations(`ptr`: Pointer): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations( + `ptr`: Pointer, + ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_wallet( - `ptr`: Pointer, - `walletAddress`: RustBuffer.ByValue, + `ptr`: Pointer, `walletAddress`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_set_consent_states( - `ptr`: Pointer, - `records`: RustBuffer.ByValue, + `ptr`: Pointer, `records`: RustBuffer.ByValue, ): Long fun uniffi_xmtpv3_fn_method_ffixmtpclient_signature_request( - `ptr`: Pointer, - uniffi_out_err: UniffiRustCallStatus, + `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_init_callback_vtable_ffiinboxowner(`vtable`: UniffiVTableCallbackInterfaceFfiInboxOwner): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffiinboxowner( + `vtable`: UniffiVTableCallbackInterfaceFfiInboxOwner, + ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_ffilogger(`vtable`: UniffiVTableCallbackInterfaceFfiLogger): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffilogger( + `vtable`: UniffiVTableCallbackInterfaceFfiLogger, + ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_fficonversationcallback(`vtable`: UniffiVTableCallbackInterfaceFfiConversationCallback): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_fficonversationcallback( + `vtable`: UniffiVTableCallbackInterfaceFfiConversationCallback, + ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_ffimessagecallback(`vtable`: UniffiVTableCallbackInterfaceFfiMessageCallback): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffimessagecallback( + `vtable`: UniffiVTableCallbackInterfaceFfiMessageCallback, + ): Unit fun uniffi_xmtpv3_fn_init_callback_vtable_ffiv2subscriptioncallback( `vtable`: UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback, @@ -1423,8 +1311,7 @@ internal interface UniffiLib : Library { ): Long fun uniffi_xmtpv3_fn_func_create_v2_client( - `host`: RustBuffer.ByValue, - `isSecure`: Byte, + `host`: RustBuffer.ByValue, `isSecure`: Byte, ): Long fun uniffi_xmtpv3_fn_func_diffie_hellman_k256( @@ -1434,14 +1321,11 @@ internal interface UniffiLib : Library { ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_generate_inbox_id( - `accountAddress`: RustBuffer.ByValue, - `nonce`: Long, - uniffi_out_err: UniffiRustCallStatus, + `accountAddress`: RustBuffer.ByValue, `nonce`: Long, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_generate_private_preferences_topic_identifier( - `privateKey`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `privateKey`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_get_inbox_id_for_address( @@ -1451,16 +1335,16 @@ internal interface UniffiLib : Library { `accountAddress`: RustBuffer.ByValue, ): Long - fun uniffi_xmtpv3_fn_func_get_version_info(uniffi_out_err: UniffiRustCallStatus): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_get_version_info( + uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_keccak256( - `input`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `input`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_public_key_from_private_key_k256( - `privateKeyBytes`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `privateKeyBytes`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_recover_address( @@ -1482,8 +1366,7 @@ internal interface UniffiLib : Library { ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_sha256( - `input`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `input`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun uniffi_xmtpv3_fn_func_user_preferences_decrypt( @@ -1509,434 +1392,550 @@ internal interface UniffiLib : Library { ): Byte fun ffi_xmtpv3_rustbuffer_alloc( - `size`: Long, - uniffi_out_err: UniffiRustCallStatus, + `size`: Long, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun ffi_xmtpv3_rustbuffer_from_bytes( - `bytes`: ForeignBytes.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `bytes`: ForeignBytes.ByValue, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun ffi_xmtpv3_rustbuffer_free( - `buf`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, + `buf`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, ): Unit fun ffi_xmtpv3_rustbuffer_reserve( - `buf`: RustBuffer.ByValue, - `additional`: Long, - uniffi_out_err: UniffiRustCallStatus, + `buf`: RustBuffer.ByValue, `additional`: Long, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun ffi_xmtpv3_rust_future_poll_u8( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_u8(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_u8( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_u8(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_u8( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_u8( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Byte fun ffi_xmtpv3_rust_future_poll_i8( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_i8(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_i8( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_i8(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_i8( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_i8( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Byte fun ffi_xmtpv3_rust_future_poll_u16( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_u16(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_u16( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_u16(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_u16( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_u16( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Short fun ffi_xmtpv3_rust_future_poll_i16( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_i16(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_i16( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_i16(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_i16( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_i16( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Short fun ffi_xmtpv3_rust_future_poll_u32( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_u32(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_u32( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_u32(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_u32( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_u32( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Int fun ffi_xmtpv3_rust_future_poll_i32( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_i32(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_i32( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_i32(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_i32( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_i32( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Int fun ffi_xmtpv3_rust_future_poll_u64( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_u64(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_u64( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_u64(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_u64( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_u64( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Long fun ffi_xmtpv3_rust_future_poll_i64( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_i64(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_i64( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_i64(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_i64( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_i64( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Long fun ffi_xmtpv3_rust_future_poll_f32( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_f32(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_f32( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_f32(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_f32( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_f32( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Float fun ffi_xmtpv3_rust_future_poll_f64( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_f64(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_f64( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_f64(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_f64( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_f64( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Double fun ffi_xmtpv3_rust_future_poll_pointer( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_pointer(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_pointer( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_pointer(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_pointer( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_pointer( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Pointer fun ffi_xmtpv3_rust_future_poll_rust_buffer( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_rust_buffer(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_rust_buffer( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_rust_buffer(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_rust_buffer( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_rust_buffer( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue fun ffi_xmtpv3_rust_future_poll_void( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, + `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, ): Unit - fun ffi_xmtpv3_rust_future_cancel_void(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_cancel_void( + `handle`: Long, + ): Unit - fun ffi_xmtpv3_rust_future_free_void(`handle`: Long): Unit + fun ffi_xmtpv3_rust_future_free_void( + `handle`: Long, + ): Unit fun ffi_xmtpv3_rust_future_complete_void( - `handle`: Long, - uniffi_out_err: UniffiRustCallStatus, + `handle`: Long, uniffi_out_err: UniffiRustCallStatus, ): Unit - fun uniffi_xmtpv3_checksum_func_create_client(): Short + fun uniffi_xmtpv3_checksum_func_create_client( + ): Short + + fun uniffi_xmtpv3_checksum_func_create_v2_client( + ): Short - fun uniffi_xmtpv3_checksum_func_create_v2_client(): Short + fun uniffi_xmtpv3_checksum_func_diffie_hellman_k256( + ): Short - fun uniffi_xmtpv3_checksum_func_diffie_hellman_k256(): Short + fun uniffi_xmtpv3_checksum_func_generate_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_func_generate_inbox_id(): Short + fun uniffi_xmtpv3_checksum_func_generate_private_preferences_topic_identifier( + ): Short - fun uniffi_xmtpv3_checksum_func_generate_private_preferences_topic_identifier(): Short + fun uniffi_xmtpv3_checksum_func_get_inbox_id_for_address( + ): Short - fun uniffi_xmtpv3_checksum_func_get_inbox_id_for_address(): Short + fun uniffi_xmtpv3_checksum_func_get_version_info( + ): Short - fun uniffi_xmtpv3_checksum_func_get_version_info(): Short + fun uniffi_xmtpv3_checksum_func_keccak256( + ): Short - fun uniffi_xmtpv3_checksum_func_keccak256(): Short + fun uniffi_xmtpv3_checksum_func_public_key_from_private_key_k256( + ): Short - fun uniffi_xmtpv3_checksum_func_public_key_from_private_key_k256(): Short + fun uniffi_xmtpv3_checksum_func_recover_address( + ): Short - fun uniffi_xmtpv3_checksum_func_recover_address(): Short + fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_keccak256( + ): Short - fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_keccak256(): Short + fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_sha256( + ): Short - fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_sha256(): Short + fun uniffi_xmtpv3_checksum_func_sha256( + ): Short - fun uniffi_xmtpv3_checksum_func_sha256(): Short + fun uniffi_xmtpv3_checksum_func_user_preferences_decrypt( + ): Short - fun uniffi_xmtpv3_checksum_func_user_preferences_decrypt(): Short + fun uniffi_xmtpv3_checksum_func_user_preferences_encrypt( + ): Short - fun uniffi_xmtpv3_checksum_func_user_preferences_encrypt(): Short + fun uniffi_xmtpv3_checksum_func_verify_k256_sha256( + ): Short - fun uniffi_xmtpv3_checksum_func_verify_k256_sha256(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_create_group( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_create_group(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_list( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_list(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_process_streamed_welcome_message( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_process_streamed_welcome_message(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_messages( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_messages(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_sync( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_sync(): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_sync_all_groups( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_sync_all_groups(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_add_admin( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_add_admin(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_add_members( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_add_members(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_add_members_by_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_add_members_by_inbox_id(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_add_super_admin( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_add_super_admin(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_added_by_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_added_by_inbox_id(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_admin_list( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_admin_list(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_consent_state( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_consent_state(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_created_at_ns( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_created_at_ns(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_find_messages( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_find_messages(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_group_description( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_group_description(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_group_image_url_square( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_group_image_url_square(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_group_metadata( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_group_metadata(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_group_name( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_group_name(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_group_permissions( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_group_permissions(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_group_pinned_frame_url( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_group_pinned_frame_url(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_id(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_is_active( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_is_active(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_is_admin( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_is_admin(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_is_super_admin( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_is_super_admin(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_list_members( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_list_members(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_process_streamed_group_message( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_process_streamed_group_message(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_publish_messages( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_publish_messages(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_remove_admin( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_remove_admin(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_remove_members( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_remove_members(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_remove_members_by_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_remove_members_by_inbox_id(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_remove_super_admin( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_remove_super_admin(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_send( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_send(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_send_optimistic( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_send_optimistic(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_stream( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_stream(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_super_admin_list( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_super_admin_list(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_sync( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_sync(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_update_consent_state( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_update_consent_state(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_description( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_description(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_image_url_square( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_image_url_square(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_name( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_name(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_pinned_frame_url( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_update_group_pinned_frame_url(): Short + fun uniffi_xmtpv3_checksum_method_ffigroup_update_permission_policy( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroup_update_permission_policy(): Short + fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_conversation_type( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_conversation_type(): Short + fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_creator_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_creator_inbox_id(): Short + fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_set( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_set(): Short + fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_type( + ): Short - fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_type(): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_ecdsa_signature( + ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_ecdsa_signature(): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_scw_signature( + ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_scw_signature(): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_is_ready( + ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_is_ready(): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_missing_address_signatures( + ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_missing_address_signatures(): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_signature_text( + ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_signature_text(): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end( + ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end(): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end_and_wait( + ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end_and_wait(): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_is_closed( + ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_is_closed(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_batch_query( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_batch_query(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_publish( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_publish(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_query( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_query(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_set_app_version( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_set_app_version(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_subscribe( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_subscribe(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2subscription_end( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscription_end(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2subscription_is_closed( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscription_is_closed(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2subscription_update( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscription_update(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_add_wallet( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_add_wallet(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_apply_signature_request( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_apply_signature_request(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_can_message( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_can_message(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_conversations( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_conversations(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_db_reconnect( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_db_reconnect(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_find_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_find_inbox_id(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_get_consent_state( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_get_consent_state(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_get_latest_inbox_state( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_get_latest_inbox_state(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_group( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_group(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_inbox_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_inbox_id(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_inbox_state( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_inbox_state(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_installation_id( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_installation_id(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_message( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_message(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_register_identity( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_register_identity(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_release_db_connection( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_release_db_connection(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_request_history_sync( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_request_history_sync(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_all_other_installations( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_all_other_installations(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_wallet( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_wallet(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_set_consent_states( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_set_consent_states(): Short + fun uniffi_xmtpv3_checksum_method_ffixmtpclient_signature_request( + ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_signature_request(): Short + fun uniffi_xmtpv3_checksum_method_ffiinboxowner_get_address( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiinboxowner_get_address(): Short + fun uniffi_xmtpv3_checksum_method_ffiinboxowner_sign( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiinboxowner_sign(): Short + fun uniffi_xmtpv3_checksum_method_ffilogger_log( + ): Short - fun uniffi_xmtpv3_checksum_method_ffilogger_log(): Short + fun uniffi_xmtpv3_checksum_method_fficonversationcallback_on_conversation( + ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationcallback_on_conversation(): Short + fun uniffi_xmtpv3_checksum_method_ffimessagecallback_on_message( + ): Short - fun uniffi_xmtpv3_checksum_method_ffimessagecallback_on_message(): Short + fun uniffi_xmtpv3_checksum_method_ffiv2subscriptioncallback_on_message( + ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscriptioncallback_on_message(): Short + fun ffi_xmtpv3_uniffi_contract_version( + ): Int - fun ffi_xmtpv3_uniffi_contract_version(): Int } private fun uniffiCheckContractApiVersion(lib: UniffiLib) { @@ -2281,10 +2280,7 @@ internal val uniffiContinuationHandleMap = UniffiHandleMap uniffiRustCallAsync( ): T { try { do { - val pollResult = - suspendCancellableCoroutine { continuation -> - pollFunc( - rustFuture, - uniffiRustFutureContinuationCallbackImpl, - uniffiContinuationHandleMap.insert(continuation), - ) - } - } while (pollResult != UNIFFI_RUST_FUTURE_POLL_READY) + val pollResult = suspendCancellableCoroutine { continuation -> + pollFunc( + rustFuture, + uniffiRustFutureContinuationCallbackImpl, + uniffiContinuationHandleMap.insert(continuation) + ) + } + } while (pollResult != UNIFFI_RUST_FUTURE_POLL_READY); return liftFunc( - uniffiRustCallWithError(errorHandler, { status -> completeFunc(rustFuture, status) }), + uniffiRustCallWithError(errorHandler, { status -> completeFunc(rustFuture, status) }) ) } finally { freeFunc(rustFuture) @@ -2319,6 +2314,7 @@ internal suspend fun uniffiRustCallAsync( // Public interface members begin here. + // Interface implemented by anything that can contain an object reference. // // Such types expose a `destroy()` method that must be called to cleanly @@ -2332,8 +2328,7 @@ interface Disposable { companion object { fun destroy(vararg args: Any?) { - args - .filterIsInstance() + args.filterIsInstance() .forEach(Disposable::destroy) } } @@ -2355,86 +2350,101 @@ inline fun T.use(block: (T) -> R) = object NoPointer public object FfiConverterUByte : FfiConverter { - override fun lift(value: Byte): UByte = value.toUByte() + override fun lift(value: Byte): UByte { + return value.toUByte() + } - override fun read(buf: ByteBuffer): UByte = lift(buf.get()) + override fun read(buf: ByteBuffer): UByte { + return lift(buf.get()) + } - override fun lower(value: UByte): Byte = value.toByte() + override fun lower(value: UByte): Byte { + return value.toByte() + } override fun allocationSize(value: UByte) = 1UL - override fun write( - value: UByte, - buf: ByteBuffer, - ) { + override fun write(value: UByte, buf: ByteBuffer) { buf.put(value.toByte()) } } public object FfiConverterUInt : FfiConverter { - override fun lift(value: Int): UInt = value.toUInt() + override fun lift(value: Int): UInt { + return value.toUInt() + } - override fun read(buf: ByteBuffer): UInt = lift(buf.getInt()) + override fun read(buf: ByteBuffer): UInt { + return lift(buf.getInt()) + } - override fun lower(value: UInt): Int = value.toInt() + override fun lower(value: UInt): Int { + return value.toInt() + } override fun allocationSize(value: UInt) = 4UL - override fun write( - value: UInt, - buf: ByteBuffer, - ) { + override fun write(value: UInt, buf: ByteBuffer) { buf.putInt(value.toInt()) } } public object FfiConverterULong : FfiConverter { - override fun lift(value: Long): ULong = value.toULong() + override fun lift(value: Long): ULong { + return value.toULong() + } - override fun read(buf: ByteBuffer): ULong = lift(buf.getLong()) + override fun read(buf: ByteBuffer): ULong { + return lift(buf.getLong()) + } - override fun lower(value: ULong): Long = value.toLong() + override fun lower(value: ULong): Long { + return value.toLong() + } override fun allocationSize(value: ULong) = 8UL - override fun write( - value: ULong, - buf: ByteBuffer, - ) { + override fun write(value: ULong, buf: ByteBuffer) { buf.putLong(value.toLong()) } } public object FfiConverterLong : FfiConverter { - override fun lift(value: Long): Long = value + override fun lift(value: Long): Long { + return value + } - override fun read(buf: ByteBuffer): Long = buf.getLong() + override fun read(buf: ByteBuffer): Long { + return buf.getLong() + } - override fun lower(value: Long): Long = value + override fun lower(value: Long): Long { + return value + } override fun allocationSize(value: Long) = 8UL - override fun write( - value: Long, - buf: ByteBuffer, - ) { + override fun write(value: Long, buf: ByteBuffer) { buf.putLong(value) } } public object FfiConverterBoolean : FfiConverter { - override fun lift(value: Byte): Boolean = value.toInt() != 0 + override fun lift(value: Byte): Boolean { + return value.toInt() != 0 + } - override fun read(buf: ByteBuffer): Boolean = lift(buf.get()) + override fun read(buf: ByteBuffer): Boolean { + return lift(buf.get()) + } - override fun lower(value: Boolean): Byte = if (value) 1.toByte() else 0.toByte() + override fun lower(value: Boolean): Byte { + return if (value) 1.toByte() else 0.toByte() + } override fun allocationSize(value: Boolean) = 1UL - override fun write( - value: Boolean, - buf: ByteBuffer, - ) { + override fun write(value: Boolean, buf: ByteBuffer) { buf.put(lower(value)) } } @@ -2486,10 +2496,7 @@ public object FfiConverterString : FfiConverter { return sizeForLength + sizeForString } - override fun write( - value: String, - buf: ByteBuffer, - ) { + override fun write(value: String, buf: ByteBuffer) { val byteBuf = toUtf8(value) buf.putInt(byteBuf.limit()) buf.put(byteBuf) @@ -2504,17 +2511,17 @@ public object FfiConverterByteArray : FfiConverterRustBuffer { return byteArr } - override fun allocationSize(value: ByteArray): ULong = 4UL + value.size.toULong() + override fun allocationSize(value: ByteArray): ULong { + return 4UL + value.size.toULong() + } - override fun write( - value: ByteArray, - buf: ByteBuffer, - ) { + override fun write(value: ByteArray, buf: ByteBuffer) { buf.putInt(value.size) buf.put(value) } } + // This template implements a class for working with a Rust struct via a Pointer/Arc // to the live Rust struct on the other side of the FFI. // @@ -2612,6 +2619,7 @@ public object FfiConverterByteArray : FfiConverterRustBuffer { // [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 // + // The cleaner interface for Object finalization code to run. // This is the entry point to any implementation that we're using. // @@ -2623,24 +2631,17 @@ interface UniffiCleaner { fun clean() } - fun register( - value: Any, - cleanUpTask: Runnable, - ): UniffiCleaner.Cleanable + fun register(value: Any, cleanUpTask: Runnable): UniffiCleaner.Cleanable companion object } // The fallback Jna cleaner, which is available for both Android, and the JVM. private class UniffiJnaCleaner : UniffiCleaner { - private val cleaner = - com.sun.jna.internal.Cleaner - .getCleaner() + private val cleaner = com.sun.jna.internal.Cleaner.getCleaner() - override fun register( - value: Any, - cleanUpTask: Runnable, - ): UniffiCleaner.Cleanable = UniffiJnaCleanable(cleaner.register(value, cleanUpTask)) + override fun register(value: Any, cleanUpTask: Runnable): UniffiCleaner.Cleanable = + UniffiJnaCleanable(cleaner.register(value, cleanUpTask)) } private class UniffiJnaCleanable( @@ -2667,14 +2668,10 @@ private fun UniffiCleaner.Companion.create(): UniffiCleaner = } private class JavaLangRefCleaner : UniffiCleaner { - val cleaner = - java.lang.ref.Cleaner - .create() + val cleaner = java.lang.ref.Cleaner.create() - override fun register( - value: Any, - cleanUpTask: Runnable, - ): UniffiCleaner.Cleanable = JavaLangRefCleanable(cleaner.register(value, cleanUpTask)) + override fun register(value: Any, cleanUpTask: Runnable): UniffiCleaner.Cleanable = + JavaLangRefCleanable(cleaner.register(value, cleanUpTask)) } private class JavaLangRefCleanable( @@ -2684,6 +2681,7 @@ private class JavaLangRefCleanable( } public interface FfiConversationsInterface { + suspend fun `createGroup`( `accountAddresses`: List, `opts`: FfiCreateGroupOptions, @@ -2704,10 +2702,8 @@ public interface FfiConversationsInterface { companion object } -open class FfiConversations : - Disposable, - AutoCloseable, - FfiConversationsInterface { +open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterface { + constructor(pointer: Pointer) { this.pointer = pointer this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) @@ -2771,9 +2767,7 @@ open class FfiConversations : // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction( - private val pointer: Pointer?, - ) : Runnable { + private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> @@ -2783,18 +2777,20 @@ open class FfiConversations : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_fficonversations(pointer!!, status) } + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `createGroup`( `accountAddresses`: List, `opts`: FfiCreateGroupOptions, - ): FfiGroup = - uniffiRustCallAsync( + ): FfiGroup { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_create_group( thisPtr, @@ -2821,22 +2817,20 @@ open class FfiConversations : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `list`(`opts`: FfiListConversationsOptions): List = - uniffiRustCallAsync( + override suspend fun `list`(`opts`: FfiListConversationsOptions): List { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list( thisPtr, FfiConverterTypeFfiListConversationsOptions.lower(`opts`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -2855,11 +2849,13 @@ open class FfiConversations : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `processStreamedWelcomeMessage`(`envelopeBytes`: kotlin.ByteArray): FfiGroup = - uniffiRustCallAsync( + override suspend fun `processStreamedWelcomeMessage`(`envelopeBytes`: kotlin.ByteArray): FfiGroup { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_process_streamed_welcome_message( thisPtr, @@ -2885,10 +2881,12 @@ open class FfiConversations : // Error FFI converter GenericException.ErrorHandler, ) + } + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `stream`(`callback`: FfiConversationCallback): FfiStreamCloser = - uniffiRustCallAsync( + override suspend fun `stream`(`callback`: FfiConversationCallback): FfiStreamCloser { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream( thisPtr, @@ -2914,10 +2912,12 @@ open class FfiConversations : // Error FFI converter UniffiNullRustCallStatusErrorHandler, ) + } + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamAllMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser = - uniffiRustCallAsync( + override suspend fun `streamAllMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_messages( thisPtr, @@ -2943,15 +2943,18 @@ open class FfiConversations : // Error FFI converter UniffiNullRustCallStatusErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `sync`() = - uniffiRustCallAsync( + override suspend fun `sync`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_sync( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -2969,18 +2972,22 @@ open class FfiConversations : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `syncAllGroups`(): kotlin.UInt = - uniffiRustCallAsync( + override suspend fun `syncAllGroups`(): kotlin.UInt { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_sync_all_groups( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_u32( @@ -3001,14 +3008,22 @@ open class FfiConversations : // Error FFI converter GenericException.ErrorHandler, ) + } + companion object + } public object FfiConverterTypeFfiConversations : FfiConverter { - override fun lower(value: FfiConversations): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiConversations = FfiConversations(value) + override fun lower(value: FfiConversations): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiConversations { + return FfiConversations(value) + } override fun read(buf: ByteBuffer): FfiConversations { // The Rust code always writes pointers as 8 bytes, and will @@ -3018,16 +3033,14 @@ public object FfiConverterTypeFfiConversations : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -3125,7 +3138,9 @@ public object FfiConverterTypeFfiConversations : FfiConverter) @@ -3213,10 +3228,8 @@ public interface FfiGroupInterface { companion object } -open class FfiGroup : - Disposable, - AutoCloseable, - FfiGroupInterface { +open class FfiGroup : Disposable, AutoCloseable, FfiGroupInterface { + constructor(pointer: Pointer) { this.pointer = pointer this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) @@ -3280,9 +3293,7 @@ open class FfiGroup : // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction( - private val pointer: Pointer?, - ) : Runnable { + private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> @@ -3292,15 +3303,17 @@ open class FfiGroup : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffigroup(pointer!!, status) } + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addAdmin`(`inboxId`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `addAdmin`(`inboxId`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_add_admin( thisPtr, @@ -3323,14 +3336,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addMembers`(`accountAddresses`: List) = - uniffiRustCallAsync( + override suspend fun `addMembers`(`accountAddresses`: List) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_add_members( thisPtr, @@ -3353,14 +3369,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addMembersByInboxId`(`inboxIds`: List) = - uniffiRustCallAsync( + override suspend fun `addMembersByInboxId`(`inboxIds`: List) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_add_members_by_inbox_id( thisPtr, @@ -3383,14 +3402,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addSuperAdmin`(`inboxId`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `addSuperAdmin`(`inboxId`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_add_super_admin( thisPtr, @@ -3413,220 +3435,232 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) - override fun `addedByInboxId`(): kotlin.String = - FfiConverterString.lift( + override fun `addedByInboxId`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_added_by_inbox_id( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `adminList`(): List = - FfiConverterSequenceString.lift( + override fun `adminList`(): List { + return FfiConverterSequenceString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_admin_list( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `consentState`(): FfiConsentState = - FfiConverterTypeFfiConsentState.lift( + override fun `consentState`(): FfiConsentState { + return FfiConverterTypeFfiConsentState.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_consent_state( - it, - _status, + it, _status ) } - }, + } ) + } + - override fun `createdAtNs`(): kotlin.Long = - FfiConverterLong.lift( + override fun `createdAtNs`(): kotlin.Long { + return FfiConverterLong.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_created_at_ns( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `findMessages`(`opts`: FfiListMessagesOptions): List = - FfiConverterSequenceTypeFfiMessage.lift( + override fun `findMessages`(`opts`: FfiListMessagesOptions): List { + return FfiConverterSequenceTypeFfiMessage.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_find_messages( - it, - FfiConverterTypeFfiListMessagesOptions.lower(`opts`), - _status, + it, FfiConverterTypeFfiListMessagesOptions.lower(`opts`), _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `groupDescription`(): kotlin.String = - FfiConverterString.lift( + override fun `groupDescription`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_group_description( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `groupImageUrlSquare`(): kotlin.String = - FfiConverterString.lift( + override fun `groupImageUrlSquare`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_group_image_url_square( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `groupMetadata`(): FfiGroupMetadata = - FfiConverterTypeFfiGroupMetadata.lift( + override fun `groupMetadata`(): FfiGroupMetadata { + return FfiConverterTypeFfiGroupMetadata.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_group_metadata( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `groupName`(): kotlin.String = - FfiConverterString.lift( + override fun `groupName`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_group_name( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `groupPermissions`(): FfiGroupPermissions = - FfiConverterTypeFfiGroupPermissions.lift( + override fun `groupPermissions`(): FfiGroupPermissions { + return FfiConverterTypeFfiGroupPermissions.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_group_permissions( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `groupPinnedFrameUrl`(): kotlin.String = - FfiConverterString.lift( + override fun `groupPinnedFrameUrl`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_group_pinned_frame_url( - it, - _status, + it, _status ) } - }, + } ) + } + - override fun `id`(): kotlin.ByteArray = - FfiConverterByteArray.lift( + override fun `id`(): kotlin.ByteArray { + return FfiConverterByteArray.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_id( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `isActive`(): kotlin.Boolean = - FfiConverterBoolean.lift( + override fun `isActive`(): kotlin.Boolean { + return FfiConverterBoolean.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_is_active( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `isAdmin`(`inboxId`: kotlin.String): kotlin.Boolean = - FfiConverterBoolean.lift( + override fun `isAdmin`(`inboxId`: kotlin.String): kotlin.Boolean { + return FfiConverterBoolean.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_is_admin( - it, - FfiConverterString.lower(`inboxId`), - _status, + it, FfiConverterString.lower(`inboxId`), _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `isSuperAdmin`(`inboxId`: kotlin.String): kotlin.Boolean = - FfiConverterBoolean.lift( + override fun `isSuperAdmin`(`inboxId`: kotlin.String): kotlin.Boolean { + return FfiConverterBoolean.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_is_super_admin( - it, - FfiConverterString.lower(`inboxId`), - _status, + it, FfiConverterString.lower(`inboxId`), _status ) } - }, + } ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `listMembers`(): List = - uniffiRustCallAsync( + override suspend fun `listMembers`(): List { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_list_members( thisPtr, - ) + + ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -3645,22 +3679,20 @@ open class FfiGroup : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `processStreamedGroupMessage`(`envelopeBytes`: kotlin.ByteArray): FfiMessage = - uniffiRustCallAsync( + override suspend fun `processStreamedGroupMessage`(`envelopeBytes`: kotlin.ByteArray): FfiMessage { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_process_streamed_group_message( thisPtr, FfiConverterByteArray.lower(`envelopeBytes`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -3679,18 +3711,21 @@ open class FfiGroup : // Error FFI converter GenericException.ErrorHandler, ) + } + /** * Publish all unpublished messages */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `publishMessages`() = - uniffiRustCallAsync( + override suspend fun `publishMessages`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_publish_messages( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -3708,14 +3743,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `removeAdmin`(`inboxId`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `removeAdmin`(`inboxId`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_remove_admin( thisPtr, @@ -3738,14 +3776,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `removeMembers`(`accountAddresses`: List) = - uniffiRustCallAsync( + override suspend fun `removeMembers`(`accountAddresses`: List) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_remove_members( thisPtr, @@ -3768,14 +3809,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `removeMembersByInboxId`(`inboxIds`: List) = - uniffiRustCallAsync( + override suspend fun `removeMembersByInboxId`(`inboxIds`: List) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_remove_members_by_inbox_id( thisPtr, @@ -3798,14 +3842,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `removeSuperAdmin`(`inboxId`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `removeSuperAdmin`(`inboxId`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_remove_super_admin( thisPtr, @@ -3828,25 +3875,24 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `send`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray = - uniffiRustCallAsync( + override suspend fun `send`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_send( thisPtr, FfiConverterByteArray.lower(`contentBytes`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -3865,27 +3911,29 @@ open class FfiGroup : // Error FFI converter GenericException.ErrorHandler, ) + } + /** * send a message without immediately publishing to the delivery service. */ @Throws(GenericException::class) - override fun `sendOptimistic`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray = - FfiConverterByteArray.lift( + override fun `sendOptimistic`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_send_optimistic( - it, - FfiConverterByteArray.lower(`contentBytes`), - _status, + it, FfiConverterByteArray.lower(`contentBytes`), _status ) } - }, + } ) + } + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `stream`(`messageCallback`: FfiMessageCallback): FfiStreamCloser = - uniffiRustCallAsync( + override suspend fun `stream`(`messageCallback`: FfiMessageCallback): FfiStreamCloser { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_stream( thisPtr, @@ -3911,28 +3959,32 @@ open class FfiGroup : // Error FFI converter UniffiNullRustCallStatusErrorHandler, ) + } + @Throws(GenericException::class) - override fun `superAdminList`(): List = - FfiConverterSequenceString.lift( + override fun `superAdminList`(): List { + return FfiConverterSequenceString.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_super_admin_list( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `sync`() = - uniffiRustCallAsync( + override suspend fun `sync`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_sync( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -3950,26 +4002,28 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) override fun `updateConsentState`(`state`: FfiConsentState) = callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_consent_state( - it, - FfiConverterTypeFfiConsentState.lower(`state`), - _status, + it, FfiConverterTypeFfiConsentState.lower(`state`), _status ) } } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `updateGroupDescription`(`groupDescription`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `updateGroupDescription`(`groupDescription`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_group_description( thisPtr, @@ -3992,14 +4046,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `updateGroupImageUrlSquare`(`groupImageUrlSquare`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `updateGroupImageUrlSquare`(`groupImageUrlSquare`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_group_image_url_square( thisPtr, @@ -4022,14 +4079,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `updateGroupName`(`groupName`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `updateGroupName`(`groupName`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_group_name( thisPtr, @@ -4052,14 +4112,17 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `updateGroupPinnedFrameUrl`(`pinnedFrameUrl`: kotlin.String) = - uniffiRustCallAsync( + override suspend fun `updateGroupPinnedFrameUrl`(`pinnedFrameUrl`: kotlin.String) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_group_pinned_frame_url( thisPtr, @@ -4082,9 +4145,12 @@ open class FfiGroup : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") @@ -4092,42 +4158,52 @@ open class FfiGroup : `permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, `metadataField`: FfiMetadataField?, - ) = uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_permission_policy( - thisPtr, - FfiConverterTypeFfiPermissionUpdateType.lower(`permissionUpdateType`), - FfiConverterTypeFfiPermissionPolicy.lower(`permissionPolicyOption`), - FfiConverterOptionalTypeFfiMetadataField.lower(`metadataField`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - // Error FFI converter - GenericException.ErrorHandler, - ) + ) { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroup_update_permission_policy( + thisPtr, + FfiConverterTypeFfiPermissionUpdateType.lower(`permissionUpdateType`), + FfiConverterTypeFfiPermissionPolicy.lower(`permissionPolicyOption`), + FfiConverterOptionalTypeFfiMetadataField.lower(`metadataField`), + ) + }, + { future, callback, continuation -> + UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( + future, + callback, + continuation + ) + }, + { future, continuation -> + UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( + future, + continuation + ) + }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) + } + companion object + } public object FfiConverterTypeFfiGroup : FfiConverter { - override fun lower(value: FfiGroup): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiGroup = FfiGroup(value) + override fun lower(value: FfiGroup): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiGroup { + return FfiGroup(value) + } override fun read(buf: ByteBuffer): FfiGroup { // The Rust code always writes pointers as 8 bytes, and will @@ -4137,16 +4213,14 @@ public object FfiConverterTypeFfiGroup : FfiConverter { override fun allocationSize(value: FfiGroup) = 8UL - override fun write( - value: FfiGroup, - buf: ByteBuffer, - ) { + override fun write(value: FfiGroup, buf: ByteBuffer) { // The Rust code always expects pointers written as 8 bytes, // and will fail to compile if they don't fit. buf.putLong(Pointer.nativeValue(lower(value))) } } + // This template implements a class for working with a Rust struct via a Pointer/Arc // to the live Rust struct on the other side of the FFI. // @@ -4244,7 +4318,9 @@ public object FfiConverterTypeFfiGroup : FfiConverter { // [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 // + public interface FfiGroupMetadataInterface { + fun `conversationType`(): kotlin.String fun `creatorInboxId`(): kotlin.String @@ -4252,10 +4328,8 @@ public interface FfiGroupMetadataInterface { companion object } -open class FfiGroupMetadata : - Disposable, - AutoCloseable, - FfiGroupMetadataInterface { +open class FfiGroupMetadata : Disposable, AutoCloseable, FfiGroupMetadataInterface { + constructor(pointer: Pointer) { this.pointer = pointer this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) @@ -4319,9 +4393,7 @@ open class FfiGroupMetadata : // Use a static inner class instead of a closure so as not to accidentally // capture `this` as part of the cleanable's action. - private class UniffiCleanAction( - private val pointer: Pointer?, - ) : Runnable { + private class UniffiCleanAction(private val pointer: Pointer?) : Runnable { override fun run() { pointer?.let { ptr -> uniffiRustCall { status -> @@ -4331,42 +4403,51 @@ open class FfiGroupMetadata : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffigroupmetadata(pointer!!, status) } + } - override fun `conversationType`(): kotlin.String = - FfiConverterString.lift( + override fun `conversationType`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroupmetadata_conversation_type( - it, - _status, + it, _status ) } - }, + } ) + } - override fun `creatorInboxId`(): kotlin.String = - FfiConverterString.lift( + + override fun `creatorInboxId`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigroupmetadata_creator_inbox_id( - it, - _status, + it, _status ) } - }, + } ) + } + companion object + } public object FfiConverterTypeFfiGroupMetadata : FfiConverter { - override fun lower(value: FfiGroupMetadata): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiGroupMetadata = FfiGroupMetadata(value) + override fun lower(value: FfiGroupMetadata): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiGroupMetadata { + return FfiGroupMetadata(value) + } override fun read(buf: ByteBuffer): FfiGroupMetadata { // The Rust code always writes pointers as 8 bytes, and will @@ -4376,16 +4457,14 @@ public object FfiConverterTypeFfiGroupMetadata : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -4483,7 +4562,9 @@ public object FfiConverterTypeFfiGroupMetadata : FfiConverter uniffiRustCall { status -> @@ -4570,44 +4647,54 @@ open class FfiGroupPermissions : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffigrouppermissions(pointer!!, status) } + } + @Throws(GenericException::class) - override fun `policySet`(): FfiPermissionPolicySet = - FfiConverterTypeFfiPermissionPolicySet.lift( + override fun `policySet`(): FfiPermissionPolicySet { + return FfiConverterTypeFfiPermissionPolicySet.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_set( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `policyType`(): FfiGroupPermissionsOptions = - FfiConverterTypeFfiGroupPermissionsOptions.lift( + override fun `policyType`(): FfiGroupPermissionsOptions { + return FfiConverterTypeFfiGroupPermissionsOptions.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_type( - it, - _status, + it, _status ) } - }, + } ) + } + companion object + } public object FfiConverterTypeFfiGroupPermissions : FfiConverter { - override fun lower(value: FfiGroupPermissions): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiGroupPermissions = FfiGroupPermissions(value) + override fun lower(value: FfiGroupPermissions): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiGroupPermissions { + return FfiGroupPermissions(value) + } override fun read(buf: ByteBuffer): FfiGroupPermissions { // The Rust code always writes pointers as 8 bytes, and will @@ -4617,16 +4704,14 @@ public object FfiConverterTypeFfiGroupPermissions : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -4724,7 +4809,9 @@ public object FfiConverterTypeFfiGroupPermissions : FfiConverter uniffiRustCall { status -> @@ -4825,15 +4908,17 @@ open class FfiSignatureRequest : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffisignaturerequest(pointer!!, status) } + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addEcdsaSignature`(`signatureBytes`: kotlin.ByteArray) = - uniffiRustCallAsync( + override suspend fun `addEcdsaSignature`(`signatureBytes`: kotlin.ByteArray) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_ecdsa_signature( thisPtr, @@ -4856,9 +4941,12 @@ open class FfiSignatureRequest : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") @@ -4867,43 +4955,48 @@ open class FfiSignatureRequest : `address`: kotlin.String, `chainId`: kotlin.ULong, `blockNumber`: kotlin.ULong, - ) = uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature( - thisPtr, - FfiConverterByteArray.lower(`signatureBytes`), - FfiConverterString.lower(`address`), - FfiConverterULong.lower(`chainId`), - FfiConverterULong.lower(`blockNumber`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - // Error FFI converter - GenericException.ErrorHandler, - ) + ) { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature( + thisPtr, + FfiConverterByteArray.lower(`signatureBytes`), + FfiConverterString.lower(`address`), + FfiConverterULong.lower(`chainId`), + FfiConverterULong.lower(`blockNumber`), + ) + }, + { future, callback, continuation -> + UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( + future, + callback, + continuation + ) + }, + { future, continuation -> + UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( + future, + continuation + ) + }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) + } + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `isReady`(): kotlin.Boolean = - uniffiRustCallAsync( + override suspend fun `isReady`(): kotlin.Boolean { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_i8( @@ -4924,24 +5017,23 @@ open class FfiSignatureRequest : // Error FFI converter UniffiNullRustCallStatusErrorHandler, ) + } + /** * missing signatures that are from [MemberKind::Address] */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `missingAddressSignatures`(): List = - uniffiRustCallAsync( + override suspend fun `missingAddressSignatures`(): List { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures( thisPtr, - ) + + ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -4960,21 +5052,20 @@ open class FfiSignatureRequest : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `signatureText`(): kotlin.String = - uniffiRustCallAsync( + override suspend fun `signatureText`(): kotlin.String { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text( thisPtr, - ) + + ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -4993,14 +5084,22 @@ open class FfiSignatureRequest : // Error FFI converter GenericException.ErrorHandler, ) + } + companion object + } public object FfiConverterTypeFfiSignatureRequest : FfiConverter { - override fun lower(value: FfiSignatureRequest): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiSignatureRequest = FfiSignatureRequest(value) + override fun lower(value: FfiSignatureRequest): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiSignatureRequest { + return FfiSignatureRequest(value) + } override fun read(buf: ByteBuffer): FfiSignatureRequest { // The Rust code always writes pointers as 8 bytes, and will @@ -5010,16 +5109,14 @@ public object FfiConverterTypeFfiSignatureRequest : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -5117,7 +5214,9 @@ public object FfiConverterTypeFfiSignatureRequest : FfiConverter uniffiRustCall { status -> @@ -5213,10 +5308,12 @@ open class FfiStreamCloser : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffistreamcloser(pointer!!, status) } + } + /** * Signal the stream to end @@ -5224,25 +5321,26 @@ open class FfiStreamCloser : */ override fun `end`() = callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_end( - it, - _status, + it, _status ) } } + /** * End the stream and asyncronously wait for it to shutdown */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `endAndWait`() = - uniffiRustCallAsync( + override suspend fun `endAndWait`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -5260,29 +5358,38 @@ open class FfiStreamCloser : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } - override fun `isClosed`(): kotlin.Boolean = - FfiConverterBoolean.lift( + override fun `isClosed`(): kotlin.Boolean { + return FfiConverterBoolean.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_is_closed( - it, - _status, + it, _status ) } - }, + } ) + } + companion object + } public object FfiConverterTypeFfiStreamCloser : FfiConverter { - override fun lower(value: FfiStreamCloser): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiStreamCloser = FfiStreamCloser(value) + override fun lower(value: FfiStreamCloser): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiStreamCloser { + return FfiStreamCloser(value) + } override fun read(buf: ByteBuffer): FfiStreamCloser { // The Rust code always writes pointers as 8 bytes, and will @@ -5292,16 +5399,14 @@ public object FfiConverterTypeFfiStreamCloser : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -5399,13 +5504,12 @@ public object FfiConverterTypeFfiStreamCloser : FfiConverter uniffiRustCall { status -> @@ -5498,26 +5598,24 @@ open class FfiV2ApiClient : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffiv2apiclient(pointer!!, status) } + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `batchQuery`(`req`: FfiV2BatchQueryRequest): FfiV2BatchQueryResponse = - uniffiRustCallAsync( + override suspend fun `batchQuery`(`req`: FfiV2BatchQueryRequest): FfiV2BatchQueryResponse { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_batch_query( thisPtr, FfiConverterTypeFfiV2BatchQueryRequest.lower(`req`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -5536,55 +5634,54 @@ open class FfiV2ApiClient : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `publish`( - `request`: FfiPublishRequest, - `authToken`: kotlin.String, - ) = uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_publish( - thisPtr, - FfiConverterTypeFfiPublishRequest.lower(`request`), - FfiConverterString.lower(`authToken`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - // Error FFI converter - GenericException.ErrorHandler, - ) + override suspend fun `publish`(`request`: FfiPublishRequest, `authToken`: kotlin.String) { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_publish( + thisPtr, + FfiConverterTypeFfiPublishRequest.lower(`request`), + FfiConverterString.lower(`authToken`), + ) + }, + { future, callback, continuation -> + UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( + future, + callback, + continuation + ) + }, + { future, continuation -> + UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( + future, + continuation + ) + }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `query`(`request`: FfiV2QueryRequest): FfiV2QueryResponse = - uniffiRustCallAsync( + override suspend fun `query`(`request`: FfiV2QueryRequest): FfiV2QueryResponse { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_query( thisPtr, FfiConverterTypeFfiV2QueryRequest.lower(`request`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -5603,25 +5700,25 @@ open class FfiV2ApiClient : // Error FFI converter GenericException.ErrorHandler, ) + } override fun `setAppVersion`(`version`: kotlin.String) = callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_set_app_version( - it, - FfiConverterString.lower(`version`), - _status, + it, FfiConverterString.lower(`version`), _status ) } } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribe`( `request`: FfiV2SubscribeRequest, `callback`: FfiV2SubscriptionCallback, - ): FfiV2Subscription = - uniffiRustCallAsync( + ): FfiV2Subscription { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_subscribe( thisPtr, @@ -5648,14 +5745,22 @@ open class FfiV2ApiClient : // Error FFI converter GenericException.ErrorHandler, ) + } + companion object + } public object FfiConverterTypeFfiV2ApiClient : FfiConverter { - override fun lower(value: FfiV2ApiClient): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiV2ApiClient = FfiV2ApiClient(value) + override fun lower(value: FfiV2ApiClient): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiV2ApiClient { + return FfiV2ApiClient(value) + } override fun read(buf: ByteBuffer): FfiV2ApiClient { // The Rust code always writes pointers as 8 bytes, and will @@ -5665,16 +5770,14 @@ public object FfiConverterTypeFfiV2ApiClient : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -5772,10 +5875,12 @@ public object FfiConverterTypeFfiV2ApiClient : FfiConverter uniffiRustCall { status -> @@ -5878,10 +5979,12 @@ open class FfiV2Subscription : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffiv2subscription(pointer!!, status) } + } + /** * End the subscription, waiting for the subscription to close entirely. @@ -5890,12 +5993,13 @@ open class FfiV2Subscription : */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `end`() = - uniffiRustCallAsync( + override suspend fun `end`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_end( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -5913,32 +6017,36 @@ open class FfiV2Subscription : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + /** * Check if the subscription is closed */ - override fun `isClosed`(): kotlin.Boolean = - FfiConverterBoolean.lift( + override fun `isClosed`(): kotlin.Boolean { + return FfiConverterBoolean.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_is_closed( - it, - _status, + it, _status ) } - }, + } ) + } + /** * Update subscription with new topics */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `update`(`req`: FfiV2SubscribeRequest) = - uniffiRustCallAsync( + override suspend fun `update`(`req`: FfiV2SubscribeRequest) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_update( thisPtr, @@ -5961,17 +6069,26 @@ open class FfiV2Subscription : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + companion object + } public object FfiConverterTypeFfiV2Subscription : FfiConverter { - override fun lower(value: FfiV2Subscription): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiV2Subscription = FfiV2Subscription(value) + override fun lower(value: FfiV2Subscription): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiV2Subscription { + return FfiV2Subscription(value) + } override fun read(buf: ByteBuffer): FfiV2Subscription { // The Rust code always writes pointers as 8 bytes, and will @@ -5981,16 +6098,14 @@ public object FfiConverterTypeFfiV2Subscription : FfiConverter // to the live Rust struct on the other side of the FFI. // @@ -6088,7 +6203,9 @@ public object FfiConverterTypeFfiV2Subscription : FfiConverter uniffiRustCall { status -> @@ -6232,10 +6345,12 @@ open class FfiXmtpClient : } } - fun uniffiClonePointer(): Pointer = - uniffiRustCall { status -> + fun uniffiClonePointer(): Pointer { + return uniffiRustCall() { status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_clone_ffixmtpclient(pointer!!, status) } + } + /** * Adds an identity - really a wallet address - to the existing client @@ -6245,8 +6360,8 @@ open class FfiXmtpClient : override suspend fun `addWallet`( `existingWalletAddress`: kotlin.String, `newWalletAddress`: kotlin.String, - ): FfiSignatureRequest = - uniffiRustCallAsync( + ): FfiSignatureRequest { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet( thisPtr, @@ -6273,11 +6388,13 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) = - uniffiRustCallAsync( + override suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_apply_signature_request( thisPtr, @@ -6300,25 +6417,24 @@ open class FfiXmtpClient : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `canMessage`(`accountAddresses`: List): Map = - uniffiRustCallAsync( + override suspend fun `canMessage`(`accountAddresses`: List): Map { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_can_message( thisPtr, FfiConverterSequenceString.lower(`accountAddresses`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -6337,27 +6453,30 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } - override fun `conversations`(): FfiConversations = - FfiConverterTypeFfiConversations.lift( + override fun `conversations`(): FfiConversations { + return FfiConverterTypeFfiConversations.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_conversations( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `dbReconnect`() = - uniffiRustCallAsync( + override suspend fun `dbReconnect`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -6375,25 +6494,24 @@ open class FfiXmtpClient : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `findInboxId`(`address`: kotlin.String): kotlin.String? = - uniffiRustCallAsync( + override suspend fun `findInboxId`(`address`: kotlin.String): kotlin.String? { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_find_inbox_id( thisPtr, FfiConverterString.lower(`address`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -6412,14 +6530,16 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getConsentState`( `entityType`: FfiConsentEntityType, `entity`: kotlin.String, - ): FfiConsentState = - uniffiRustCallAsync( + ): FfiConsentState { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_get_consent_state( thisPtr, @@ -6427,11 +6547,7 @@ open class FfiXmtpClient : FfiConverterString.lower(`entity`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -6450,22 +6566,20 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `getLatestInboxState`(`inboxId`: kotlin.String): FfiInboxState = - uniffiRustCallAsync( + override suspend fun `getLatestInboxState`(`inboxId`: kotlin.String): FfiInboxState { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_get_latest_inbox_state( thisPtr, FfiConverterString.lower(`inboxId`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -6484,32 +6598,35 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) - override fun `group`(`groupId`: kotlin.ByteArray): FfiGroup = - FfiConverterTypeFfiGroup.lift( + override fun `group`(`groupId`: kotlin.ByteArray): FfiGroup { + return FfiConverterTypeFfiGroup.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_group( - it, - FfiConverterByteArray.lower(`groupId`), - _status, + it, FfiConverterByteArray.lower(`groupId`), _status ) } - }, + } ) + } - override fun `inboxId`(): kotlin.String = - FfiConverterString.lift( + + override fun `inboxId`(): kotlin.String { + return FfiConverterString.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_id( - it, - _status, + it, _status ) } - }, + } ) + } + /** * * Get the client's inbox state. @@ -6519,19 +6636,15 @@ open class FfiXmtpClient : */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `inboxState`(`refreshFromNetwork`: kotlin.Boolean): FfiInboxState = - uniffiRustCallAsync( + override suspend fun `inboxState`(`refreshFromNetwork`: kotlin.Boolean): FfiInboxState { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_state( thisPtr, FfiConverterBoolean.lower(`refreshFromNetwork`), ) }, - { - future, - callback, - continuation, - -> + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( future, callback, @@ -6550,37 +6663,39 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } - override fun `installationId`(): kotlin.ByteArray = - FfiConverterByteArray.lift( + override fun `installationId`(): kotlin.ByteArray { + return FfiConverterByteArray.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_installation_id( - it, - _status, + it, _status ) } - }, + } ) + } + @Throws(GenericException::class) - override fun `message`(`messageId`: kotlin.ByteArray): FfiMessage = - FfiConverterTypeFfiMessage.lift( + override fun `message`(`messageId`: kotlin.ByteArray): FfiMessage { + return FfiConverterTypeFfiMessage.lift( callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_message( - it, - FfiConverterByteArray.lower(`messageId`), - _status, + it, FfiConverterByteArray.lower(`messageId`), _status ) } - }, + } ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `registerIdentity`(`signatureRequest`: FfiSignatureRequest) = - uniffiRustCallAsync( + override suspend fun `registerIdentity`(`signatureRequest`: FfiSignatureRequest) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_register_identity( thisPtr, @@ -6603,29 +6718,33 @@ open class FfiXmtpClient : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) override fun `releaseDbConnection`() = callWithPointer { uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_release_db_connection( - it, - _status, + it, _status ) } } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `requestHistorySync`() = - uniffiRustCallAsync( + override suspend fun `requestHistorySync`() { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_request_history_sync( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( @@ -6643,21 +6762,25 @@ open class FfiXmtpClient : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } + /** * * Revokes all installations except the one the client is currently using */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `revokeAllOtherInstallations`(): FfiSignatureRequest = - uniffiRustCallAsync( + override suspend fun `revokeAllOtherInstallations`(): FfiSignatureRequest { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations( thisPtr, - ) + + ) }, { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( @@ -6678,14 +6801,16 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } + /** * Revokes or removes an identity - really a wallet address - from the existing client */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `revokeWallet`(`walletAddress`: kotlin.String): FfiSignatureRequest = - uniffiRustCallAsync( + override suspend fun `revokeWallet`(`walletAddress`: kotlin.String): FfiSignatureRequest { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_wallet( thisPtr, @@ -6711,11 +6836,13 @@ open class FfiXmtpClient : // Error FFI converter GenericException.ErrorHandler, ) + } + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `setConsentStates`(`records`: List) = - uniffiRustCallAsync( + override suspend fun `setConsentStates`(`records`: List) { + return uniffiRustCallAsync( callWithPointer { thisPtr -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_set_consent_states( thisPtr, @@ -6738,29 +6865,38 @@ open class FfiXmtpClient : { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, // lift function { Unit }, + // Error FFI converter GenericException.ErrorHandler, ) + } - override fun `signatureRequest`(): FfiSignatureRequest? = - FfiConverterOptionalTypeFfiSignatureRequest.lift( + override fun `signatureRequest`(): FfiSignatureRequest? { + return FfiConverterOptionalTypeFfiSignatureRequest.lift( callWithPointer { - uniffiRustCall { _status -> + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_signature_request( - it, - _status, + it, _status ) } - }, + } ) + } + companion object + } public object FfiConverterTypeFfiXmtpClient : FfiConverter { - override fun lower(value: FfiXmtpClient): Pointer = value.uniffiClonePointer() - override fun lift(value: Pointer): FfiXmtpClient = FfiXmtpClient(value) + override fun lower(value: FfiXmtpClient): Pointer { + return value.uniffiClonePointer() + } + + override fun lift(value: Pointer): FfiXmtpClient { + return FfiXmtpClient(value) + } override fun read(buf: ByteBuffer): FfiXmtpClient { // The Rust code always writes pointers as 8 bytes, and will @@ -6770,49 +6906,46 @@ public object FfiConverterTypeFfiXmtpClient : FfiConverter { - override fun read(buf: ByteBuffer): FfiConsent = - FfiConsent( + override fun read(buf: ByteBuffer): FfiConsent { + return FfiConsent( FfiConverterTypeFfiConsentEntityType.read(buf), FfiConverterTypeFfiConsentState.read(buf), FfiConverterString.read(buf), ) + } - override fun allocationSize(value: FfiConsent) = - ( - FfiConverterTypeFfiConsentEntityType.allocationSize(value.`entityType`) + - FfiConverterTypeFfiConsentState.allocationSize(value.`state`) + - FfiConverterString.allocationSize(value.`entity`) - ) + override fun allocationSize(value: FfiConsent) = ( + FfiConverterTypeFfiConsentEntityType.allocationSize(value.`entityType`) + + FfiConverterTypeFfiConsentState.allocationSize(value.`state`) + + FfiConverterString.allocationSize(value.`entity`) + ) - override fun write( - value: FfiConsent, - buf: ByteBuffer, - ) { + override fun write(value: FfiConsent, buf: ByteBuffer) { FfiConverterTypeFfiConsentEntityType.write(value.`entityType`, buf) FfiConverterTypeFfiConsentState.write(value.`state`, buf) FfiConverterString.write(value.`entity`, buf) } } + data class FfiCreateGroupOptions( var `permissions`: FfiGroupPermissionsOptions?, var `groupName`: kotlin.String?, @@ -6821,13 +6954,14 @@ data class FfiCreateGroupOptions( var `groupPinnedFrameUrl`: kotlin.String?, var `customPermissionPolicySet`: FfiPermissionPolicySet?, ) { + companion object } public object FfiConverterTypeFfiCreateGroupOptions : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiCreateGroupOptions = - FfiCreateGroupOptions( + override fun read(buf: ByteBuffer): FfiCreateGroupOptions { + return FfiCreateGroupOptions( FfiConverterOptionalTypeFfiGroupPermissionsOptions.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalString.read(buf), @@ -6835,21 +6969,18 @@ public object FfiConverterTypeFfiCreateGroupOptions : FfiConverterOptionalString.read(buf), FfiConverterOptionalTypeFfiPermissionPolicySet.read(buf), ) + } - override fun allocationSize(value: FfiCreateGroupOptions) = - ( - FfiConverterOptionalTypeFfiGroupPermissionsOptions.allocationSize(value.`permissions`) + - FfiConverterOptionalString.allocationSize(value.`groupName`) + - FfiConverterOptionalString.allocationSize(value.`groupImageUrlSquare`) + - FfiConverterOptionalString.allocationSize(value.`groupDescription`) + - FfiConverterOptionalString.allocationSize(value.`groupPinnedFrameUrl`) + - FfiConverterOptionalTypeFfiPermissionPolicySet.allocationSize(value.`customPermissionPolicySet`) - ) + override fun allocationSize(value: FfiCreateGroupOptions) = ( + FfiConverterOptionalTypeFfiGroupPermissionsOptions.allocationSize(value.`permissions`) + + FfiConverterOptionalString.allocationSize(value.`groupName`) + + FfiConverterOptionalString.allocationSize(value.`groupImageUrlSquare`) + + FfiConverterOptionalString.allocationSize(value.`groupDescription`) + + FfiConverterOptionalString.allocationSize(value.`groupPinnedFrameUrl`) + + FfiConverterOptionalTypeFfiPermissionPolicySet.allocationSize(value.`customPermissionPolicySet`) + ) - override fun write( - value: FfiCreateGroupOptions, - buf: ByteBuffer, - ) { + override fun write(value: FfiCreateGroupOptions, buf: ByteBuffer) { FfiConverterOptionalTypeFfiGroupPermissionsOptions.write(value.`permissions`, buf) FfiConverterOptionalString.write(value.`groupName`, buf) FfiConverterOptionalString.write(value.`groupImageUrlSquare`, buf) @@ -6859,68 +6990,67 @@ public object FfiConverterTypeFfiCreateGroupOptions : } } + data class FfiCursor( var `digest`: kotlin.ByteArray, var `senderTimeNs`: kotlin.ULong, ) { + companion object } public object FfiConverterTypeFfiCursor : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiCursor = - FfiCursor( + override fun read(buf: ByteBuffer): FfiCursor { + return FfiCursor( FfiConverterByteArray.read(buf), FfiConverterULong.read(buf), ) + } - override fun allocationSize(value: FfiCursor) = - ( - FfiConverterByteArray.allocationSize(value.`digest`) + - FfiConverterULong.allocationSize(value.`senderTimeNs`) - ) + override fun allocationSize(value: FfiCursor) = ( + FfiConverterByteArray.allocationSize(value.`digest`) + + FfiConverterULong.allocationSize(value.`senderTimeNs`) + ) - override fun write( - value: FfiCursor, - buf: ByteBuffer, - ) { + override fun write(value: FfiCursor, buf: ByteBuffer) { FfiConverterByteArray.write(value.`digest`, buf) FfiConverterULong.write(value.`senderTimeNs`, buf) } } + data class FfiEnvelope( var `contentTopic`: kotlin.String, var `timestampNs`: kotlin.ULong, var `message`: kotlin.ByteArray, ) { + companion object } public object FfiConverterTypeFfiEnvelope : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiEnvelope = - FfiEnvelope( + override fun read(buf: ByteBuffer): FfiEnvelope { + return FfiEnvelope( FfiConverterString.read(buf), FfiConverterULong.read(buf), FfiConverterByteArray.read(buf), ) + } - override fun allocationSize(value: FfiEnvelope) = - ( - FfiConverterString.allocationSize(value.`contentTopic`) + - FfiConverterULong.allocationSize(value.`timestampNs`) + - FfiConverterByteArray.allocationSize(value.`message`) - ) + override fun allocationSize(value: FfiEnvelope) = ( + FfiConverterString.allocationSize(value.`contentTopic`) + + FfiConverterULong.allocationSize(value.`timestampNs`) + + FfiConverterByteArray.allocationSize(value.`message`) + ) - override fun write( - value: FfiEnvelope, - buf: ByteBuffer, - ) { + override fun write(value: FfiEnvelope, buf: ByteBuffer) { FfiConverterString.write(value.`contentTopic`, buf) FfiConverterULong.write(value.`timestampNs`, buf) FfiConverterByteArray.write(value.`message`, buf) } } + data class FfiGroupMember( var `inboxId`: kotlin.String, var `accountAddresses`: List, @@ -6928,32 +7058,30 @@ data class FfiGroupMember( var `permissionLevel`: FfiPermissionLevel, var `consentState`: FfiConsentState, ) { + companion object } public object FfiConverterTypeFfiGroupMember : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiGroupMember = - FfiGroupMember( + override fun read(buf: ByteBuffer): FfiGroupMember { + return FfiGroupMember( FfiConverterString.read(buf), FfiConverterSequenceString.read(buf), FfiConverterSequenceByteArray.read(buf), FfiConverterTypeFfiPermissionLevel.read(buf), FfiConverterTypeFfiConsentState.read(buf), ) + } - override fun allocationSize(value: FfiGroupMember) = - ( - FfiConverterString.allocationSize(value.`inboxId`) + - FfiConverterSequenceString.allocationSize(value.`accountAddresses`) + - FfiConverterSequenceByteArray.allocationSize(value.`installationIds`) + - FfiConverterTypeFfiPermissionLevel.allocationSize(value.`permissionLevel`) + - FfiConverterTypeFfiConsentState.allocationSize(value.`consentState`) - ) + override fun allocationSize(value: FfiGroupMember) = ( + FfiConverterString.allocationSize(value.`inboxId`) + + FfiConverterSequenceString.allocationSize(value.`accountAddresses`) + + FfiConverterSequenceByteArray.allocationSize(value.`installationIds`) + + FfiConverterTypeFfiPermissionLevel.allocationSize(value.`permissionLevel`) + + FfiConverterTypeFfiConsentState.allocationSize(value.`consentState`) + ) - override fun write( - value: FfiGroupMember, - buf: ByteBuffer, - ) { + override fun write(value: FfiGroupMember, buf: ByteBuffer) { FfiConverterString.write(value.`inboxId`, buf) FfiConverterSequenceString.write(value.`accountAddresses`, buf) FfiConverterSequenceByteArray.write(value.`installationIds`, buf) @@ -6962,36 +7090,35 @@ public object FfiConverterTypeFfiGroupMember : FfiConverterRustBuffer, var `accountAddresses`: List, ) { + companion object } public object FfiConverterTypeFfiInboxState : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiInboxState = - FfiInboxState( + override fun read(buf: ByteBuffer): FfiInboxState { + return FfiInboxState( FfiConverterString.read(buf), FfiConverterString.read(buf), FfiConverterSequenceByteArray.read(buf), FfiConverterSequenceString.read(buf), ) + } - override fun allocationSize(value: FfiInboxState) = - ( - FfiConverterString.allocationSize(value.`inboxId`) + - FfiConverterString.allocationSize(value.`recoveryAddress`) + - FfiConverterSequenceByteArray.allocationSize(value.`installationIds`) + - FfiConverterSequenceString.allocationSize(value.`accountAddresses`) - ) + override fun allocationSize(value: FfiInboxState) = ( + FfiConverterString.allocationSize(value.`inboxId`) + + FfiConverterString.allocationSize(value.`recoveryAddress`) + + FfiConverterSequenceByteArray.allocationSize(value.`installationIds`) + + FfiConverterSequenceString.allocationSize(value.`accountAddresses`) + ) - override fun write( - value: FfiInboxState, - buf: ByteBuffer, - ) { + override fun write(value: FfiInboxState, buf: ByteBuffer) { FfiConverterString.write(value.`inboxId`, buf) FfiConverterString.write(value.`recoveryAddress`, buf) FfiConverterSequenceByteArray.write(value.`installationIds`, buf) @@ -6999,71 +7126,69 @@ public object FfiConverterTypeFfiInboxState : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiListConversationsOptions = - FfiListConversationsOptions( + override fun read(buf: ByteBuffer): FfiListConversationsOptions { + return FfiListConversationsOptions( FfiConverterOptionalLong.read(buf), FfiConverterOptionalLong.read(buf), FfiConverterOptionalLong.read(buf), ) + } - override fun allocationSize(value: FfiListConversationsOptions) = - ( - FfiConverterOptionalLong.allocationSize(value.`createdAfterNs`) + - FfiConverterOptionalLong.allocationSize(value.`createdBeforeNs`) + - FfiConverterOptionalLong.allocationSize(value.`limit`) - ) + override fun allocationSize(value: FfiListConversationsOptions) = ( + FfiConverterOptionalLong.allocationSize(value.`createdAfterNs`) + + FfiConverterOptionalLong.allocationSize(value.`createdBeforeNs`) + + FfiConverterOptionalLong.allocationSize(value.`limit`) + ) - override fun write( - value: FfiListConversationsOptions, - buf: ByteBuffer, - ) { + override fun write(value: FfiListConversationsOptions, buf: ByteBuffer) { FfiConverterOptionalLong.write(value.`createdAfterNs`, buf) FfiConverterOptionalLong.write(value.`createdBeforeNs`, buf) FfiConverterOptionalLong.write(value.`limit`, buf) } } + data class FfiListMessagesOptions( var `sentBeforeNs`: kotlin.Long?, var `sentAfterNs`: kotlin.Long?, var `limit`: kotlin.Long?, var `deliveryStatus`: FfiDeliveryStatus?, ) { + companion object } public object FfiConverterTypeFfiListMessagesOptions : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiListMessagesOptions = - FfiListMessagesOptions( + override fun read(buf: ByteBuffer): FfiListMessagesOptions { + return FfiListMessagesOptions( FfiConverterOptionalLong.read(buf), FfiConverterOptionalLong.read(buf), FfiConverterOptionalLong.read(buf), FfiConverterOptionalTypeFfiDeliveryStatus.read(buf), ) + } - override fun allocationSize(value: FfiListMessagesOptions) = - ( - FfiConverterOptionalLong.allocationSize(value.`sentBeforeNs`) + - FfiConverterOptionalLong.allocationSize(value.`sentAfterNs`) + - FfiConverterOptionalLong.allocationSize(value.`limit`) + - FfiConverterOptionalTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) - ) + override fun allocationSize(value: FfiListMessagesOptions) = ( + FfiConverterOptionalLong.allocationSize(value.`sentBeforeNs`) + + FfiConverterOptionalLong.allocationSize(value.`sentAfterNs`) + + FfiConverterOptionalLong.allocationSize(value.`limit`) + + FfiConverterOptionalTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) + ) - override fun write( - value: FfiListMessagesOptions, - buf: ByteBuffer, - ) { + override fun write(value: FfiListMessagesOptions, buf: ByteBuffer) { FfiConverterOptionalLong.write(value.`sentBeforeNs`, buf) FfiConverterOptionalLong.write(value.`sentAfterNs`, buf) FfiConverterOptionalLong.write(value.`limit`, buf) @@ -7071,6 +7196,7 @@ public object FfiConverterTypeFfiListMessagesOptions : } } + data class FfiMessage( var `id`: kotlin.ByteArray, var `sentAtNs`: kotlin.Long, @@ -7080,12 +7206,13 @@ data class FfiMessage( var `kind`: FfiGroupMessageKind, var `deliveryStatus`: FfiDeliveryStatus, ) { + companion object } public object FfiConverterTypeFfiMessage : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiMessage = - FfiMessage( + override fun read(buf: ByteBuffer): FfiMessage { + return FfiMessage( FfiConverterByteArray.read(buf), FfiConverterLong.read(buf), FfiConverterByteArray.read(buf), @@ -7094,22 +7221,19 @@ public object FfiConverterTypeFfiMessage : FfiConverterRustBuffer { FfiConverterTypeFfiGroupMessageKind.read(buf), FfiConverterTypeFfiDeliveryStatus.read(buf), ) + } - override fun allocationSize(value: FfiMessage) = - ( - FfiConverterByteArray.allocationSize(value.`id`) + - FfiConverterLong.allocationSize(value.`sentAtNs`) + - FfiConverterByteArray.allocationSize(value.`convoId`) + - FfiConverterString.allocationSize(value.`senderInboxId`) + - FfiConverterByteArray.allocationSize(value.`content`) + - FfiConverterTypeFfiGroupMessageKind.allocationSize(value.`kind`) + - FfiConverterTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) - ) + override fun allocationSize(value: FfiMessage) = ( + FfiConverterByteArray.allocationSize(value.`id`) + + FfiConverterLong.allocationSize(value.`sentAtNs`) + + FfiConverterByteArray.allocationSize(value.`convoId`) + + FfiConverterString.allocationSize(value.`senderInboxId`) + + FfiConverterByteArray.allocationSize(value.`content`) + + FfiConverterTypeFfiGroupMessageKind.allocationSize(value.`kind`) + + FfiConverterTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) + ) - override fun write( - value: FfiMessage, - buf: ByteBuffer, - ) { + override fun write(value: FfiMessage, buf: ByteBuffer) { FfiConverterByteArray.write(value.`id`, buf) FfiConverterLong.write(value.`sentAtNs`, buf) FfiConverterByteArray.write(value.`convoId`, buf) @@ -7120,39 +7244,39 @@ public object FfiConverterTypeFfiMessage : FfiConverterRustBuffer { } } + data class FfiPagingInfo( var `limit`: kotlin.UInt, var `cursor`: FfiCursor?, var `direction`: FfiSortDirection, ) { + companion object } public object FfiConverterTypeFfiPagingInfo : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiPagingInfo = - FfiPagingInfo( + override fun read(buf: ByteBuffer): FfiPagingInfo { + return FfiPagingInfo( FfiConverterUInt.read(buf), FfiConverterOptionalTypeFfiCursor.read(buf), FfiConverterTypeFfiSortDirection.read(buf), ) + } - override fun allocationSize(value: FfiPagingInfo) = - ( - FfiConverterUInt.allocationSize(value.`limit`) + - FfiConverterOptionalTypeFfiCursor.allocationSize(value.`cursor`) + - FfiConverterTypeFfiSortDirection.allocationSize(value.`direction`) - ) + override fun allocationSize(value: FfiPagingInfo) = ( + FfiConverterUInt.allocationSize(value.`limit`) + + FfiConverterOptionalTypeFfiCursor.allocationSize(value.`cursor`) + + FfiConverterTypeFfiSortDirection.allocationSize(value.`direction`) + ) - override fun write( - value: FfiPagingInfo, - buf: ByteBuffer, - ) { + override fun write(value: FfiPagingInfo, buf: ByteBuffer) { FfiConverterUInt.write(value.`limit`, buf) FfiConverterOptionalTypeFfiCursor.write(value.`cursor`, buf) FfiConverterTypeFfiSortDirection.write(value.`direction`, buf) } } + data class FfiPermissionPolicySet( var `addMemberPolicy`: FfiPermissionPolicy, var `removeMemberPolicy`: FfiPermissionPolicy, @@ -7163,13 +7287,14 @@ data class FfiPermissionPolicySet( var `updateGroupImageUrlSquarePolicy`: FfiPermissionPolicy, var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy, ) { + companion object } public object FfiConverterTypeFfiPermissionPolicySet : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiPermissionPolicySet = - FfiPermissionPolicySet( + override fun read(buf: ByteBuffer): FfiPermissionPolicySet { + return FfiPermissionPolicySet( FfiConverterTypeFfiPermissionPolicy.read(buf), FfiConverterTypeFfiPermissionPolicy.read(buf), FfiConverterTypeFfiPermissionPolicy.read(buf), @@ -7179,23 +7304,20 @@ public object FfiConverterTypeFfiPermissionPolicySet : FfiConverterTypeFfiPermissionPolicy.read(buf), FfiConverterTypeFfiPermissionPolicy.read(buf), ) + } + + override fun allocationSize(value: FfiPermissionPolicySet) = ( + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addMemberPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeMemberPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addAdminPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeAdminPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupNamePolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupDescriptionPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupImageUrlSquarePolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupPinnedFrameUrlPolicy`) + ) - override fun allocationSize(value: FfiPermissionPolicySet) = - ( - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addMemberPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeMemberPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addAdminPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeAdminPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupNamePolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupDescriptionPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupImageUrlSquarePolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupPinnedFrameUrlPolicy`) - ) - - override fun write( - value: FfiPermissionPolicySet, - buf: ByteBuffer, - ) { + override fun write(value: FfiPermissionPolicySet, buf: ByteBuffer) { FfiConverterTypeFfiPermissionPolicy.write(value.`addMemberPolicy`, buf) FfiConverterTypeFfiPermissionPolicy.write(value.`removeMemberPolicy`, buf) FfiConverterTypeFfiPermissionPolicy.write(value.`addAdminPolicy`, buf) @@ -7207,113 +7329,109 @@ public object FfiConverterTypeFfiPermissionPolicySet : } } + data class FfiPublishRequest( var `envelopes`: List, ) { + companion object } public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiPublishRequest = - FfiPublishRequest( + override fun read(buf: ByteBuffer): FfiPublishRequest { + return FfiPublishRequest( FfiConverterSequenceTypeFfiEnvelope.read(buf), ) + } - override fun allocationSize(value: FfiPublishRequest) = - ( - FfiConverterSequenceTypeFfiEnvelope.allocationSize(value.`envelopes`) - ) + override fun allocationSize(value: FfiPublishRequest) = ( + FfiConverterSequenceTypeFfiEnvelope.allocationSize(value.`envelopes`) + ) - override fun write( - value: FfiPublishRequest, - buf: ByteBuffer, - ) { + override fun write(value: FfiPublishRequest, buf: ByteBuffer) { FfiConverterSequenceTypeFfiEnvelope.write(value.`envelopes`, buf) } } + data class FfiV2BatchQueryRequest( var `requests`: List, ) { + companion object } public object FfiConverterTypeFfiV2BatchQueryRequest : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiV2BatchQueryRequest = - FfiV2BatchQueryRequest( + override fun read(buf: ByteBuffer): FfiV2BatchQueryRequest { + return FfiV2BatchQueryRequest( FfiConverterSequenceTypeFfiV2QueryRequest.read(buf), ) + } - override fun allocationSize(value: FfiV2BatchQueryRequest) = - ( - FfiConverterSequenceTypeFfiV2QueryRequest.allocationSize(value.`requests`) - ) + override fun allocationSize(value: FfiV2BatchQueryRequest) = ( + FfiConverterSequenceTypeFfiV2QueryRequest.allocationSize(value.`requests`) + ) - override fun write( - value: FfiV2BatchQueryRequest, - buf: ByteBuffer, - ) { + override fun write(value: FfiV2BatchQueryRequest, buf: ByteBuffer) { FfiConverterSequenceTypeFfiV2QueryRequest.write(value.`requests`, buf) } } + data class FfiV2BatchQueryResponse( var `responses`: List, ) { + companion object } public object FfiConverterTypeFfiV2BatchQueryResponse : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiV2BatchQueryResponse = - FfiV2BatchQueryResponse( + override fun read(buf: ByteBuffer): FfiV2BatchQueryResponse { + return FfiV2BatchQueryResponse( FfiConverterSequenceTypeFfiV2QueryResponse.read(buf), ) + } - override fun allocationSize(value: FfiV2BatchQueryResponse) = - ( - FfiConverterSequenceTypeFfiV2QueryResponse.allocationSize(value.`responses`) - ) + override fun allocationSize(value: FfiV2BatchQueryResponse) = ( + FfiConverterSequenceTypeFfiV2QueryResponse.allocationSize(value.`responses`) + ) - override fun write( - value: FfiV2BatchQueryResponse, - buf: ByteBuffer, - ) { + override fun write(value: FfiV2BatchQueryResponse, buf: ByteBuffer) { FfiConverterSequenceTypeFfiV2QueryResponse.write(value.`responses`, buf) } } + data class FfiV2QueryRequest( var `contentTopics`: List, var `startTimeNs`: kotlin.ULong, var `endTimeNs`: kotlin.ULong, var `pagingInfo`: FfiPagingInfo?, ) { + companion object } public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiV2QueryRequest = - FfiV2QueryRequest( + override fun read(buf: ByteBuffer): FfiV2QueryRequest { + return FfiV2QueryRequest( FfiConverterSequenceString.read(buf), FfiConverterULong.read(buf), FfiConverterULong.read(buf), FfiConverterOptionalTypeFfiPagingInfo.read(buf), ) + } - override fun allocationSize(value: FfiV2QueryRequest) = - ( - FfiConverterSequenceString.allocationSize(value.`contentTopics`) + - FfiConverterULong.allocationSize(value.`startTimeNs`) + - FfiConverterULong.allocationSize(value.`endTimeNs`) + - FfiConverterOptionalTypeFfiPagingInfo.allocationSize(value.`pagingInfo`) - ) + override fun allocationSize(value: FfiV2QueryRequest) = ( + FfiConverterSequenceString.allocationSize(value.`contentTopics`) + + FfiConverterULong.allocationSize(value.`startTimeNs`) + + FfiConverterULong.allocationSize(value.`endTimeNs`) + + FfiConverterOptionalTypeFfiPagingInfo.allocationSize(value.`pagingInfo`) + ) - override fun write( - value: FfiV2QueryRequest, - buf: ByteBuffer, - ) { + override fun write(value: FfiV2QueryRequest, buf: ByteBuffer) { FfiConverterSequenceString.write(value.`contentTopics`, buf) FfiConverterULong.write(value.`startTimeNs`, buf) FfiConverterULong.write(value.`endTimeNs`, buf) @@ -7321,384 +7439,341 @@ public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer, var `pagingInfo`: FfiPagingInfo?, ) { + companion object } public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiV2QueryResponse = - FfiV2QueryResponse( + override fun read(buf: ByteBuffer): FfiV2QueryResponse { + return FfiV2QueryResponse( FfiConverterSequenceTypeFfiEnvelope.read(buf), FfiConverterOptionalTypeFfiPagingInfo.read(buf), ) + } - override fun allocationSize(value: FfiV2QueryResponse) = - ( - FfiConverterSequenceTypeFfiEnvelope.allocationSize(value.`envelopes`) + - FfiConverterOptionalTypeFfiPagingInfo.allocationSize(value.`pagingInfo`) - ) + override fun allocationSize(value: FfiV2QueryResponse) = ( + FfiConverterSequenceTypeFfiEnvelope.allocationSize(value.`envelopes`) + + FfiConverterOptionalTypeFfiPagingInfo.allocationSize(value.`pagingInfo`) + ) - override fun write( - value: FfiV2QueryResponse, - buf: ByteBuffer, - ) { + override fun write(value: FfiV2QueryResponse, buf: ByteBuffer) { FfiConverterSequenceTypeFfiEnvelope.write(value.`envelopes`, buf) FfiConverterOptionalTypeFfiPagingInfo.write(value.`pagingInfo`, buf) } } + data class FfiV2SubscribeRequest( var `contentTopics`: List, ) { + companion object } public object FfiConverterTypeFfiV2SubscribeRequest : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FfiV2SubscribeRequest = - FfiV2SubscribeRequest( + override fun read(buf: ByteBuffer): FfiV2SubscribeRequest { + return FfiV2SubscribeRequest( FfiConverterSequenceString.read(buf), ) + } - override fun allocationSize(value: FfiV2SubscribeRequest) = - ( - FfiConverterSequenceString.allocationSize(value.`contentTopics`) - ) + override fun allocationSize(value: FfiV2SubscribeRequest) = ( + FfiConverterSequenceString.allocationSize(value.`contentTopics`) + ) - override fun write( - value: FfiV2SubscribeRequest, - buf: ByteBuffer, - ) { + override fun write(value: FfiV2SubscribeRequest, buf: ByteBuffer) { FfiConverterSequenceString.write(value.`contentTopics`, buf) } } + enum class FfiConsentEntityType { + GROUP_ID, INBOX_ID, - ADDRESS, - ; + ADDRESS; companion object } + public object FfiConverterTypeFfiConsentEntityType : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiConsentEntityType.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiConsentEntityType.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiConsentEntityType) = 4UL - override fun write( - value: FfiConsentEntityType, - buf: ByteBuffer, - ) { + override fun write(value: FfiConsentEntityType, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiConsentState { + UNKNOWN, ALLOWED, - DENIED, - ; + DENIED; companion object } + public object FfiConverterTypeFfiConsentState : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiConsentState.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiConsentState.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiConsentState) = 4UL - override fun write( - value: FfiConsentState, - buf: ByteBuffer, - ) { + override fun write(value: FfiConsentState, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiDeliveryStatus { + UNPUBLISHED, PUBLISHED, - FAILED, - ; + FAILED; companion object } + public object FfiConverterTypeFfiDeliveryStatus : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiDeliveryStatus.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiDeliveryStatus.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiDeliveryStatus) = 4UL - override fun write( - value: FfiDeliveryStatus, - buf: ByteBuffer, - ) { + override fun write(value: FfiDeliveryStatus, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiGroupMessageKind { + APPLICATION, - MEMBERSHIP_CHANGE, - ; + MEMBERSHIP_CHANGE; companion object } + public object FfiConverterTypeFfiGroupMessageKind : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiGroupMessageKind.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiGroupMessageKind.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiGroupMessageKind) = 4UL - override fun write( - value: FfiGroupMessageKind, - buf: ByteBuffer, - ) { + override fun write(value: FfiGroupMessageKind, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiGroupPermissionsOptions { + ALL_MEMBERS, ADMIN_ONLY, - CUSTOM_POLICY, - ; + CUSTOM_POLICY; companion object } + public object FfiConverterTypeFfiGroupPermissionsOptions : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiGroupPermissionsOptions.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiGroupPermissionsOptions.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiGroupPermissionsOptions) = 4UL - override fun write( - value: FfiGroupPermissionsOptions, - buf: ByteBuffer, - ) { + override fun write(value: FfiGroupPermissionsOptions, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiMetadataField { + GROUP_NAME, DESCRIPTION, IMAGE_URL_SQUARE, - PINNED_FRAME_URL, - ; + PINNED_FRAME_URL; companion object } + public object FfiConverterTypeFfiMetadataField : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiMetadataField.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiMetadataField.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiMetadataField) = 4UL - override fun write( - value: FfiMetadataField, - buf: ByteBuffer, - ) { + override fun write(value: FfiMetadataField, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiPermissionLevel { + MEMBER, ADMIN, - SUPER_ADMIN, - ; + SUPER_ADMIN; companion object } + public object FfiConverterTypeFfiPermissionLevel : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiPermissionLevel.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiPermissionLevel.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiPermissionLevel) = 4UL - override fun write( - value: FfiPermissionLevel, - buf: ByteBuffer, - ) { + override fun write(value: FfiPermissionLevel, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiPermissionPolicy { + ALLOW, DENY, ADMIN, SUPER_ADMIN, DOES_NOT_EXIST, - OTHER, - ; + OTHER; companion object } + public object FfiConverterTypeFfiPermissionPolicy : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiPermissionPolicy.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiPermissionPolicy.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiPermissionPolicy) = 4UL - override fun write( - value: FfiPermissionPolicy, - buf: ByteBuffer, - ) { + override fun write(value: FfiPermissionPolicy, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiPermissionUpdateType { + ADD_MEMBER, REMOVE_MEMBER, ADD_ADMIN, REMOVE_ADMIN, - UPDATE_METADATA, - ; + UPDATE_METADATA; companion object } + public object FfiConverterTypeFfiPermissionUpdateType : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiPermissionUpdateType.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiPermissionUpdateType.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiPermissionUpdateType) = 4UL - override fun write( - value: FfiPermissionUpdateType, - buf: ByteBuffer, - ) { + override fun write(value: FfiPermissionUpdateType, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } + enum class FfiSortDirection { + UNSPECIFIED, ASCENDING, - DESCENDING, - ; + DESCENDING; companion object } + public object FfiConverterTypeFfiSortDirection : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer) = - try { - FfiSortDirection.values()[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } + override fun read(buf: ByteBuffer) = try { + FfiSortDirection.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } override fun allocationSize(value: FfiSortDirection) = 4UL - override fun write( - value: FfiSortDirection, - buf: ByteBuffer, - ) { + override fun write(value: FfiSortDirection, buf: ByteBuffer) { buf.putInt(value.ordinal + 1) } } -sealed class GenericException( - message: String, -) : kotlin.Exception(message) { - class Client( - message: String, - ) : GenericException(message) - class ClientBuilder( - message: String, - ) : GenericException(message) +sealed class GenericException(message: String) : kotlin.Exception(message) { - class Storage( - message: String, - ) : GenericException(message) + class Client(message: String) : GenericException(message) - class ApiException( - message: String, - ) : GenericException(message) + class ClientBuilder(message: String) : GenericException(message) - class GroupException( - message: String, - ) : GenericException(message) + class Storage(message: String) : GenericException(message) - class Signature( - message: String, - ) : GenericException(message) + class ApiException(message: String) : GenericException(message) - class GroupMetadata( - message: String, - ) : GenericException(message) + class GroupException(message: String) : GenericException(message) - class GroupMutablePermissions( - message: String, - ) : GenericException(message) + class Signature(message: String) : GenericException(message) - class Generic( - message: String, - ) : GenericException(message) + class GroupMetadata(message: String) : GenericException(message) - class SignatureRequestException( - message: String, - ) : GenericException(message) + class GroupMutablePermissions(message: String) : GenericException(message) + + class Generic(message: String) : GenericException(message) + + class SignatureRequestException(message: String) : GenericException(message) + + class Erc1271SignatureException(message: String) : GenericException(message) - class Erc1271SignatureException( - message: String, - ) : GenericException(message) companion object ErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): GenericException = @@ -7707,8 +7782,9 @@ sealed class GenericException( } public object FfiConverterTypeGenericError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): GenericException = - when (buf.getInt()) { + override fun read(buf: ByteBuffer): GenericException { + + return when (buf.getInt()) { 1 -> GenericException.Client(FfiConverterString.read(buf)) 2 -> GenericException.ClientBuilder(FfiConverterString.read(buf)) 3 -> GenericException.Storage(FfiConverterString.read(buf)) @@ -7723,12 +7799,13 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer throw RuntimeException("invalid error enum value, something is very wrong!!") } - override fun allocationSize(value: GenericException): ULong = 4UL + } - override fun write( - value: GenericException, - buf: ByteBuffer, - ) { + override fun allocationSize(value: GenericException): ULong { + return 4UL + } + + override fun write(value: GenericException, buf: ByteBuffer) { when (value) { is GenericException.Client -> { buf.putInt(1) @@ -7786,14 +7863,14 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer { override fun lift(error_buf: RustBuffer.ByValue): SigningException = @@ -7802,18 +7879,20 @@ sealed class SigningException( } public object FfiConverterTypeSigningError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SigningException = - when (buf.getInt()) { + override fun read(buf: ByteBuffer): SigningException { + + return when (buf.getInt()) { 1 -> SigningException.Generic(FfiConverterString.read(buf)) else -> throw RuntimeException("invalid error enum value, something is very wrong!!") } - override fun allocationSize(value: SigningException): ULong = 4UL + } - override fun write( - value: SigningException, - buf: ByteBuffer, - ) { + override fun allocationSize(value: SigningException): ULong { + return 4UL + } + + override fun write(value: SigningException, buf: ByteBuffer) { when (value) { is SigningException.Generic -> { buf.putInt(1) @@ -7821,9 +7900,12 @@ public object FfiConverterTypeSigningError : FfiConverterRustBuffer : handleMap.remove(handle) } - override fun lift(value: Long): CallbackInterface = handleMap.get(value) + override fun lift(value: Long): CallbackInterface { + return handleMap.get(value) + } override fun read(buf: ByteBuffer) = lift(buf.getLong()) @@ -7854,10 +7938,7 @@ public abstract class FfiConverterCallbackInterface : override fun allocationSize(value: CallbackInterface) = 8UL - override fun write( - value: CallbackInterface, - buf: ByteBuffer, - ) { + override fun write(value: CallbackInterface, buf: ByteBuffer) { buf.putLong(lower(value)) } } @@ -7872,7 +7953,7 @@ internal object uniffiCallbackInterfaceFfiConversationCallback { uniffiCallStatus: UniffiRustCallStatus, ) { val uniffiObj = FfiConverterTypeFfiConversationCallback.handleMap.get(uniffiHandle) - val makeCall = { + val makeCall = { -> uniffiObj.`onConversation`( FfiConverterTypeFfiGroup.lift(`conversation`), ) @@ -7888,11 +7969,10 @@ internal object uniffiCallbackInterfaceFfiConversationCallback { } } - internal var vtable = - UniffiVTableCallbackInterfaceFfiConversationCallback.UniffiByValue( - `onConversation`, - uniffiFree, - ) + internal var vtable = UniffiVTableCallbackInterfaceFfiConversationCallback.UniffiByValue( + `onConversation`, + uniffiFree, + ) // Registers the foreign callback with the Rust side. // This method is generated for each callback interface. @@ -7905,7 +7985,9 @@ internal object uniffiCallbackInterfaceFfiConversationCallback { public object FfiConverterTypeFfiConversationCallback : FfiConverterCallbackInterface() + public interface FfiInboxOwner { + fun `getAddress`(): kotlin.String fun `sign`(`text`: kotlin.String): kotlin.ByteArray @@ -7913,6 +7995,7 @@ public interface FfiInboxOwner { companion object } + // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiInboxOwner { internal object `getAddress` : UniffiCallbackInterfaceFfiInboxOwnerMethod0 { @@ -7922,7 +8005,10 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { uniffiCallStatus: UniffiRustCallStatus, ) { val uniffiObj = FfiConverterTypeFfiInboxOwner.handleMap.get(uniffiHandle) - val makeCall = { uniffiObj.`getAddress`() } + val makeCall = { -> + uniffiObj.`getAddress`( + ) + } val writeReturn = { value: kotlin.String -> uniffiOutReturn.setValue(FfiConverterString.lower(value)) } uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) @@ -7937,7 +8023,7 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { uniffiCallStatus: UniffiRustCallStatus, ) { val uniffiObj = FfiConverterTypeFfiInboxOwner.handleMap.get(uniffiHandle) - val makeCall = { + val makeCall = { -> uniffiObj.`sign`( FfiConverterString.lift(`text`), ) @@ -7951,7 +8037,7 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { uniffiCallStatus, makeCall, writeReturn, - { e: SigningException -> FfiConverterTypeSigningError.lower(e) }, + { e: SigningException -> FfiConverterTypeSigningError.lower(e) } ) } } @@ -7962,12 +8048,11 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { } } - internal var vtable = - UniffiVTableCallbackInterfaceFfiInboxOwner.UniffiByValue( - `getAddress`, - `sign`, - uniffiFree, - ) + internal var vtable = UniffiVTableCallbackInterfaceFfiInboxOwner.UniffiByValue( + `getAddress`, + `sign`, + uniffiFree, + ) // Registers the foreign callback with the Rust side. // This method is generated for each callback interface. @@ -7979,16 +8064,15 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { // The ffiConverter which transforms the Callbacks in to handles to pass to Rust. public object FfiConverterTypeFfiInboxOwner : FfiConverterCallbackInterface() + public interface FfiLogger { - fun `log`( - `level`: kotlin.UInt, - `levelLabel`: kotlin.String, - `message`: kotlin.String, - ) + + fun `log`(`level`: kotlin.UInt, `levelLabel`: kotlin.String, `message`: kotlin.String) companion object } + // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiLogger { internal object `log` : UniffiCallbackInterfaceFfiLoggerMethod0 { @@ -8001,7 +8085,7 @@ internal object uniffiCallbackInterfaceFfiLogger { uniffiCallStatus: UniffiRustCallStatus, ) { val uniffiObj = FfiConverterTypeFfiLogger.handleMap.get(uniffiHandle) - val makeCall = { + val makeCall = { -> uniffiObj.`log`( FfiConverterUInt.lift(`level`), FfiConverterString.lift(`levelLabel`), @@ -8019,11 +8103,10 @@ internal object uniffiCallbackInterfaceFfiLogger { } } - internal var vtable = - UniffiVTableCallbackInterfaceFfiLogger.UniffiByValue( - `log`, - uniffiFree, - ) + internal var vtable = UniffiVTableCallbackInterfaceFfiLogger.UniffiByValue( + `log`, + uniffiFree, + ) // Registers the foreign callback with the Rust side. // This method is generated for each callback interface. @@ -8035,12 +8118,15 @@ internal object uniffiCallbackInterfaceFfiLogger { // The ffiConverter which transforms the Callbacks in to handles to pass to Rust. public object FfiConverterTypeFfiLogger : FfiConverterCallbackInterface() + public interface FfiMessageCallback { + fun `onMessage`(`message`: FfiMessage) companion object } + // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiMessageCallback { internal object `onMessage` : UniffiCallbackInterfaceFfiMessageCallbackMethod0 { @@ -8051,7 +8137,7 @@ internal object uniffiCallbackInterfaceFfiMessageCallback { uniffiCallStatus: UniffiRustCallStatus, ) { val uniffiObj = FfiConverterTypeFfiMessageCallback.handleMap.get(uniffiHandle) - val makeCall = { + val makeCall = { -> uniffiObj.`onMessage`( FfiConverterTypeFfiMessage.lift(`message`), ) @@ -8067,11 +8153,10 @@ internal object uniffiCallbackInterfaceFfiMessageCallback { } } - internal var vtable = - UniffiVTableCallbackInterfaceFfiMessageCallback.UniffiByValue( - `onMessage`, - uniffiFree, - ) + internal var vtable = UniffiVTableCallbackInterfaceFfiMessageCallback.UniffiByValue( + `onMessage`, + uniffiFree, + ) // Registers the foreign callback with the Rust side. // This method is generated for each callback interface. @@ -8084,12 +8169,15 @@ internal object uniffiCallbackInterfaceFfiMessageCallback { public object FfiConverterTypeFfiMessageCallback : FfiConverterCallbackInterface() + public interface FfiV2SubscriptionCallback { + fun `onMessage`(`message`: FfiEnvelope) companion object } + // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { internal object `onMessage` : UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod0 { @@ -8100,7 +8188,7 @@ internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { uniffiCallStatus: UniffiRustCallStatus, ) { val uniffiObj = FfiConverterTypeFfiV2SubscriptionCallback.handleMap.get(uniffiHandle) - val makeCall = { + val makeCall = { -> uniffiObj.`onMessage`( FfiConverterTypeFfiEnvelope.lift(`message`), ) @@ -8116,11 +8204,10 @@ internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { } } - internal var vtable = - UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback.UniffiByValue( - `onMessage`, - uniffiFree, - ) + internal var vtable = UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback.UniffiByValue( + `onMessage`, + uniffiFree, + ) // Registers the foreign callback with the Rust side. // This method is generated for each callback interface. @@ -8133,6 +8220,7 @@ internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { public object FfiConverterTypeFfiV2SubscriptionCallback : FfiConverterCallbackInterface() + public object FfiConverterOptionalLong : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.Long? { if (buf.get().toInt() == 0) { @@ -8149,10 +8237,7 @@ public object FfiConverterOptionalLong : FfiConverterRustBuffer { } } - override fun write( - value: kotlin.Long?, - buf: ByteBuffer, - ) { + override fun write(value: kotlin.Long?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { @@ -8162,6 +8247,7 @@ public object FfiConverterOptionalLong : FfiConverterRustBuffer { } } + public object FfiConverterOptionalString : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.String? { if (buf.get().toInt() == 0) { @@ -8178,10 +8264,7 @@ public object FfiConverterOptionalString : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.ByteArray? { if (buf.get().toInt() == 0) { @@ -8207,10 +8291,7 @@ public object FfiConverterOptionalByteArray : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiSignatureRequest? { @@ -8237,10 +8319,7 @@ public object FfiConverterOptionalTypeFfiSignatureRequest : } } - override fun write( - value: FfiSignatureRequest?, - buf: ByteBuffer, - ) { + override fun write(value: FfiSignatureRequest?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { @@ -8250,6 +8329,7 @@ public object FfiConverterOptionalTypeFfiSignatureRequest : } } + public object FfiConverterOptionalTypeFfiCursor : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiCursor? { if (buf.get().toInt() == 0) { @@ -8266,10 +8346,7 @@ public object FfiConverterOptionalTypeFfiCursor : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPagingInfo? { if (buf.get().toInt() == 0) { @@ -8295,10 +8373,7 @@ public object FfiConverterOptionalTypeFfiPagingInfo : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPermissionPolicySet? { @@ -8325,10 +8401,7 @@ public object FfiConverterOptionalTypeFfiPermissionPolicySet : } } - override fun write( - value: FfiPermissionPolicySet?, - buf: ByteBuffer, - ) { + override fun write(value: FfiPermissionPolicySet?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { @@ -8338,6 +8411,7 @@ public object FfiConverterOptionalTypeFfiPermissionPolicySet : } } + public object FfiConverterOptionalTypeFfiDeliveryStatus : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiDeliveryStatus? { @@ -8355,10 +8429,7 @@ public object FfiConverterOptionalTypeFfiDeliveryStatus : } } - override fun write( - value: FfiDeliveryStatus?, - buf: ByteBuffer, - ) { + override fun write(value: FfiDeliveryStatus?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { @@ -8368,6 +8439,7 @@ public object FfiConverterOptionalTypeFfiDeliveryStatus : } } + public object FfiConverterOptionalTypeFfiGroupPermissionsOptions : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiGroupPermissionsOptions? { @@ -8385,10 +8457,7 @@ public object FfiConverterOptionalTypeFfiGroupPermissionsOptions : } } - override fun write( - value: FfiGroupPermissionsOptions?, - buf: ByteBuffer, - ) { + override fun write(value: FfiGroupPermissionsOptions?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { @@ -8398,6 +8467,7 @@ public object FfiConverterOptionalTypeFfiGroupPermissionsOptions : } } + public object FfiConverterOptionalTypeFfiMetadataField : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiMetadataField? { if (buf.get().toInt() == 0) { @@ -8414,10 +8484,7 @@ public object FfiConverterOptionalTypeFfiMetadataField : FfiConverterRustBuffer< } } - override fun write( - value: FfiMetadataField?, - buf: ByteBuffer, - ) { + override fun write(value: FfiMetadataField?, buf: ByteBuffer) { if (value == null) { buf.put(0) } else { @@ -8427,6 +8494,7 @@ public object FfiConverterOptionalTypeFfiMetadataField : FfiConverterRustBuffer< } } + public object FfiConverterSequenceString : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() @@ -8441,10 +8509,7 @@ public object FfiConverterSequenceString : FfiConverterRustBuffer, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterString.write(it, buf) @@ -8452,6 +8517,7 @@ public object FfiConverterSequenceString : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() @@ -8466,10 +8532,7 @@ public object FfiConverterSequenceByteArray : FfiConverterRustBuffer, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterByteArray.write(it, buf) @@ -8477,6 +8540,7 @@ public object FfiConverterSequenceByteArray : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() @@ -8491,10 +8555,7 @@ public object FfiConverterSequenceTypeFfiGroup : FfiConverterRustBuffer, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiGroup.write(it, buf) @@ -8502,6 +8563,7 @@ public object FfiConverterSequenceTypeFfiGroup : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() @@ -8516,10 +8578,7 @@ public object FfiConverterSequenceTypeFfiConsent : FfiConverterRustBuffer, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiConsent.write(it, buf) @@ -8527,6 +8586,7 @@ public object FfiConverterSequenceTypeFfiConsent : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() @@ -8541,10 +8601,7 @@ public object FfiConverterSequenceTypeFfiEnvelope : FfiConverterRustBuffer, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiEnvelope.write(it, buf) @@ -8552,6 +8609,7 @@ public object FfiConverterSequenceTypeFfiEnvelope : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { @@ -8567,10 +8625,7 @@ public object FfiConverterSequenceTypeFfiGroupMember : return sizeForLength + sizeForItems } - override fun write( - value: List, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiGroupMember.write(it, buf) @@ -8578,6 +8633,7 @@ public object FfiConverterSequenceTypeFfiGroupMember : } } + public object FfiConverterSequenceTypeFfiMessage : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() @@ -8592,10 +8648,7 @@ public object FfiConverterSequenceTypeFfiMessage : FfiConverterRustBuffer, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiMessage.write(it, buf) @@ -8603,6 +8656,7 @@ public object FfiConverterSequenceTypeFfiMessage : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { @@ -8618,10 +8672,7 @@ public object FfiConverterSequenceTypeFfiV2QueryRequest : return sizeForLength + sizeForItems } - override fun write( - value: List, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiV2QueryRequest.write(it, buf) @@ -8629,6 +8680,7 @@ public object FfiConverterSequenceTypeFfiV2QueryRequest : } } + public object FfiConverterSequenceTypeFfiV2QueryResponse : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { @@ -8644,10 +8696,7 @@ public object FfiConverterSequenceTypeFfiV2QueryResponse : return sizeForLength + sizeForItems } - override fun write( - value: List, - buf: ByteBuffer, - ) { + override fun write(value: List, buf: ByteBuffer) { buf.putInt(value.size) value.iterator().forEach { FfiConverterTypeFfiV2QueryResponse.write(it, buf) @@ -8655,6 +8704,7 @@ public object FfiConverterSequenceTypeFfiV2QueryResponse : } } + public object FfiConverterMapStringBoolean : FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): Map { @@ -8670,19 +8720,14 @@ public object FfiConverterMapStringBoolean : override fun allocationSize(value: Map): ULong { val spaceForMapSize = 4UL - val spaceForChildren = - value - .map { (k, v) -> - FfiConverterString.allocationSize(k) + - FfiConverterBoolean.allocationSize(v) - }.sum() + val spaceForChildren = value.map { (k, v) -> + FfiConverterString.allocationSize(k) + + FfiConverterBoolean.allocationSize(v) + }.sum() return spaceForMapSize + spaceForChildren } - override fun write( - value: Map, - buf: ByteBuffer, - ) { + override fun write(value: Map, buf: ByteBuffer) { buf.putInt(value.size) // The parens on `(k, v)` here ensure we're calling the right method, // which is important for compatibility with older android devices. @@ -8694,6 +8739,7 @@ public object FfiConverterMapStringBoolean : } } + /** * It returns a new client of the specified `inbox_id`. * Note that the `inbox_id` must be either brand new or already associated with the `account_address`. @@ -8728,10 +8774,12 @@ suspend fun `createClient`( `nonce`: kotlin.ULong, `legacySignedPrivateKeyProto`: kotlin.ByteArray?, `historySyncUrl`: kotlin.String?, -): FfiXmtpClient = - uniffiRustCallAsync( +): FfiXmtpClient { + return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_client( - FfiConverterTypeFfiLogger.lower(`logger`), + FfiConverterTypeFfiLogger.lower( + `logger` + ), FfiConverterString.lower(`host`), FfiConverterBoolean.lower(`isSecure`), FfiConverterOptionalString.lower(`db`), @@ -8761,17 +8809,15 @@ suspend fun `createClient`( // Error FFI converter GenericException.ErrorHandler, ) +} @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") -suspend fun `createV2Client`( - `host`: kotlin.String, - `isSecure`: kotlin.Boolean, -): FfiV2ApiClient = - uniffiRustCallAsync( +suspend fun `createV2Client`(`host`: kotlin.String, `isSecure`: kotlin.Boolean): FfiV2ApiClient { + return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_v2_client( FfiConverterString.lower(`host`), - FfiConverterBoolean.lower(`isSecure`) + FfiConverterBoolean.lower(`isSecure`), ), { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( @@ -8792,46 +8838,48 @@ suspend fun `createV2Client`( // Error FFI converter GenericException.ErrorHandler, ) +} @Throws(GenericException::class) fun `diffieHellmanK256`( `privateKeyBytes`: kotlin.ByteArray, `publicKeyBytes`: kotlin.ByteArray, -): kotlin.ByteArray = - FfiConverterByteArray.lift( +): kotlin.ByteArray { + return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_diffie_hellman_k256( FfiConverterByteArray.lower(`privateKeyBytes`), FfiConverterByteArray.lower(`publicKeyBytes`), - _status, + _status ) - }, + } ) +} -fun `generateInboxId`( - `accountAddress`: kotlin.String, - `nonce`: kotlin.ULong, -): kotlin.String = - FfiConverterString.lift( - uniffiRustCall { _status -> +fun `generateInboxId`(`accountAddress`: kotlin.String, `nonce`: kotlin.ULong): kotlin.String { + return FfiConverterString.lift( + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_generate_inbox_id( FfiConverterString.lower(`accountAddress`), FfiConverterULong.lower(`nonce`), - _status, + _status ) - }, + } ) +} + @Throws(GenericException::class) -fun `generatePrivatePreferencesTopicIdentifier`(`privateKey`: kotlin.ByteArray): kotlin.String = - FfiConverterString.lift( +fun `generatePrivatePreferencesTopicIdentifier`(`privateKey`: kotlin.ByteArray): kotlin.String { + return FfiConverterString.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_generate_private_preferences_topic_identifier( - FfiConverterByteArray.lower(`privateKey`), - _status, + FfiConverterByteArray.lower(`privateKey`), _status ) - }, + } ) +} + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") @@ -8840,10 +8888,12 @@ suspend fun `getInboxIdForAddress`( `host`: kotlin.String, `isSecure`: kotlin.Boolean, `accountAddress`: kotlin.String, -): kotlin.String? = - uniffiRustCallAsync( +): kotlin.String? { + return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_inbox_id_for_address( - FfiConverterTypeFfiLogger.lower(`logger`), + FfiConverterTypeFfiLogger.lower( + `logger` + ), FfiConverterString.lower(`host`), FfiConverterBoolean.lower(`isSecure`), FfiConverterString.lower(`accountAddress`), @@ -8867,125 +8917,139 @@ suspend fun `getInboxIdForAddress`( // Error FFI converter GenericException.ErrorHandler, ) +} -fun `getVersionInfo`(): kotlin.String = - FfiConverterString.lift( - uniffiRustCall { _status -> +fun `getVersionInfo`(): kotlin.String { + return FfiConverterString.lift( + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_version_info( - _status, + _status ) - }, + } ) +} -fun `keccak256`(`input`: kotlin.ByteArray): kotlin.ByteArray = - FfiConverterByteArray.lift( - uniffiRustCall { _status -> +fun `keccak256`(`input`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_keccak256( - FfiConverterByteArray.lower(`input`), - _status, + FfiConverterByteArray.lower(`input`), _status ) - }, + } ) +} + @Throws(GenericException::class) -fun `publicKeyFromPrivateKeyK256`(`privateKeyBytes`: kotlin.ByteArray): kotlin.ByteArray = - FfiConverterByteArray.lift( +fun `publicKeyFromPrivateKeyK256`(`privateKeyBytes`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_public_key_from_private_key_k256( - FfiConverterByteArray.lower(`privateKeyBytes`), - _status, + FfiConverterByteArray.lower(`privateKeyBytes`), _status ) - }, + } ) +} + @Throws(GenericException::class) fun `recoverAddress`( `signatureBytes`: kotlin.ByteArray, `predigestMessage`: kotlin.String, -): kotlin.String = - FfiConverterString.lift( +): kotlin.String { + return FfiConverterString.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_address( FfiConverterByteArray.lower(`signatureBytes`), FfiConverterString.lower(`predigestMessage`), - _status, + _status ) - }, + } ) +} + @Throws(GenericException::class) fun `recoverPublicKeyK256Keccak256`( `message`: kotlin.ByteArray, `signature`: kotlin.ByteArray, -): kotlin.ByteArray = - FfiConverterByteArray.lift( +): kotlin.ByteArray { + return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_public_key_k256_keccak256( FfiConverterByteArray.lower(`message`), FfiConverterByteArray.lower(`signature`), - _status, + _status ) - }, + } ) +} + @Throws(GenericException::class) fun `recoverPublicKeyK256Sha256`( `message`: kotlin.ByteArray, `signature`: kotlin.ByteArray, -): kotlin.ByteArray = - FfiConverterByteArray.lift( +): kotlin.ByteArray { + return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_public_key_k256_sha256( FfiConverterByteArray.lower(`message`), FfiConverterByteArray.lower(`signature`), - _status, + _status ) - }, + } ) +} -fun `sha256`(`input`: kotlin.ByteArray): kotlin.ByteArray = - FfiConverterByteArray.lift( - uniffiRustCall { _status -> +fun `sha256`(`input`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCall() { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_sha256( - FfiConverterByteArray.lower(`input`), - _status, + FfiConverterByteArray.lower(`input`), _status ) - }, + } ) +} + @Throws(GenericException::class) fun `userPreferencesDecrypt`( `publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, `message`: kotlin.ByteArray, -): kotlin.ByteArray = - FfiConverterByteArray.lift( +): kotlin.ByteArray { + return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_user_preferences_decrypt( FfiConverterByteArray.lower(`publicKey`), FfiConverterByteArray.lower(`privateKey`), FfiConverterByteArray.lower(`message`), - _status, + _status ) - }, + } ) +} + @Throws(GenericException::class) fun `userPreferencesEncrypt`( `publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, `message`: kotlin.ByteArray, -): kotlin.ByteArray = - FfiConverterByteArray.lift( +): kotlin.ByteArray { + return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_user_preferences_encrypt( FfiConverterByteArray.lower(`publicKey`), FfiConverterByteArray.lower(`privateKey`), FfiConverterByteArray.lower(`message`), - _status, + _status ) - }, + } ) +} + @Throws(GenericException::class) fun `verifyK256Sha256`( @@ -8993,15 +9057,19 @@ fun `verifyK256Sha256`( `message`: kotlin.ByteArray, `signature`: kotlin.ByteArray, `recoveryId`: kotlin.UByte, -): kotlin.Boolean = - FfiConverterBoolean.lift( +): kotlin.Boolean { + return FfiConverterBoolean.lift( uniffiRustCallWithError(GenericException) { _status -> UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_verify_k256_sha256( FfiConverterByteArray.lower(`signedBy`), FfiConverterByteArray.lower(`message`), FfiConverterByteArray.lower(`signature`), FfiConverterUByte.lower(`recoveryId`), - _status, + _status ) - }, + } ) +} + + +