Skip to content

Commit

Permalink
Bump SDK version to 0.2.8 (matrix-rust-sdk to 88a8a7007ca34408af21c7e…
Browse files Browse the repository at this point in the history
…0bee81b2c344b155c)
  • Loading branch information
github-actions committed Mar 12, 2024
1 parent e8dbf39 commit 99d4e23
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 1 deletion.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/BuildVersionsSDK.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object BuildVersionsSDK {
const val majorVersion = 0
const val minorVersion = 2
const val patchVersion = 7
const val patchVersion = 8
}
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ internal interface UniffiCallbackInterfaceTimelineListenerMethod0 : com.sun.jna.
internal interface UniffiCallbackInterfaceTypingNotificationsListenerMethod0 : com.sun.jna.Callback {
fun callback(`uniffiHandle`: Long,`typingUserIds`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,)
}
internal interface UniffiCallbackInterfaceVerificationStateListenerMethod0 : com.sun.jna.Callback {
fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,)
}
internal interface UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 : com.sun.jna.Callback {
fun callback(`uniffiHandle`: Long,`capabilities`: RustBuffer.ByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,)
}
Expand Down Expand Up @@ -799,6 +802,22 @@ internal open class UniffiVTableCallbackInterfaceTypingNotificationsListener(
`uniffiFree` = other.`uniffiFree`
}

}
@Structure.FieldOrder("onUpdate", "uniffiFree")
internal open class UniffiVTableCallbackInterfaceVerificationStateListener(
@JvmField internal var `onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0? = null,
@JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null,
) : Structure() {
class UniffiByValue(
`onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0? = null,
`uniffiFree`: UniffiCallbackInterfaceFree? = null,
): UniffiVTableCallbackInterfaceVerificationStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue

internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceVerificationStateListener) {
`onUpdate` = other.`onUpdate`
`uniffiFree` = other.`uniffiFree`
}

}
@Structure.FieldOrder("acquireCapabilities", "uniffiFree")
internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
Expand Down Expand Up @@ -1600,6 +1619,14 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(














Expand Down Expand Up @@ -1638,6 +1665,7 @@ internal interface UniffiLib : Library {
uniffiCallbackInterfaceSyncServiceStateObserver.register(lib)
uniffiCallbackInterfaceTimelineListener.register(lib)
uniffiCallbackInterfaceTypingNotificationsListener.register(lib)
uniffiCallbackInterfaceVerificationStateListener.register(lib)
uniffiCallbackInterfaceWidgetCapabilitiesProvider.register(lib)
}
}
Expand Down Expand Up @@ -1822,6 +1850,10 @@ internal interface UniffiLib : Library {
): Pointer
fun uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key(`ptr`: Pointer,
): Long
fun uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
): RustBuffer.ByValue
fun uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state(`ptr`: Pointer,`progressListener`: RustBuffer.ByValue,
): Long
fun uniffi_matrix_sdk_ffi_fn_clone_eventtimelineitem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
Expand Down Expand Up @@ -2224,6 +2256,8 @@ internal interface UniffiLib : Library {
): Long
fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock(`ptr`: Pointer,`appIdentifier`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_unified_invites_in_room_list(`ptr`: Pointer,`withUnifiedInvites`: Byte,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_matrix_sdk_ffi_fn_clone_taskhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_matrix_sdk_ffi_fn_free_taskhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
Expand Down Expand Up @@ -2412,6 +2446,8 @@ internal interface UniffiLib : Library {
): Unit
fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener(`vtable`: UniffiVTableCallbackInterfaceTypingNotificationsListener,
): Unit
fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener(`vtable`: UniffiVTableCallbackInterfaceVerificationStateListener,
): Unit
fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider(`vtable`: UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider,
): Unit
fun uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id(uniffi_out_err: UniffiRustCallStatus,
Expand Down Expand Up @@ -2738,6 +2774,10 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_eventtimelineitem_can_be_replied_to(
Expand Down Expand Up @@ -3056,6 +3096,8 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_unified_invites_in_room_list(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished(
Expand Down Expand Up @@ -3228,6 +3270,8 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities(
): Short
fun ffi_matrix_sdk_ffi_uniffi_contract_version(
Expand Down Expand Up @@ -3514,6 +3558,12 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 20380.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29114.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() != 26187.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() != 16813.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -3991,6 +4041,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() != 43169.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_unified_invites_in_room_list() != 46590.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() != 9124.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -4249,6 +4302,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 50844.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() != 9392.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() != 43759.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -6373,6 +6429,10 @@ public interface EncryptionInterface {

suspend fun `resetRecoveryKey`(): String

fun `verificationState`(): VerificationState

fun `verificationStateListener`(`listener`: VerificationStateListener): TaskHandle

suspend fun `waitForBackupUploadSteadyState`(`progressListener`: BackupSteadyStateListener?)

companion object
Expand Down Expand Up @@ -6677,6 +6737,28 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface {
RecoveryException.ErrorHandler,
)
}
override fun `verificationState`(): VerificationState =
callWithPointer {
uniffiRustCall() { _status ->
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state(it,

_status)
}
}.let {
FfiConverterTypeVerificationState.lift(it)
}

override fun `verificationStateListener`(`listener`: VerificationStateListener): TaskHandle =
callWithPointer {
uniffiRustCall() { _status ->
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener(it,
FfiConverterTypeVerificationStateListener.lower(`listener`),
_status)
}
}.let {
FfiConverterTypeTaskHandle.lift(it)
}


@Throws(SteadyStateException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
Expand Down Expand Up @@ -14579,6 +14661,8 @@ public interface SyncServiceBuilderInterface {

fun `withCrossProcessLock`(`appIdentifier`: String?): SyncServiceBuilder

fun `withUnifiedInvitesInRoomList`(`withUnifiedInvites`: Boolean): SyncServiceBuilder

companion object
}

Expand Down Expand Up @@ -14694,6 +14778,17 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte
FfiConverterTypeSyncServiceBuilder.lift(it)
}

override fun `withUnifiedInvitesInRoomList`(`withUnifiedInvites`: Boolean): SyncServiceBuilder =
callWithPointer {
uniffiRustCall() { _status ->
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_unified_invites_in_room_list(it,
FfiConverterBoolean.lower(`withUnifiedInvites`),
_status)
}
}.let {
FfiConverterTypeSyncServiceBuilder.lift(it)
}




Expand Down Expand Up @@ -25914,6 +26009,32 @@ public object FfiConverterTypeTimelineItemContentKind : FfiConverterRustBuffer<T



enum class VerificationState {

UNKNOWN,
VERIFIED,
UNVERIFIED;
companion object
}

public object FfiConverterTypeVerificationState: FfiConverterRustBuffer<VerificationState> {
override fun read(buf: ByteBuffer) = try {
VerificationState.values()[buf.getInt() - 1]
} catch (e: IndexOutOfBoundsException) {
throw RuntimeException("invalid enum value, something is very wrong!!", e)
}

override fun allocationSize(value: VerificationState) = 4

override fun write(value: VerificationState, buf: ByteBuffer) {
buf.putInt(value.ordinal + 1)
}
}





/**
* A [`TimelineItem`](super::TimelineItem) that doesn't correspond to an event.
*/
Expand Down Expand Up @@ -27192,6 +27313,55 @@ public object FfiConverterTypeTypingNotificationsListener: FfiConverterCallbackI



public interface VerificationStateListener {

fun `onUpdate`(`status`: VerificationState)

companion object
}



// Put the implementation in an object so we don't pollute the top-level namespace
internal object uniffiCallbackInterfaceVerificationStateListener {
internal object `onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0 {
override fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) {
val uniffiObj = FfiConverterTypeVerificationStateListener.handleMap.get(uniffiHandle)
val makeCall = { ->
uniffiObj.`onUpdate`(
FfiConverterTypeVerificationState.lift(`status`),
)
}
val writeReturn = { _: Unit -> Unit }
uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn)
}
}

internal object uniffiFree: UniffiCallbackInterfaceFree {
override fun callback(handle: Long) {
FfiConverterTypeVerificationStateListener.handleMap.remove(handle)
}
}

internal var vtable = UniffiVTableCallbackInterfaceVerificationStateListener(
`onUpdate`,
uniffiFree
)

// Registers the foreign callback with the Rust side.
// This method is generated for each callback interface.
internal fun register(lib: UniffiLib) {
lib.uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener(vtable)
}
}

// The ffiConverter which transforms the Callbacks in to handles to pass to Rust.
public object FfiConverterTypeVerificationStateListener: FfiConverterCallbackInterface<VerificationStateListener>()





public interface WidgetCapabilitiesProvider {

fun `acquireCapabilities`(`capabilities`: WidgetCapabilities): WidgetCapabilities
Expand Down

0 comments on commit 99d4e23

Please sign in to comment.