@@ -783,6 +783,11 @@ public protocol ClientProtocol : AnyObject {
783
783
784
784
func createRoom(request: CreateRoomParameters) throws -> String
785
785
786
+ /**
787
+ * Deletes a pusher of given pusher ids
788
+ */
789
+ func deletePusher(identifiers: PusherIdentifiers) async throws
790
+
786
791
func deviceId() throws -> String
787
792
788
793
func displayName() throws -> String
@@ -812,6 +817,8 @@ public protocol ClientProtocol : AnyObject {
812
817
813
818
func ignoredUsers() async throws -> [String]
814
819
820
+ func joinRoomById(roomId: String) async throws -> Room
821
+
815
822
/**
816
823
* Login using a username and password.
817
824
*/
@@ -855,7 +862,7 @@ public protocol ClientProtocol : AnyObject {
855
862
/**
856
863
* Registers a pusher with given parameters
857
864
*/
858
- func setPusher(identifiers: PusherIdentifiers, kind: PusherKind, appDisplayName: String, deviceDisplayName: String, profileTag: String?, lang: String) throws
865
+ func setPusher(identifiers: PusherIdentifiers, kind: PusherKind, appDisplayName: String, deviceDisplayName: String, profileTag: String?, lang: String) async throws
859
866
860
867
func subscribeToIgnoredUsers(listener: IgnoredUsersListener) -> TaskHandle
861
868
@@ -966,6 +973,26 @@ open class Client:
966
973
}
967
974
)
968
975
}
976
+ /**
977
+ * Deletes a pusher of given pusher ids
978
+ */
979
+ open func deletePusher(identifiers: PusherIdentifiers) async throws {
980
+ return try await uniffiRustCallAsync(
981
+ rustFutureFunc: {
982
+ uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher(
983
+ self.uniffiClonePointer(),
984
+ FfiConverterTypePusherIdentifiers.lower(identifiers)
985
+ )
986
+ },
987
+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
988
+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
989
+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
990
+ liftFunc: { $0 },
991
+ errorHandler: FfiConverterTypeClientError.lift
992
+ )
993
+ }
994
+
995
+
969
996
open func deviceId() throws -> String {
970
997
return try FfiConverterString.lift(
971
998
try
@@ -1136,6 +1163,23 @@ open class Client:
1136
1163
}
1137
1164
1138
1165
1166
+ open func joinRoomById(roomId: String) async throws -> Room {
1167
+ return try await uniffiRustCallAsync(
1168
+ rustFutureFunc: {
1169
+ uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id(
1170
+ self.uniffiClonePointer(),
1171
+ FfiConverterString.lower(roomId)
1172
+ )
1173
+ },
1174
+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer,
1175
+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer,
1176
+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer,
1177
+ liftFunc: FfiConverterTypeRoom.lift,
1178
+ errorHandler: FfiConverterTypeClientError.lift
1179
+ )
1180
+ }
1181
+
1182
+
1139
1183
/**
1140
1184
* Login using a username and password.
1141
1185
*/
@@ -1268,19 +1312,28 @@ open class Client:
1268
1312
/**
1269
1313
* Registers a pusher with given parameters
1270
1314
*/
1271
- open func setPusher(identifiers: PusherIdentifiers, kind: PusherKind, appDisplayName: String, deviceDisplayName: String, profileTag: String?, lang: String) throws {
1272
- try
1273
- rustCallWithError(FfiConverterTypeClientError.lift) {
1274
- uniffi_matrix_sdk_ffi_fn_method_client_set_pusher(self.uniffiClonePointer(),
1275
- FfiConverterTypePusherIdentifiers.lower(identifiers),
1276
- FfiConverterTypePusherKind.lower(kind),
1277
- FfiConverterString.lower(appDisplayName),
1278
- FfiConverterString.lower(deviceDisplayName),
1279
- FfiConverterOptionString.lower(profileTag),
1280
- FfiConverterString.lower(lang),$0
1281
- )
1282
- }
1315
+ open func setPusher(identifiers: PusherIdentifiers, kind: PusherKind, appDisplayName: String, deviceDisplayName: String, profileTag: String?, lang: String) async throws {
1316
+ return try await uniffiRustCallAsync(
1317
+ rustFutureFunc: {
1318
+ uniffi_matrix_sdk_ffi_fn_method_client_set_pusher(
1319
+ self.uniffiClonePointer(),
1320
+ FfiConverterTypePusherIdentifiers.lower(identifiers),
1321
+ FfiConverterTypePusherKind.lower(kind),
1322
+ FfiConverterString.lower(appDisplayName),
1323
+ FfiConverterString.lower(deviceDisplayName),
1324
+ FfiConverterOptionString.lower(profileTag),
1325
+ FfiConverterString.lower(lang)
1326
+ )
1327
+ },
1328
+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
1329
+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
1330
+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
1331
+ liftFunc: { $0 },
1332
+ errorHandler: FfiConverterTypeClientError.lift
1333
+ )
1283
1334
}
1335
+
1336
+
1284
1337
open func subscribeToIgnoredUsers(listener: IgnoredUsersListener) -> TaskHandle {
1285
1338
return try! FfiConverterTypeTaskHandle.lift(
1286
1339
try!
@@ -23010,6 +23063,9 @@ private var initializationResult: InitializationResult {
23010
23063
if (uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 25555) {
23011
23064
return InitializationResult.apiChecksumMismatch
23012
23065
}
23066
+ if (uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 46707) {
23067
+ return InitializationResult.apiChecksumMismatch
23068
+ }
23013
23069
if (uniffi_matrix_sdk_ffi_checksum_method_client_device_id() != 44340) {
23014
23070
return InitializationResult.apiChecksumMismatch
23015
23071
}
@@ -23049,6 +23105,9 @@ private var initializationResult: InitializationResult {
23049
23105
if (uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users() != 49620) {
23050
23106
return InitializationResult.apiChecksumMismatch
23051
23107
}
23108
+ if (uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id() != 61264) {
23109
+ return InitializationResult.apiChecksumMismatch
23110
+ }
23052
23111
if (uniffi_matrix_sdk_ffi_checksum_method_client_login() != 55564) {
23053
23112
return InitializationResult.apiChecksumMismatch
23054
23113
}
@@ -23085,7 +23144,7 @@ private var initializationResult: InitializationResult {
23085
23144
if (uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name() != 27968) {
23086
23145
return InitializationResult.apiChecksumMismatch
23087
23146
}
23088
- if (uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() != 36816 ) {
23147
+ if (uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() != 21191 ) {
23089
23148
return InitializationResult.apiChecksumMismatch
23090
23149
}
23091
23150
if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users() != 46021) {
0 commit comments