@@ -636,6 +636,8 @@ public func FfiConverterTypeTabsBridgedEngine_lower(_ value: TabsBridgedEngine)
636
636
}
637
637
638
638
public protocol TabsStoreProtocol : AnyObject {
639
+ func addPendingRemoteTabClosure( tabsRequestedClosed: [ TabsRequestedClose ] )
640
+
639
641
func bridgedEngine( ) -> TabsBridgedEngine
640
642
641
643
func getAll( ) -> [ ClientRemoteTabs ]
@@ -693,6 +695,12 @@ open class TabsStore:
693
695
try ! rustCall { uniffi_tabs_fn_free_tabsstore ( pointer, $0) }
694
696
}
695
697
698
+ open func addPendingRemoteTabClosure( tabsRequestedClosed: [ TabsRequestedClose ] ) { try ! rustCall {
699
+ uniffi_tabs_fn_method_tabsstore_add_pending_remote_tab_closure ( self . uniffiClonePointer ( ) ,
700
+ FfiConverterSequenceTypeTabsRequestedClose . lower ( tabsRequestedClosed) , $0)
701
+ }
702
+ }
703
+
696
704
open func bridgedEngine( ) -> TabsBridgedEngine {
697
705
return try ! FfiConverterTypeTabsBridgedEngine . lift ( try ! rustCall {
698
706
uniffi_tabs_fn_method_tabsstore_bridged_engine ( self . uniffiClonePointer ( ) , $0)
@@ -907,6 +915,58 @@ public func FfiConverterTypeRemoteTabRecord_lower(_ value: RemoteTabRecord) -> R
907
915
return FfiConverterTypeRemoteTabRecord . lower ( value)
908
916
}
909
917
918
+ public struct TabsRequestedClose {
919
+ public var clientId : String
920
+ public var urls : [ String ]
921
+
922
+ // Default memberwise initializers are never public by default, so we
923
+ // declare one manually.
924
+ public init ( clientId: String , urls: [ String ] ) {
925
+ self . clientId = clientId
926
+ self . urls = urls
927
+ }
928
+ }
929
+
930
+ extension TabsRequestedClose : Equatable , Hashable {
931
+ public static func == ( lhs: TabsRequestedClose , rhs: TabsRequestedClose ) -> Bool {
932
+ if lhs. clientId != rhs. clientId {
933
+ return false
934
+ }
935
+ if lhs. urls != rhs. urls {
936
+ return false
937
+ }
938
+ return true
939
+ }
940
+
941
+ public func hash( into hasher: inout Hasher ) {
942
+ hasher. combine ( clientId)
943
+ hasher. combine ( urls)
944
+ }
945
+ }
946
+
947
+ public struct FfiConverterTypeTabsRequestedClose : FfiConverterRustBuffer {
948
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> TabsRequestedClose {
949
+ return
950
+ try TabsRequestedClose (
951
+ clientId: FfiConverterString . read ( from: & buf) ,
952
+ urls: FfiConverterSequenceString . read ( from: & buf)
953
+ )
954
+ }
955
+
956
+ public static func write( _ value: TabsRequestedClose , into buf: inout [ UInt8 ] ) {
957
+ FfiConverterString . write ( value. clientId, into: & buf)
958
+ FfiConverterSequenceString . write ( value. urls, into: & buf)
959
+ }
960
+ }
961
+
962
+ public func FfiConverterTypeTabsRequestedClose_lift( _ buf: RustBuffer ) throws -> TabsRequestedClose {
963
+ return try FfiConverterTypeTabsRequestedClose . lift ( buf)
964
+ }
965
+
966
+ public func FfiConverterTypeTabsRequestedClose_lower( _ value: TabsRequestedClose ) -> RustBuffer {
967
+ return FfiConverterTypeTabsRequestedClose . lower ( value)
968
+ }
969
+
910
970
public enum TabsApiError {
911
971
case SyncError( reason: String
912
972
)
@@ -1044,6 +1104,28 @@ private struct FfiConverterSequenceTypeRemoteTabRecord: FfiConverterRustBuffer {
1044
1104
}
1045
1105
}
1046
1106
1107
+ private struct FfiConverterSequenceTypeTabsRequestedClose : FfiConverterRustBuffer {
1108
+ typealias SwiftType = [ TabsRequestedClose ]
1109
+
1110
+ public static func write( _ value: [ TabsRequestedClose ] , into buf: inout [ UInt8 ] ) {
1111
+ let len = Int32 ( value. count)
1112
+ writeInt ( & buf, len)
1113
+ for item in value {
1114
+ FfiConverterTypeTabsRequestedClose . write ( item, into: & buf)
1115
+ }
1116
+ }
1117
+
1118
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> [ TabsRequestedClose ] {
1119
+ let len : Int32 = try readInt ( & buf)
1120
+ var seq = [ TabsRequestedClose] ( )
1121
+ seq. reserveCapacity ( Int ( len) )
1122
+ for _ in 0 ..< len {
1123
+ try seq. append ( FfiConverterTypeTabsRequestedClose . read ( from: & buf) )
1124
+ }
1125
+ return seq
1126
+ }
1127
+ }
1128
+
1047
1129
private struct FfiConverterSequenceTypeTabsGuid : FfiConverterRustBuffer {
1048
1130
typealias SwiftType = [ TabsGuid ]
1049
1131
@@ -1152,6 +1234,9 @@ private var initializationResult: InitializationResult {
1152
1234
if uniffi_tabs_checksum_method_tabsbridgedengine_wipe ( ) != 21505 {
1153
1235
return InitializationResult . apiChecksumMismatch
1154
1236
}
1237
+ if uniffi_tabs_checksum_method_tabsstore_add_pending_remote_tab_closure ( ) != 37789 {
1238
+ return InitializationResult . apiChecksumMismatch
1239
+ }
1155
1240
if uniffi_tabs_checksum_method_tabsstore_bridged_engine ( ) != 43478 {
1156
1241
return InitializationResult . apiChecksumMismatch
1157
1242
}
0 commit comments