@@ -10881,7 +10881,7 @@ public protocol TimelineEventProtocol : AnyObject {
10881
10881
10882
10882
func senderId() -> String
10883
10883
10884
- func timestamp() -> UInt64
10884
+ func timestamp() -> Timestamp
10885
10885
10886
10886
}
10887
10887
@@ -10947,8 +10947,8 @@ open func senderId() -> String {
10947
10947
})
10948
10948
}
10949
10949
10950
- open func timestamp() -> UInt64 {
10951
- return try! FfiConverterUInt64 .lift(try! rustCall() {
10950
+ open func timestamp() -> Timestamp {
10951
+ return try! FfiConverterTypeTimestamp .lift(try! rustCall() {
10952
10952
uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp(self.uniffiClonePointer(),$0
10953
10953
)
10954
10954
})
@@ -12529,7 +12529,7 @@ public struct EventTimelineItem {
12529
12529
public var isOwn: Bool
12530
12530
public var isEditable: Bool
12531
12531
public var content: TimelineItemContent
12532
- public var timestamp: UInt64
12532
+ public var timestamp: Timestamp
12533
12533
public var reactions: [Reaction]
12534
12534
public var localSendState: EventSendState?
12535
12535
public var readReceipts: [String: Receipt]
@@ -12542,7 +12542,7 @@ public struct EventTimelineItem {
12542
12542
public init(
12543
12543
/**
12544
12544
* Indicates that an event is remote.
12545
- */isRemote: Bool, eventOrTransactionId: EventOrTransactionId, sender: String, senderProfile: ProfileDetails, isOwn: Bool, isEditable: Bool, content: TimelineItemContent, timestamp: UInt64 , reactions: [Reaction], localSendState: EventSendState?, readReceipts: [String: Receipt], origin: EventItemOrigin?, canBeRepliedTo: Bool, lazyProvider: LazyTimelineItemProvider) {
12545
+ */isRemote: Bool, eventOrTransactionId: EventOrTransactionId, sender: String, senderProfile: ProfileDetails, isOwn: Bool, isEditable: Bool, content: TimelineItemContent, timestamp: Timestamp , reactions: [Reaction], localSendState: EventSendState?, readReceipts: [String: Receipt], origin: EventItemOrigin?, canBeRepliedTo: Bool, lazyProvider: LazyTimelineItemProvider) {
12546
12546
self.isRemote = isRemote
12547
12547
self.eventOrTransactionId = eventOrTransactionId
12548
12548
self.sender = sender
@@ -12573,7 +12573,7 @@ public struct FfiConverterTypeEventTimelineItem: FfiConverterRustBuffer {
12573
12573
isOwn: FfiConverterBool.read(from: &buf),
12574
12574
isEditable: FfiConverterBool.read(from: &buf),
12575
12575
content: FfiConverterTypeTimelineItemContent.read(from: &buf),
12576
- timestamp: FfiConverterUInt64 .read(from: &buf),
12576
+ timestamp: FfiConverterTypeTimestamp .read(from: &buf),
12577
12577
reactions: FfiConverterSequenceTypeReaction.read(from: &buf),
12578
12578
localSendState: FfiConverterOptionTypeEventSendState.read(from: &buf),
12579
12579
readReceipts: FfiConverterDictionaryStringTypeReceipt.read(from: &buf),
@@ -12591,7 +12591,7 @@ public struct FfiConverterTypeEventTimelineItem: FfiConverterRustBuffer {
12591
12591
FfiConverterBool.write(value.isOwn, into: &buf)
12592
12592
FfiConverterBool.write(value.isEditable, into: &buf)
12593
12593
FfiConverterTypeTimelineItemContent.write(value.content, into: &buf)
12594
- FfiConverterUInt64 .write(value.timestamp, into: &buf)
12594
+ FfiConverterTypeTimestamp .write(value.timestamp, into: &buf)
12595
12595
FfiConverterSequenceTypeReaction.write(value.reactions, into: &buf)
12596
12596
FfiConverterOptionTypeEventSendState.write(value.localSendState, into: &buf)
12597
12597
FfiConverterDictionaryStringTypeReceipt.write(value.readReceipts, into: &buf)
@@ -14427,11 +14427,11 @@ public func FfiConverterTypeReaction_lower(_ value: Reaction) -> RustBuffer {
14427
14427
14428
14428
public struct ReactionSenderData {
14429
14429
public var senderId: String
14430
- public var timestamp: UInt64
14430
+ public var timestamp: Timestamp
14431
14431
14432
14432
// Default memberwise initializers are never public by default, so we
14433
14433
// declare one manually.
14434
- public init(senderId: String, timestamp: UInt64 ) {
14434
+ public init(senderId: String, timestamp: Timestamp ) {
14435
14435
self.senderId = senderId
14436
14436
self.timestamp = timestamp
14437
14437
}
@@ -14462,13 +14462,13 @@ public struct FfiConverterTypeReactionSenderData: FfiConverterRustBuffer {
14462
14462
return
14463
14463
try ReactionSenderData(
14464
14464
senderId: FfiConverterString.read(from: &buf),
14465
- timestamp: FfiConverterUInt64 .read(from: &buf)
14465
+ timestamp: FfiConverterTypeTimestamp .read(from: &buf)
14466
14466
)
14467
14467
}
14468
14468
14469
14469
public static func write(_ value: ReactionSenderData, into buf: inout [UInt8]) {
14470
14470
FfiConverterString.write(value.senderId, into: &buf)
14471
- FfiConverterUInt64 .write(value.timestamp, into: &buf)
14471
+ FfiConverterTypeTimestamp .write(value.timestamp, into: &buf)
14472
14472
}
14473
14473
}
14474
14474
@@ -14483,11 +14483,11 @@ public func FfiConverterTypeReactionSenderData_lower(_ value: ReactionSenderData
14483
14483
14484
14484
14485
14485
public struct Receipt {
14486
- public var timestamp: UInt64 ?
14486
+ public var timestamp: Timestamp ?
14487
14487
14488
14488
// Default memberwise initializers are never public by default, so we
14489
14489
// declare one manually.
14490
- public init(timestamp: UInt64 ?) {
14490
+ public init(timestamp: Timestamp ?) {
14491
14491
self.timestamp = timestamp
14492
14492
}
14493
14493
}
@@ -14512,12 +14512,12 @@ public struct FfiConverterTypeReceipt: FfiConverterRustBuffer {
14512
14512
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Receipt {
14513
14513
return
14514
14514
try Receipt(
14515
- timestamp: FfiConverterOptionUInt64 .read(from: &buf)
14515
+ timestamp: FfiConverterOptionTypeTimestamp .read(from: &buf)
14516
14516
)
14517
14517
}
14518
14518
14519
14519
public static func write(_ value: Receipt, into buf: inout [UInt8]) {
14520
- FfiConverterOptionUInt64 .write(value.timestamp, into: &buf)
14520
+ FfiConverterOptionTypeTimestamp .write(value.timestamp, into: &buf)
14521
14521
}
14522
14522
}
14523
14523
@@ -16132,14 +16132,14 @@ public struct SessionVerificationRequestDetails {
16132
16132
/**
16133
16133
* First time this device was seen in milliseconds since epoch.
16134
16134
*/
16135
- public var firstSeenTimestamp: UInt64
16135
+ public var firstSeenTimestamp: Timestamp
16136
16136
16137
16137
// Default memberwise initializers are never public by default, so we
16138
16138
// declare one manually.
16139
16139
public init(senderId: String, flowId: String, deviceId: String, displayName: String?,
16140
16140
/**
16141
16141
* First time this device was seen in milliseconds since epoch.
16142
- */firstSeenTimestamp: UInt64 ) {
16142
+ */firstSeenTimestamp: Timestamp ) {
16143
16143
self.senderId = senderId
16144
16144
self.flowId = flowId
16145
16145
self.deviceId = deviceId
@@ -16188,7 +16188,7 @@ public struct FfiConverterTypeSessionVerificationRequestDetails: FfiConverterRus
16188
16188
flowId: FfiConverterString.read(from: &buf),
16189
16189
deviceId: FfiConverterString.read(from: &buf),
16190
16190
displayName: FfiConverterOptionString.read(from: &buf),
16191
- firstSeenTimestamp: FfiConverterUInt64 .read(from: &buf)
16191
+ firstSeenTimestamp: FfiConverterTypeTimestamp .read(from: &buf)
16192
16192
)
16193
16193
}
16194
16194
@@ -16197,7 +16197,7 @@ public struct FfiConverterTypeSessionVerificationRequestDetails: FfiConverterRus
16197
16197
FfiConverterString.write(value.flowId, into: &buf)
16198
16198
FfiConverterString.write(value.deviceId, into: &buf)
16199
16199
FfiConverterOptionString.write(value.displayName, into: &buf)
16200
- FfiConverterUInt64 .write(value.firstSeenTimestamp, into: &buf)
16200
+ FfiConverterTypeTimestamp .write(value.firstSeenTimestamp, into: &buf)
16201
16201
}
16202
16202
}
16203
16203
@@ -24652,7 +24652,7 @@ public enum TimelineItemContent {
24652
24652
case redactedMessage
24653
24653
case sticker(body: String, info: ImageInfo, source: MediaSource
24654
24654
)
24655
- case poll(question: String, kind: PollKind, maxSelections: UInt64, answers: [PollAnswer], votes: [String: [String]], endTime: UInt64 ?, hasBeenEdited: Bool
24655
+ case poll(question: String, kind: PollKind, maxSelections: UInt64, answers: [PollAnswer], votes: [String: [String]], endTime: Timestamp ?, hasBeenEdited: Bool
24656
24656
)
24657
24657
case callInvite
24658
24658
case callNotify
@@ -24686,7 +24686,7 @@ public struct FfiConverterTypeTimelineItemContent: FfiConverterRustBuffer {
24686
24686
case 3: return .sticker(body: try FfiConverterString.read(from: &buf), info: try FfiConverterTypeImageInfo.read(from: &buf), source: try FfiConverterTypeMediaSource.read(from: &buf)
24687
24687
)
24688
24688
24689
- case 4: return .poll(question: try FfiConverterString.read(from: &buf), kind: try FfiConverterTypePollKind.read(from: &buf), maxSelections: try FfiConverterUInt64.read(from: &buf), answers: try FfiConverterSequenceTypePollAnswer.read(from: &buf), votes: try FfiConverterDictionaryStringSequenceString.read(from: &buf), endTime: try FfiConverterOptionUInt64 .read(from: &buf), hasBeenEdited: try FfiConverterBool.read(from: &buf)
24689
+ case 4: return .poll(question: try FfiConverterString.read(from: &buf), kind: try FfiConverterTypePollKind.read(from: &buf), maxSelections: try FfiConverterUInt64.read(from: &buf), answers: try FfiConverterSequenceTypePollAnswer.read(from: &buf), votes: try FfiConverterDictionaryStringSequenceString.read(from: &buf), endTime: try FfiConverterOptionTypeTimestamp .read(from: &buf), hasBeenEdited: try FfiConverterBool.read(from: &buf)
24690
24690
)
24691
24691
24692
24692
case 5: return .callInvite
@@ -24742,7 +24742,7 @@ public struct FfiConverterTypeTimelineItemContent: FfiConverterRustBuffer {
24742
24742
FfiConverterUInt64.write(maxSelections, into: &buf)
24743
24743
FfiConverterSequenceTypePollAnswer.write(answers, into: &buf)
24744
24744
FfiConverterDictionaryStringSequenceString.write(votes, into: &buf)
24745
- FfiConverterOptionUInt64 .write(endTime, into: &buf)
24745
+ FfiConverterOptionTypeTimestamp .write(endTime, into: &buf)
24746
24746
FfiConverterBool.write(hasBeenEdited, into: &buf)
24747
24747
24748
24748
@@ -24887,7 +24887,7 @@ public enum VirtualTimelineItem {
24887
24887
/**
24888
24888
* A timestamp in milliseconds since Unix Epoch on that day in local
24889
24889
* time.
24890
- */ts: UInt64
24890
+ */ts: Timestamp
24891
24891
)
24892
24892
/**
24893
24893
* The user's own read marker.
@@ -24903,7 +24903,7 @@ public struct FfiConverterTypeVirtualTimelineItem: FfiConverterRustBuffer {
24903
24903
let variant: Int32 = try readInt(&buf)
24904
24904
switch variant {
24905
24905
24906
- case 1: return .dateDivider(ts: try FfiConverterUInt64 .read(from: &buf)
24906
+ case 1: return .dateDivider(ts: try FfiConverterTypeTimestamp .read(from: &buf)
24907
24907
)
24908
24908
24909
24909
case 2: return .readMarker
@@ -24918,7 +24918,7 @@ public struct FfiConverterTypeVirtualTimelineItem: FfiConverterRustBuffer {
24918
24918
24919
24919
case let .dateDivider(ts):
24920
24920
writeInt(&buf, Int32(1))
24921
- FfiConverterUInt64 .write(ts, into: &buf)
24921
+ FfiConverterTypeTimestamp .write(ts, into: &buf)
24922
24922
24923
24923
24924
24924
case .readMarker:
@@ -28745,6 +28745,27 @@ fileprivate struct FfiConverterOptionTypeEventItemOrigin: FfiConverterRustBuffer
28745
28745
}
28746
28746
}
28747
28747
28748
+ fileprivate struct FfiConverterOptionTypeTimestamp: FfiConverterRustBuffer {
28749
+ typealias SwiftType = Timestamp?
28750
+
28751
+ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
28752
+ guard let value = value else {
28753
+ writeInt(&buf, Int8(0))
28754
+ return
28755
+ }
28756
+ writeInt(&buf, Int8(1))
28757
+ FfiConverterTypeTimestamp.write(value, into: &buf)
28758
+ }
28759
+
28760
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
28761
+ switch try readInt(&buf) as Int8 {
28762
+ case 0: return nil
28763
+ case 1: return try FfiConverterTypeTimestamp.read(from: &buf)
28764
+ default: throw UniffiInternalError.unexpectedOptionalTag
28765
+ }
28766
+ }
28767
+ }
28768
+
28748
28769
fileprivate struct FfiConverterSequenceUInt16: FfiConverterRustBuffer {
28749
28770
typealias SwiftType = [UInt16]
28750
28771
@@ -29498,6 +29519,40 @@ fileprivate struct FfiConverterDictionaryStringSequenceString: FfiConverterRustB
29498
29519
29499
29520
29500
29521
29522
+
29523
+
29524
+
29525
+ /**
29526
+ * Typealias from the type name used in the UDL file to the builtin type. This
29527
+ * is needed because the UDL type name is used in function/method signatures.
29528
+ */
29529
+ public typealias Timestamp = UInt64
29530
+ public struct FfiConverterTypeTimestamp: FfiConverter {
29531
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Timestamp {
29532
+ return try FfiConverterUInt64.read(from: &buf)
29533
+ }
29534
+
29535
+ public static func write(_ value: Timestamp, into buf: inout [UInt8]) {
29536
+ return FfiConverterUInt64.write(value, into: &buf)
29537
+ }
29538
+
29539
+ public static func lift(_ value: UInt64) throws -> Timestamp {
29540
+ return try FfiConverterUInt64.lift(value)
29541
+ }
29542
+
29543
+ public static func lower(_ value: Timestamp) -> UInt64 {
29544
+ return FfiConverterUInt64.lower(value)
29545
+ }
29546
+ }
29547
+
29548
+
29549
+ public func FfiConverterTypeTimestamp_lift(_ value: UInt64) throws -> Timestamp {
29550
+ return try FfiConverterTypeTimestamp.lift(value)
29551
+ }
29552
+
29553
+ public func FfiConverterTypeTimestamp_lower(_ value: Timestamp) -> UInt64 {
29554
+ return FfiConverterTypeTimestamp.lower(value)
29555
+ }
29501
29556
29502
29557
private let UNIFFI_RUST_FUTURE_POLL_READY: Int8 = 0
29503
29558
private let UNIFFI_RUST_FUTURE_POLL_MAYBE_READY: Int8 = 1
@@ -30917,7 +30972,7 @@ private var initializationResult: InitializationResult = {
30917
30972
if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() != 18142) {
30918
30973
return InitializationResult.apiChecksumMismatch
30919
30974
}
30920
- if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() != 58123 ) {
30975
+ if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() != 50929 ) {
30921
30976
return InitializationResult.apiChecksumMismatch
30922
30977
}
30923
30978
if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event() != 6106) {
0 commit comments