Skip to content

Commit

Permalink
fix: pull latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
tuddman committed Jul 24, 2024
1 parent 79f1edb commit c648dc0
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 28 deletions.
4 changes: 2 additions & 2 deletions library/src/main/java/libxmtp-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 211e87cd
Version: 5641e261
Branch: st/fix-openssl-binding
Date: 2024-07-24 19:07:41 +0000
Date: 2024-07-24 20:22:11 +0000
82 changes: 56 additions & 26 deletions library/src/main/java/xmtpv3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ interface UniffiRustCallStatusErrorHandler<E> {
// Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err
private inline fun <U, E : Exception> uniffiRustCallWithError(
errorHandler: UniffiRustCallStatusErrorHandler<E>,
callback: (UniffiRustCallStatus) -> U
callback: (UniffiRustCallStatus) -> U,
): U {
var status = UniffiRustCallStatus()
val return_value = callback(status)
Expand All @@ -286,7 +286,7 @@ private inline fun <U, E : Exception> uniffiRustCallWithError(
// Check UniffiRustCallStatus and throw an error if the call wasn't successful
private fun <E : Exception> uniffiCheckCallStatus(
errorHandler: UniffiRustCallStatusErrorHandler<E>,
status: UniffiRustCallStatus
status: UniffiRustCallStatus,
) {
if (status.isSuccess()) {
return
Expand Down Expand Up @@ -335,7 +335,7 @@ internal inline fun <T, reified E : Throwable> uniffiTraitInterfaceCallWithError
callStatus: UniffiRustCallStatus,
makeCall: () -> T,
writeReturn: (T) -> Unit,
lowerError: (E) -> RustBuffer.ByValue
lowerError: (E) -> RustBuffer.ByValue,
) {
try {
writeReturn(makeCall())
Expand Down Expand Up @@ -2212,7 +2212,7 @@ internal suspend fun <T, F, E : Exception> uniffiRustCallAsync(
completeFunc: (Long, UniffiRustCallStatus) -> F,
freeFunc: (Long) -> Unit,
liftFunc: (F) -> T,
errorHandler: UniffiRustCallStatusErrorHandler<E>
errorHandler: UniffiRustCallStatusErrorHandler<E>,
): T {
try {
do {
Expand Down Expand Up @@ -2595,15 +2595,15 @@ private class JavaLangRefCleaner : UniffiCleaner {
}

private class JavaLangRefCleanable(
val cleanable: java.lang.ref.Cleaner.Cleanable
val cleanable: java.lang.ref.Cleaner.Cleanable,
) : UniffiCleaner.Cleanable {
override fun clean() = cleanable.clean()
}

public interface FfiConversationsInterface {
suspend fun `createGroup`(
`accountAddresses`: List<kotlin.String>,
`opts`: FfiCreateGroupOptions
`opts`: FfiCreateGroupOptions,
): FfiGroup

suspend fun `list`(`opts`: FfiListConversationsOptions): List<FfiGroup>
Expand Down Expand Up @@ -3025,7 +3025,7 @@ public interface FfiGroupInterface {
suspend fun `updatePermissionPolicy`(
`permissionUpdateType`: FfiPermissionUpdateType,
`permissionPolicyOption`: FfiPermissionPolicy,
`metadataField`: FfiMetadataField?
`metadataField`: FfiMetadataField?,
)

companion object
Expand Down Expand Up @@ -4343,7 +4343,7 @@ public interface FfiSignatureRequestInterface {
suspend fun `addScwSignature`(
`signatureBytes`: kotlin.ByteArray,
`address`: kotlin.String,
`chainRpcUrl`: kotlin.String
`chainRpcUrl`: kotlin.String,
)

suspend fun `isReady`(): kotlin.Boolean
Expand Down Expand Up @@ -4961,7 +4961,7 @@ public interface FfiV2ApiClientInterface {

suspend fun `subscribe`(
`request`: FfiV2SubscribeRequest,
`callback`: FfiV2SubscriptionCallback
`callback`: FfiV2SubscriptionCallback,
): FfiV2Subscription

companion object
Expand Down Expand Up @@ -5580,7 +5580,7 @@ public interface FfiXmtpClientInterface {
*/
suspend fun `addWallet`(
`existingWalletAddress`: kotlin.String,
`newWalletAddress`: kotlin.String
`newWalletAddress`: kotlin.String,
): FfiSignatureRequest

suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest)
Expand Down Expand Up @@ -5998,7 +5998,7 @@ data class FfiCreateGroupOptions(
var `groupImageUrlSquare`: kotlin.String?,
var `groupDescription`: kotlin.String?,
var `groupPinnedFrameUrl`: kotlin.String?,
var `customPermissionPolicySet`: FfiPermissionPolicySet?
var `customPermissionPolicySet`: FfiPermissionPolicySet?,
) {
companion object
}
Expand All @@ -6020,7 +6020,8 @@ public object FfiConverterTypeFfiCreateGroupOptions : FfiConverterRustBuffer<Ffi
FfiConverterOptionalString.allocationSize(value.`groupName`) +
FfiConverterOptionalString.allocationSize(value.`groupImageUrlSquare`) +
FfiConverterOptionalString.allocationSize(value.`groupDescription`) +
FfiConverterOptionalString.allocationSize(value.`groupPinnedFrameUrl`)
FfiConverterOptionalString.allocationSize(value.`groupPinnedFrameUrl`) +
FfiConverterOptionalTypeFfiPermissionPolicySet.allocationSize(value.`customPermissionPolicySet`)
)

override fun write(
Expand All @@ -6038,7 +6039,7 @@ public object FfiConverterTypeFfiCreateGroupOptions : FfiConverterRustBuffer<Ffi

data class FfiCursor(
var `digest`: kotlin.ByteArray,
var `senderTimeNs`: kotlin.ULong
var `senderTimeNs`: kotlin.ULong,
) {
companion object
}
Expand Down Expand Up @@ -6068,7 +6069,7 @@ public object FfiConverterTypeFfiCursor : FfiConverterRustBuffer<FfiCursor> {
data class FfiEnvelope(
var `contentTopic`: kotlin.String,
var `timestampNs`: kotlin.ULong,
var `message`: kotlin.ByteArray
var `message`: kotlin.ByteArray,
) {
companion object
}
Expand Down Expand Up @@ -6102,7 +6103,7 @@ data class FfiGroupMember(
var `inboxId`: kotlin.String,
var `accountAddresses`: List<kotlin.String>,
var `installationIds`: List<kotlin.ByteArray>,
var `permissionLevel`: FfiPermissionLevel
var `permissionLevel`: FfiPermissionLevel,
) {
companion object
}
Expand Down Expand Up @@ -6138,7 +6139,7 @@ public object FfiConverterTypeFfiGroupMember : FfiConverterRustBuffer<FfiGroupMe
data class FfiListConversationsOptions(
var `createdAfterNs`: kotlin.Long?,
var `createdBeforeNs`: kotlin.Long?,
var `limit`: kotlin.Long?
var `limit`: kotlin.Long?,
) {
companion object
}
Expand Down Expand Up @@ -6172,7 +6173,7 @@ data class FfiListMessagesOptions(
var `sentBeforeNs`: kotlin.Long?,
var `sentAfterNs`: kotlin.Long?,
var `limit`: kotlin.Long?,
var `deliveryStatus`: FfiDeliveryStatus?
var `deliveryStatus`: FfiDeliveryStatus?,
) {
companion object
}
Expand Down Expand Up @@ -6212,7 +6213,7 @@ data class FfiMessage(
var `senderInboxId`: kotlin.String,
var `content`: kotlin.ByteArray,
var `kind`: FfiGroupMessageKind,
var `deliveryStatus`: FfiDeliveryStatus
var `deliveryStatus`: FfiDeliveryStatus,
) {
companion object
}
Expand Down Expand Up @@ -6257,7 +6258,7 @@ public object FfiConverterTypeFfiMessage : FfiConverterRustBuffer<FfiMessage> {
data class FfiPagingInfo(
var `limit`: kotlin.UInt,
var `cursor`: FfiCursor?,
var `direction`: FfiSortDirection
var `direction`: FfiSortDirection,
) {
companion object
}
Expand Down Expand Up @@ -6295,7 +6296,7 @@ data class FfiPermissionPolicySet(
var `updateGroupNamePolicy`: FfiPermissionPolicy,
var `updateGroupDescriptionPolicy`: FfiPermissionPolicy,
var `updateGroupImageUrlSquarePolicy`: FfiPermissionPolicy,
var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy
var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy,
) {
companion object
}
Expand Down Expand Up @@ -6341,7 +6342,7 @@ public object FfiConverterTypeFfiPermissionPolicySet : FfiConverterRustBuffer<Ff
}

data class FfiPublishRequest(
var `envelopes`: List<FfiEnvelope>
var `envelopes`: List<FfiEnvelope>,
) {
companion object
}
Expand All @@ -6366,7 +6367,7 @@ public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer<FfiPubl
}

data class FfiV2BatchQueryRequest(
var `requests`: List<FfiV2QueryRequest>
var `requests`: List<FfiV2QueryRequest>,
) {
companion object
}
Expand All @@ -6391,7 +6392,7 @@ public object FfiConverterTypeFfiV2BatchQueryRequest : FfiConverterRustBuffer<Ff
}

data class FfiV2BatchQueryResponse(
var `responses`: List<FfiV2QueryResponse>
var `responses`: List<FfiV2QueryResponse>,
) {
companion object
}
Expand Down Expand Up @@ -6419,7 +6420,7 @@ data class FfiV2QueryRequest(
var `contentTopics`: List<kotlin.String>,
var `startTimeNs`: kotlin.ULong,
var `endTimeNs`: kotlin.ULong,
var `pagingInfo`: FfiPagingInfo?
var `pagingInfo`: FfiPagingInfo?,
) {
companion object
}
Expand Down Expand Up @@ -6454,7 +6455,7 @@ public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer<FfiV2Qu

data class FfiV2QueryResponse(
var `envelopes`: List<FfiEnvelope>,
var `pagingInfo`: FfiPagingInfo?
var `pagingInfo`: FfiPagingInfo?,
) {
companion object
}
Expand Down Expand Up @@ -6482,7 +6483,7 @@ public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer<FfiV2Q
}

data class FfiV2SubscribeRequest(
var `contentTopics`: List<kotlin.String>
var `contentTopics`: List<kotlin.String>,
) {
companion object
}
Expand Down Expand Up @@ -7355,6 +7356,35 @@ public object FfiConverterOptionalTypeFfiPagingInfo : FfiConverterRustBuffer<Ffi
}
}

public object FfiConverterOptionalTypeFfiPermissionPolicySet : FfiConverterRustBuffer<FfiPermissionPolicySet?> {
override fun read(buf: ByteBuffer): FfiPermissionPolicySet? {
if (buf.get().toInt() == 0) {
return null
}
return FfiConverterTypeFfiPermissionPolicySet.read(buf)
}

override fun allocationSize(value: FfiPermissionPolicySet?): ULong {
if (value == null) {
return 1UL
} else {
return 1UL + FfiConverterTypeFfiPermissionPolicySet.allocationSize(value)
}
}

override fun write(
value: FfiPermissionPolicySet?,
buf: ByteBuffer,
) {
if (value == null) {
buf.put(0)
} else {
buf.put(1)
FfiConverterTypeFfiPermissionPolicySet.write(value, buf)
}
}
}

public object FfiConverterOptionalTypeFfiDeliveryStatus : FfiConverterRustBuffer<FfiDeliveryStatus?> {
override fun read(buf: ByteBuffer): FfiDeliveryStatus? {
if (buf.get().toInt() == 0) {
Expand Down
Binary file modified library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so
Binary file not shown.
Binary file modified library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so
Binary file not shown.
Binary file modified library/src/main/jniLibs/x86/libuniffi_xmtpv3.so
Binary file not shown.
Binary file modified library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so
Binary file not shown.

0 comments on commit c648dc0

Please sign in to comment.