mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
Update SDK to 26.04.23 (#5478)
updated sdk, and added error management on the send LLS API
This commit is contained in:
@@ -10127,7 +10127,7 @@
|
|||||||
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 26.04.21;
|
version = 26.04.23;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "307a0af81ae7a463ea2d0c101af1045c15def8948a63c21aa97fc7929759206e",
|
"originHash" : "ffbed4fcb99c97f1daf5f706d30ba2acbdb0810f8774b9720d29257d9854f83e",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "compound-design-tokens",
|
"identity" : "compound-design-tokens",
|
||||||
@@ -158,8 +158,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "7b99a1d16c62794596fac0b34bf21ceec26578b5",
|
"revision" : "cadee968c71d7ddff8f4b04e934b963b6c08c2bd",
|
||||||
"version" : "26.4.21"
|
"version" : "26.4.23"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ extension SDKListener: KnockRequestsListener where T == [KnockRequest] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension SDKListener: LiveLocationShareListener where T == [LiveLocationShareUpdate] {
|
extension SDKListener: LiveLocationsListener where T == [LiveLocationShareUpdate] {
|
||||||
func onUpdate(updates: [LiveLocationShareUpdate]) {
|
func onUpdate(updates: [LiveLocationShareUpdate]) {
|
||||||
onUpdateClosure(updates)
|
onUpdateClosure(updates)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,7 +278,13 @@ class LiveLocationManager: NSObject, LiveLocationManagerProtocol, CLLocationMana
|
|||||||
case .success:
|
case .success:
|
||||||
MXLog.debug("Sent live location to room: \(roomID)")
|
MXLog.debug("Sent live location to room: \(roomID)")
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
MXLog.error("Failed to send live location update to room \(roomID): \(error)")
|
switch error {
|
||||||
|
case .liveLocationSessionIsNotActive:
|
||||||
|
MXLog.error("Failed to send live locatio update to room \(roomID): session not active")
|
||||||
|
await stopLiveLocation(roomID: roomID)
|
||||||
|
default:
|
||||||
|
MXLog.error("Failed to send live location update to room \(roomID): \(error)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import MatrixRustSDK
|
|||||||
|
|
||||||
final class RoomLiveLocationService: RoomLiveLocationServiceProtocol {
|
final class RoomLiveLocationService: RoomLiveLocationServiceProtocol {
|
||||||
// periphery:ignore - required for instance retention in the rust codebase
|
// periphery:ignore - required for instance retention in the rust codebase
|
||||||
private let liveLocationShares: LiveLocationShares
|
private let liveLocationsObserver: LiveLocationsObserver
|
||||||
// periphery:ignore - required for instance retention in the rust codebase
|
// periphery:ignore - required for instance retention in the rust codebase
|
||||||
private var observationToken: TaskHandle?
|
private var observationToken: TaskHandle?
|
||||||
|
|
||||||
@@ -20,9 +20,9 @@ final class RoomLiveLocationService: RoomLiveLocationServiceProtocol {
|
|||||||
liveLocationsSubject.asCurrentValuePublisher()
|
liveLocationsSubject.asCurrentValuePublisher()
|
||||||
}
|
}
|
||||||
|
|
||||||
init(liveLocationShares: LiveLocationShares) {
|
init(liveLocationsObserver: LiveLocationsObserver) {
|
||||||
self.liveLocationShares = liveLocationShares
|
self.liveLocationsObserver = liveLocationsObserver
|
||||||
observationToken = liveLocationShares
|
observationToken = liveLocationsObserver
|
||||||
.subscribe(listener: SDKListener { [weak self] updates in
|
.subscribe(listener: SDKListener { [weak self] updates in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
|
|
||||||
|
|||||||
@@ -755,7 +755,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
|||||||
// MARK: - Live Location
|
// MARK: - Live Location
|
||||||
|
|
||||||
func makeLiveLocationService() async -> RoomLiveLocationServiceProtocol {
|
func makeLiveLocationService() async -> RoomLiveLocationServiceProtocol {
|
||||||
await RoomLiveLocationService(liveLocationShares: room.liveLocationShares())
|
await RoomLiveLocationService(liveLocationsObserver: room.liveLocationsObserver())
|
||||||
}
|
}
|
||||||
|
|
||||||
func startLiveLocationShare(duration: Duration) async -> Result<Void, RoomProxyError> {
|
func startLiveLocationShare(duration: Duration) async -> Result<Void, RoomProxyError> {
|
||||||
@@ -772,6 +772,16 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
|||||||
do {
|
do {
|
||||||
try await room.sendLiveLocation(geoUri: geoURI.string)
|
try await room.sendLiveLocation(geoUri: geoURI.string)
|
||||||
return .success(())
|
return .success(())
|
||||||
|
} catch let error as LiveLocationError {
|
||||||
|
switch error {
|
||||||
|
case .Network:
|
||||||
|
MXLog.error("Failed sending live location with error: \(error)")
|
||||||
|
return .failure(.sdkError(error))
|
||||||
|
// We can consider the session not active for any error other the Network one.
|
||||||
|
default:
|
||||||
|
MXLog.error("Failed sending live location, session is not active")
|
||||||
|
return .failure(.liveLocationSessionIsNotActive)
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
MXLog.error("Failed sending live location with error: \(error)")
|
MXLog.error("Failed sending live location with error: \(error)")
|
||||||
return .failure(.sdkError(error))
|
return .failure(.sdkError(error))
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ enum RoomProxyError: Error {
|
|||||||
case missingTransactionID
|
case missingTransactionID
|
||||||
case failedCreatingPinnedTimeline
|
case failedCreatingPinnedTimeline
|
||||||
case timelineError(TimelineProxyError)
|
case timelineError(TimelineProxyError)
|
||||||
|
case liveLocationSessionIsNotActive
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An enum that describes the relationship between the current user and the room, and contains a reference to the specific implementation of the `RoomProxy`.
|
/// An enum that describes the relationship between the current user and the room, and contains a reference to the specific implementation of the `RoomProxy`.
|
||||||
|
|||||||
@@ -1343,6 +1343,81 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - getDmRooms
|
||||||
|
|
||||||
|
open var getDmRoomsUserIdThrowableError: Error?
|
||||||
|
open var getDmRoomsUserIdUnderlyingCallsCount = 0
|
||||||
|
open var getDmRoomsUserIdCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return getDmRoomsUserIdUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = getDmRoomsUserIdUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
getDmRoomsUserIdUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
getDmRoomsUserIdUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var getDmRoomsUserIdCalled: Bool {
|
||||||
|
return getDmRoomsUserIdCallsCount > 0
|
||||||
|
}
|
||||||
|
open var getDmRoomsUserIdReceivedUserId: String?
|
||||||
|
open var getDmRoomsUserIdReceivedInvocations: [String] = []
|
||||||
|
|
||||||
|
open var getDmRoomsUserIdUnderlyingReturnValue: [Room]!
|
||||||
|
open var getDmRoomsUserIdReturnValue: [Room]! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return getDmRoomsUserIdUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: [Room]? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = getDmRoomsUserIdUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
getDmRoomsUserIdUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
getDmRoomsUserIdUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var getDmRoomsUserIdClosure: ((String) throws -> [Room])?
|
||||||
|
|
||||||
|
open override func getDmRooms(userId: String) throws -> [Room] {
|
||||||
|
if let error = getDmRoomsUserIdThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
getDmRoomsUserIdCallsCount += 1
|
||||||
|
getDmRoomsUserIdReceivedUserId = userId
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.getDmRoomsUserIdReceivedInvocations.append(userId)
|
||||||
|
}
|
||||||
|
if let getDmRoomsUserIdClosure = getDmRoomsUserIdClosure {
|
||||||
|
return try getDmRoomsUserIdClosure(userId)
|
||||||
|
} else {
|
||||||
|
return getDmRoomsUserIdReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//MARK: - getInviteAvatarsDisplayPolicy
|
//MARK: - getInviteAvatarsDisplayPolicy
|
||||||
|
|
||||||
open var getInviteAvatarsDisplayPolicyThrowableError: Error?
|
open var getInviteAvatarsDisplayPolicyThrowableError: Error?
|
||||||
@@ -3896,6 +3971,75 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
|||||||
try await removeAvatarClosure?()
|
try await removeAvatarClosure?()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - requestOpenidToken
|
||||||
|
|
||||||
|
open var requestOpenidTokenThrowableError: Error?
|
||||||
|
open var requestOpenidTokenUnderlyingCallsCount = 0
|
||||||
|
open var requestOpenidTokenCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return requestOpenidTokenUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = requestOpenidTokenUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
requestOpenidTokenUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
requestOpenidTokenUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var requestOpenidTokenCalled: Bool {
|
||||||
|
return requestOpenidTokenCallsCount > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
open var requestOpenidTokenUnderlyingReturnValue: OpenIdToken!
|
||||||
|
open var requestOpenidTokenReturnValue: OpenIdToken! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return requestOpenidTokenUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: OpenIdToken? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = requestOpenidTokenUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
requestOpenidTokenUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
requestOpenidTokenUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var requestOpenidTokenClosure: (() async throws -> OpenIdToken)?
|
||||||
|
|
||||||
|
open override func requestOpenidToken() async throws -> OpenIdToken {
|
||||||
|
if let error = requestOpenidTokenThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
requestOpenidTokenCallsCount += 1
|
||||||
|
if let requestOpenidTokenClosure = requestOpenidTokenClosure {
|
||||||
|
return try await requestOpenidTokenClosure()
|
||||||
|
} else {
|
||||||
|
return requestOpenidTokenReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//MARK: - resetSupportedVersions
|
//MARK: - resetSupportedVersions
|
||||||
|
|
||||||
open var resetSupportedVersionsThrowableError: Error?
|
open var resetSupportedVersionsThrowableError: Error?
|
||||||
@@ -4672,6 +4816,52 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
|||||||
try await setAccountDataEventTypeContentClosure?(eventType, content)
|
try await setAccountDataEventTypeContentClosure?(eventType, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - setAvatarUrl
|
||||||
|
|
||||||
|
open var setAvatarUrlUrlThrowableError: Error?
|
||||||
|
open var setAvatarUrlUrlUnderlyingCallsCount = 0
|
||||||
|
open var setAvatarUrlUrlCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return setAvatarUrlUrlUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = setAvatarUrlUrlUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
setAvatarUrlUrlUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
setAvatarUrlUrlUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var setAvatarUrlUrlCalled: Bool {
|
||||||
|
return setAvatarUrlUrlCallsCount > 0
|
||||||
|
}
|
||||||
|
open var setAvatarUrlUrlReceivedUrl: String?
|
||||||
|
open var setAvatarUrlUrlReceivedInvocations: [String] = []
|
||||||
|
open var setAvatarUrlUrlClosure: ((String) async throws -> Void)?
|
||||||
|
|
||||||
|
open override func setAvatarUrl(url: String) async throws {
|
||||||
|
if let error = setAvatarUrlUrlThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
setAvatarUrlUrlCallsCount += 1
|
||||||
|
setAvatarUrlUrlReceivedUrl = url
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.setAvatarUrlUrlReceivedInvocations.append(url)
|
||||||
|
}
|
||||||
|
try await setAvatarUrlUrlClosure?(url)
|
||||||
|
}
|
||||||
|
|
||||||
//MARK: - setDelegate
|
//MARK: - setDelegate
|
||||||
|
|
||||||
open var setDelegateDelegateThrowableError: Error?
|
open var setDelegateDelegateThrowableError: Error?
|
||||||
@@ -6417,6 +6607,81 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
|||||||
return getRecentEmojisReturnValue
|
return getRecentEmojisReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - searchMessages
|
||||||
|
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchThrowableError: Error?
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchUnderlyingCallsCount = 0
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return searchMessagesQueryFilterNumResultsPerBatchUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = searchMessagesQueryFilterNumResultsPerBatchUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
searchMessagesQueryFilterNumResultsPerBatchUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
searchMessagesQueryFilterNumResultsPerBatchUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchCalled: Bool {
|
||||||
|
return searchMessagesQueryFilterNumResultsPerBatchCallsCount > 0
|
||||||
|
}
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchReceivedArguments: (query: String, filter: SearchRoomFilter, numResultsPerBatch: UInt32)?
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchReceivedInvocations: [(query: String, filter: SearchRoomFilter, numResultsPerBatch: UInt32)] = []
|
||||||
|
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchUnderlyingReturnValue: GlobalSearchIterator!
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchReturnValue: GlobalSearchIterator! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return searchMessagesQueryFilterNumResultsPerBatchUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: GlobalSearchIterator? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = searchMessagesQueryFilterNumResultsPerBatchUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
searchMessagesQueryFilterNumResultsPerBatchUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
searchMessagesQueryFilterNumResultsPerBatchUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var searchMessagesQueryFilterNumResultsPerBatchClosure: ((String, SearchRoomFilter, UInt32) async throws -> GlobalSearchIterator)?
|
||||||
|
|
||||||
|
open override func searchMessages(query: String, filter: SearchRoomFilter, numResultsPerBatch: UInt32) async throws -> GlobalSearchIterator {
|
||||||
|
if let error = searchMessagesQueryFilterNumResultsPerBatchThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
searchMessagesQueryFilterNumResultsPerBatchCallsCount += 1
|
||||||
|
searchMessagesQueryFilterNumResultsPerBatchReceivedArguments = (query: query, filter: filter, numResultsPerBatch: numResultsPerBatch)
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.searchMessagesQueryFilterNumResultsPerBatchReceivedInvocations.append((query: query, filter: filter, numResultsPerBatch: numResultsPerBatch))
|
||||||
|
}
|
||||||
|
if let searchMessagesQueryFilterNumResultsPerBatchClosure = searchMessagesQueryFilterNumResultsPerBatchClosure {
|
||||||
|
return try await searchMessagesQueryFilterNumResultsPerBatchClosure(query, filter, numResultsPerBatch)
|
||||||
|
} else {
|
||||||
|
return searchMessagesQueryFilterNumResultsPerBatchReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendable {
|
open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendable {
|
||||||
public init() {
|
public init() {
|
||||||
@@ -8246,6 +8511,77 @@ open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendabl
|
|||||||
return usernameUsernameReturnValue
|
return usernameUsernameReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - withSearchIndexStore
|
||||||
|
|
||||||
|
open var withSearchIndexStorePathPasswordUnderlyingCallsCount = 0
|
||||||
|
open var withSearchIndexStorePathPasswordCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withSearchIndexStorePathPasswordUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withSearchIndexStorePathPasswordUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withSearchIndexStorePathPasswordUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withSearchIndexStorePathPasswordUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withSearchIndexStorePathPasswordCalled: Bool {
|
||||||
|
return withSearchIndexStorePathPasswordCallsCount > 0
|
||||||
|
}
|
||||||
|
open var withSearchIndexStorePathPasswordReceivedArguments: (path: String, password: String?)?
|
||||||
|
open var withSearchIndexStorePathPasswordReceivedInvocations: [(path: String, password: String?)] = []
|
||||||
|
|
||||||
|
open var withSearchIndexStorePathPasswordUnderlyingReturnValue: ClientBuilder!
|
||||||
|
open var withSearchIndexStorePathPasswordReturnValue: ClientBuilder! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withSearchIndexStorePathPasswordUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: ClientBuilder? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withSearchIndexStorePathPasswordUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withSearchIndexStorePathPasswordUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withSearchIndexStorePathPasswordUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withSearchIndexStorePathPasswordClosure: ((String, String?) -> ClientBuilder)?
|
||||||
|
|
||||||
|
open override func withSearchIndexStore(path: String, password: String?) -> ClientBuilder {
|
||||||
|
withSearchIndexStorePathPasswordCallsCount += 1
|
||||||
|
withSearchIndexStorePathPasswordReceivedArguments = (path: path, password: password)
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.withSearchIndexStorePathPasswordReceivedInvocations.append((path: path, password: password))
|
||||||
|
}
|
||||||
|
if let withSearchIndexStorePathPasswordClosure = withSearchIndexStorePathPasswordClosure {
|
||||||
|
return withSearchIndexStorePathPasswordClosure(path, password)
|
||||||
|
} else {
|
||||||
|
return withSearchIndexStorePathPasswordReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable {
|
open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable {
|
||||||
public init() {
|
public init() {
|
||||||
@@ -9670,6 +10006,90 @@ open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable {
|
|||||||
await waitForE2eeInitializationTasksClosure?()
|
await waitForE2eeInitializationTasksClosure?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
open class GlobalSearchIteratorSDKMock: MatrixRustSDK.GlobalSearchIterator, @unchecked Sendable {
|
||||||
|
public init() {
|
||||||
|
super.init(noHandle: .init())
|
||||||
|
}
|
||||||
|
|
||||||
|
public required init(unsafeFromHandle handle: UInt64) {
|
||||||
|
fatalError("init(unsafeFromHandle:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate var handle: UInt64 {
|
||||||
|
get { return underlyingHandle }
|
||||||
|
set(value) { underlyingHandle = value }
|
||||||
|
}
|
||||||
|
fileprivate var underlyingHandle: UInt64!
|
||||||
|
|
||||||
|
//MARK: - nextEvents
|
||||||
|
|
||||||
|
open var nextEventsThrowableError: Error?
|
||||||
|
open var nextEventsUnderlyingCallsCount = 0
|
||||||
|
open var nextEventsCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return nextEventsUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = nextEventsUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
nextEventsUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
nextEventsUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var nextEventsCalled: Bool {
|
||||||
|
return nextEventsCallsCount > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
open var nextEventsUnderlyingReturnValue: [GlobalSearchResult]?
|
||||||
|
open var nextEventsReturnValue: [GlobalSearchResult]? {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return nextEventsUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: [GlobalSearchResult]?? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = nextEventsUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
nextEventsUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
nextEventsUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var nextEventsClosure: (() async throws -> [GlobalSearchResult]?)?
|
||||||
|
|
||||||
|
open override func nextEvents() async throws -> [GlobalSearchResult]? {
|
||||||
|
if let error = nextEventsThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
nextEventsCallsCount += 1
|
||||||
|
if let nextEventsClosure = nextEventsClosure {
|
||||||
|
return try await nextEventsClosure()
|
||||||
|
} else {
|
||||||
|
return nextEventsReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
open class GrantLoginWithQrCodeHandlerSDKMock: MatrixRustSDK.GrantLoginWithQrCodeHandler, @unchecked Sendable {
|
open class GrantLoginWithQrCodeHandlerSDKMock: MatrixRustSDK.GrantLoginWithQrCodeHandler, @unchecked Sendable {
|
||||||
public init() {
|
public init() {
|
||||||
super.init(noHandle: .init())
|
super.init(noHandle: .init())
|
||||||
@@ -11686,7 +12106,7 @@ open class LeaveSpaceHandleSDKMock: MatrixRustSDK.LeaveSpaceHandle, @unchecked S
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open class LiveLocationSharesSDKMock: MatrixRustSDK.LiveLocationShares, @unchecked Sendable {
|
open class LiveLocationsObserverSDKMock: MatrixRustSDK.LiveLocationsObserver, @unchecked Sendable {
|
||||||
public init() {
|
public init() {
|
||||||
super.init(noHandle: .init())
|
super.init(noHandle: .init())
|
||||||
}
|
}
|
||||||
@@ -11730,8 +12150,8 @@ open class LiveLocationSharesSDKMock: MatrixRustSDK.LiveLocationShares, @uncheck
|
|||||||
open var subscribeListenerCalled: Bool {
|
open var subscribeListenerCalled: Bool {
|
||||||
return subscribeListenerCallsCount > 0
|
return subscribeListenerCallsCount > 0
|
||||||
}
|
}
|
||||||
open var subscribeListenerReceivedListener: LiveLocationShareListener?
|
open var subscribeListenerReceivedListener: LiveLocationsListener?
|
||||||
open var subscribeListenerReceivedInvocations: [LiveLocationShareListener] = []
|
open var subscribeListenerReceivedInvocations: [LiveLocationsListener] = []
|
||||||
|
|
||||||
open var subscribeListenerUnderlyingReturnValue: TaskHandle!
|
open var subscribeListenerUnderlyingReturnValue: TaskHandle!
|
||||||
open var subscribeListenerReturnValue: TaskHandle! {
|
open var subscribeListenerReturnValue: TaskHandle! {
|
||||||
@@ -11757,9 +12177,9 @@ open class LiveLocationSharesSDKMock: MatrixRustSDK.LiveLocationShares, @uncheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open var subscribeListenerClosure: ((LiveLocationShareListener) -> TaskHandle)?
|
open var subscribeListenerClosure: ((LiveLocationsListener) -> TaskHandle)?
|
||||||
|
|
||||||
open override func subscribe(listener: LiveLocationShareListener) -> TaskHandle {
|
open override func subscribe(listener: LiveLocationsListener) -> TaskHandle {
|
||||||
subscribeListenerCallsCount += 1
|
subscribeListenerCallsCount += 1
|
||||||
subscribeListenerReceivedListener = listener
|
subscribeListenerReceivedListener = listener
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
@@ -16319,17 +16739,17 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
|||||||
try await leaveClosure?()
|
try await leaveClosure?()
|
||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - liveLocationShares
|
//MARK: - liveLocationsObserver
|
||||||
|
|
||||||
open var liveLocationSharesUnderlyingCallsCount = 0
|
open var liveLocationsObserverUnderlyingCallsCount = 0
|
||||||
open var liveLocationSharesCallsCount: Int {
|
open var liveLocationsObserverCallsCount: Int {
|
||||||
get {
|
get {
|
||||||
if Thread.isMainThread {
|
if Thread.isMainThread {
|
||||||
return liveLocationSharesUnderlyingCallsCount
|
return liveLocationsObserverUnderlyingCallsCount
|
||||||
} else {
|
} else {
|
||||||
var returnValue: Int? = nil
|
var returnValue: Int? = nil
|
||||||
DispatchQueue.main.sync {
|
DispatchQueue.main.sync {
|
||||||
returnValue = liveLocationSharesUnderlyingCallsCount
|
returnValue = liveLocationsObserverUnderlyingCallsCount
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnValue!
|
return returnValue!
|
||||||
@@ -16337,27 +16757,27 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if Thread.isMainThread {
|
if Thread.isMainThread {
|
||||||
liveLocationSharesUnderlyingCallsCount = newValue
|
liveLocationsObserverUnderlyingCallsCount = newValue
|
||||||
} else {
|
} else {
|
||||||
DispatchQueue.main.sync {
|
DispatchQueue.main.sync {
|
||||||
liveLocationSharesUnderlyingCallsCount = newValue
|
liveLocationsObserverUnderlyingCallsCount = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open var liveLocationSharesCalled: Bool {
|
open var liveLocationsObserverCalled: Bool {
|
||||||
return liveLocationSharesCallsCount > 0
|
return liveLocationsObserverCallsCount > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
open var liveLocationSharesUnderlyingReturnValue: LiveLocationShares!
|
open var liveLocationsObserverUnderlyingReturnValue: LiveLocationsObserver!
|
||||||
open var liveLocationSharesReturnValue: LiveLocationShares! {
|
open var liveLocationsObserverReturnValue: LiveLocationsObserver! {
|
||||||
get {
|
get {
|
||||||
if Thread.isMainThread {
|
if Thread.isMainThread {
|
||||||
return liveLocationSharesUnderlyingReturnValue
|
return liveLocationsObserverUnderlyingReturnValue
|
||||||
} else {
|
} else {
|
||||||
var returnValue: LiveLocationShares? = nil
|
var returnValue: LiveLocationsObserver? = nil
|
||||||
DispatchQueue.main.sync {
|
DispatchQueue.main.sync {
|
||||||
returnValue = liveLocationSharesUnderlyingReturnValue
|
returnValue = liveLocationsObserverUnderlyingReturnValue
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnValue!
|
return returnValue!
|
||||||
@@ -16365,22 +16785,22 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if Thread.isMainThread {
|
if Thread.isMainThread {
|
||||||
liveLocationSharesUnderlyingReturnValue = newValue
|
liveLocationsObserverUnderlyingReturnValue = newValue
|
||||||
} else {
|
} else {
|
||||||
DispatchQueue.main.sync {
|
DispatchQueue.main.sync {
|
||||||
liveLocationSharesUnderlyingReturnValue = newValue
|
liveLocationsObserverUnderlyingReturnValue = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open var liveLocationSharesClosure: (() async -> LiveLocationShares)?
|
open var liveLocationsObserverClosure: (() async -> LiveLocationsObserver)?
|
||||||
|
|
||||||
open override func liveLocationShares() async -> LiveLocationShares {
|
open override func liveLocationsObserver() async -> LiveLocationsObserver {
|
||||||
liveLocationSharesCallsCount += 1
|
liveLocationsObserverCallsCount += 1
|
||||||
if let liveLocationSharesClosure = liveLocationSharesClosure {
|
if let liveLocationsObserverClosure = liveLocationsObserverClosure {
|
||||||
return await liveLocationSharesClosure()
|
return await liveLocationsObserverClosure()
|
||||||
} else {
|
} else {
|
||||||
return liveLocationSharesReturnValue
|
return liveLocationsObserverReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19968,6 +20388,77 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
try await withdrawVerificationAndResendUserIdsSendHandleClosure?(userIds, sendHandle)
|
try await withdrawVerificationAndResendUserIdsSendHandleClosure?(userIds, sendHandle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - searchMessages
|
||||||
|
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchUnderlyingCallsCount = 0
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return searchMessagesQueryNumResultsPerBatchUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = searchMessagesQueryNumResultsPerBatchUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
searchMessagesQueryNumResultsPerBatchUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
searchMessagesQueryNumResultsPerBatchUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchCalled: Bool {
|
||||||
|
return searchMessagesQueryNumResultsPerBatchCallsCount > 0
|
||||||
|
}
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchReceivedArguments: (query: String, numResultsPerBatch: UInt32)?
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchReceivedInvocations: [(query: String, numResultsPerBatch: UInt32)] = []
|
||||||
|
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchUnderlyingReturnValue: RoomSearchIterator!
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchReturnValue: RoomSearchIterator! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return searchMessagesQueryNumResultsPerBatchUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: RoomSearchIterator? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = searchMessagesQueryNumResultsPerBatchUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
searchMessagesQueryNumResultsPerBatchUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
searchMessagesQueryNumResultsPerBatchUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var searchMessagesQueryNumResultsPerBatchClosure: ((String, UInt32) -> RoomSearchIterator)?
|
||||||
|
|
||||||
|
open override func searchMessages(query: String, numResultsPerBatch: UInt32) -> RoomSearchIterator {
|
||||||
|
searchMessagesQueryNumResultsPerBatchCallsCount += 1
|
||||||
|
searchMessagesQueryNumResultsPerBatchReceivedArguments = (query: query, numResultsPerBatch: numResultsPerBatch)
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.searchMessagesQueryNumResultsPerBatchReceivedInvocations.append((query: query, numResultsPerBatch: numResultsPerBatch))
|
||||||
|
}
|
||||||
|
if let searchMessagesQueryNumResultsPerBatchClosure = searchMessagesQueryNumResultsPerBatchClosure {
|
||||||
|
return searchMessagesQueryNumResultsPerBatchClosure(query, numResultsPerBatch)
|
||||||
|
} else {
|
||||||
|
return searchMessagesQueryNumResultsPerBatchReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
open class RoomDirectorySearchSDKMock: MatrixRustSDK.RoomDirectorySearch, @unchecked Sendable {
|
open class RoomDirectorySearchSDKMock: MatrixRustSDK.RoomDirectorySearch, @unchecked Sendable {
|
||||||
public init() {
|
public init() {
|
||||||
@@ -23174,6 +23665,90 @@ open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
open class RoomSearchIteratorSDKMock: MatrixRustSDK.RoomSearchIterator, @unchecked Sendable {
|
||||||
|
public init() {
|
||||||
|
super.init(noHandle: .init())
|
||||||
|
}
|
||||||
|
|
||||||
|
public required init(unsafeFromHandle handle: UInt64) {
|
||||||
|
fatalError("init(unsafeFromHandle:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate var handle: UInt64 {
|
||||||
|
get { return underlyingHandle }
|
||||||
|
set(value) { underlyingHandle = value }
|
||||||
|
}
|
||||||
|
fileprivate var underlyingHandle: UInt64!
|
||||||
|
|
||||||
|
//MARK: - nextEvents
|
||||||
|
|
||||||
|
open var nextEventsThrowableError: Error?
|
||||||
|
open var nextEventsUnderlyingCallsCount = 0
|
||||||
|
open var nextEventsCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return nextEventsUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = nextEventsUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
nextEventsUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
nextEventsUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var nextEventsCalled: Bool {
|
||||||
|
return nextEventsCallsCount > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
open var nextEventsUnderlyingReturnValue: [RoomSearchResult]?
|
||||||
|
open var nextEventsReturnValue: [RoomSearchResult]? {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return nextEventsUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: [RoomSearchResult]?? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = nextEventsUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
nextEventsUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
nextEventsUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var nextEventsClosure: (() async throws -> [RoomSearchResult]?)?
|
||||||
|
|
||||||
|
open override func nextEvents() async throws -> [RoomSearchResult]? {
|
||||||
|
if let error = nextEventsThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
nextEventsCallsCount += 1
|
||||||
|
if let nextEventsClosure = nextEventsClosure {
|
||||||
|
return try await nextEventsClosure()
|
||||||
|
} else {
|
||||||
|
return nextEventsReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
open class SecretsBundleWithUserIdSDKMock: MatrixRustSDK.SecretsBundleWithUserId, @unchecked Sendable {
|
open class SecretsBundleWithUserIdSDKMock: MatrixRustSDK.SecretsBundleWithUserId, @unchecked Sendable {
|
||||||
public init() {
|
public init() {
|
||||||
super.init(noHandle: .init())
|
super.init(noHandle: .init())
|
||||||
@@ -26393,6 +26968,148 @@ open class SyncServiceBuilderSDKMock: MatrixRustSDK.SyncServiceBuilder, @uncheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - withRoomListConnectionId
|
||||||
|
|
||||||
|
open var withRoomListConnectionIdConnectionIdUnderlyingCallsCount = 0
|
||||||
|
open var withRoomListConnectionIdConnectionIdCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withRoomListConnectionIdConnectionIdUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withRoomListConnectionIdConnectionIdUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withRoomListConnectionIdConnectionIdUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withRoomListConnectionIdConnectionIdUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withRoomListConnectionIdConnectionIdCalled: Bool {
|
||||||
|
return withRoomListConnectionIdConnectionIdCallsCount > 0
|
||||||
|
}
|
||||||
|
open var withRoomListConnectionIdConnectionIdReceivedConnectionId: String?
|
||||||
|
open var withRoomListConnectionIdConnectionIdReceivedInvocations: [String] = []
|
||||||
|
|
||||||
|
open var withRoomListConnectionIdConnectionIdUnderlyingReturnValue: SyncServiceBuilder!
|
||||||
|
open var withRoomListConnectionIdConnectionIdReturnValue: SyncServiceBuilder! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withRoomListConnectionIdConnectionIdUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: SyncServiceBuilder? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withRoomListConnectionIdConnectionIdUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withRoomListConnectionIdConnectionIdUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withRoomListConnectionIdConnectionIdUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withRoomListConnectionIdConnectionIdClosure: ((String) -> SyncServiceBuilder)?
|
||||||
|
|
||||||
|
open override func withRoomListConnectionId(connectionId: String) -> SyncServiceBuilder {
|
||||||
|
withRoomListConnectionIdConnectionIdCallsCount += 1
|
||||||
|
withRoomListConnectionIdConnectionIdReceivedConnectionId = connectionId
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.withRoomListConnectionIdConnectionIdReceivedInvocations.append(connectionId)
|
||||||
|
}
|
||||||
|
if let withRoomListConnectionIdConnectionIdClosure = withRoomListConnectionIdConnectionIdClosure {
|
||||||
|
return withRoomListConnectionIdConnectionIdClosure(connectionId)
|
||||||
|
} else {
|
||||||
|
return withRoomListConnectionIdConnectionIdReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: - withRoomListTimelineLimit
|
||||||
|
|
||||||
|
open var withRoomListTimelineLimitLimitUnderlyingCallsCount = 0
|
||||||
|
open var withRoomListTimelineLimitLimitCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withRoomListTimelineLimitLimitUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withRoomListTimelineLimitLimitUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withRoomListTimelineLimitLimitUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withRoomListTimelineLimitLimitUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withRoomListTimelineLimitLimitCalled: Bool {
|
||||||
|
return withRoomListTimelineLimitLimitCallsCount > 0
|
||||||
|
}
|
||||||
|
open var withRoomListTimelineLimitLimitReceivedLimit: UInt32?
|
||||||
|
open var withRoomListTimelineLimitLimitReceivedInvocations: [UInt32] = []
|
||||||
|
|
||||||
|
open var withRoomListTimelineLimitLimitUnderlyingReturnValue: SyncServiceBuilder!
|
||||||
|
open var withRoomListTimelineLimitLimitReturnValue: SyncServiceBuilder! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withRoomListTimelineLimitLimitUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: SyncServiceBuilder? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withRoomListTimelineLimitLimitUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withRoomListTimelineLimitLimitUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withRoomListTimelineLimitLimitUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withRoomListTimelineLimitLimitClosure: ((UInt32) -> SyncServiceBuilder)?
|
||||||
|
|
||||||
|
open override func withRoomListTimelineLimit(limit: UInt32) -> SyncServiceBuilder {
|
||||||
|
withRoomListTimelineLimitLimitCallsCount += 1
|
||||||
|
withRoomListTimelineLimitLimitReceivedLimit = limit
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.withRoomListTimelineLimitLimitReceivedInvocations.append(limit)
|
||||||
|
}
|
||||||
|
if let withRoomListTimelineLimitLimitClosure = withRoomListTimelineLimitLimitClosure {
|
||||||
|
return withRoomListTimelineLimitLimitClosure(limit)
|
||||||
|
} else {
|
||||||
|
return withRoomListTimelineLimitLimitReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//MARK: - withSharePos
|
//MARK: - withSharePos
|
||||||
|
|
||||||
open var withSharePosEnableUnderlyingCallsCount = 0
|
open var withSharePosEnableUnderlyingCallsCount = 0
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ packages:
|
|||||||
# Element/Matrix dependencies
|
# Element/Matrix dependencies
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/element-hq/matrix-rust-components-swift
|
url: https://github.com/element-hq/matrix-rust-components-swift
|
||||||
exactVersion: 26.04.21
|
exactVersion: 26.04.23
|
||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
path: compound-ios
|
path: compound-ios
|
||||||
|
|||||||
Reference in New Issue
Block a user