|
| 1 | +// Generated using Sourcery 2.3.0 — https://github.com/krzysztofzablocki/Sourcery |
| 2 | +// DO NOT EDIT |
| 3 | + |
| 4 | +// swiftlint:disable all |
| 5 | +@preconcurrency import Combine |
| 6 | +@preconcurrency import SwiftUI |
| 7 | + |
| 8 | +@preconcurrency import MatrixRustSDK |
| 9 | + |
| 10 | +import AnalyticsEvents |
| 11 | +import AVFoundation |
| 12 | +import CallKit |
| 13 | +import Foundation |
| 14 | +import LocalAuthentication |
| 15 | +import Photos |
| 16 | + |
| 17 | +class NSEUserSessionMock: NSEUserSessionProtocol, @unchecked Sendable { |
| 18 | + var inviteAvatarsVisibilityCallsCount = 0 |
| 19 | + var inviteAvatarsVisibilityCalled: Bool { |
| 20 | + return inviteAvatarsVisibilityCallsCount > 0 |
| 21 | + } |
| 22 | + |
| 23 | + var inviteAvatarsVisibility: InviteAvatars { |
| 24 | + get async { |
| 25 | + inviteAvatarsVisibilityCallsCount += 1 |
| 26 | + if let inviteAvatarsVisibilityClosure = inviteAvatarsVisibilityClosure { |
| 27 | + return await inviteAvatarsVisibilityClosure() |
| 28 | + } else { |
| 29 | + return underlyingInviteAvatarsVisibility |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + var underlyingInviteAvatarsVisibility: InviteAvatars! |
| 34 | + var inviteAvatarsVisibilityClosure: (() async -> InviteAvatars)? |
| 35 | + var mediaPreviewVisibilityCallsCount = 0 |
| 36 | + var mediaPreviewVisibilityCalled: Bool { |
| 37 | + return mediaPreviewVisibilityCallsCount > 0 |
| 38 | + } |
| 39 | + |
| 40 | + var mediaPreviewVisibility: MediaPreviews { |
| 41 | + get async { |
| 42 | + mediaPreviewVisibilityCallsCount += 1 |
| 43 | + if let mediaPreviewVisibilityClosure = mediaPreviewVisibilityClosure { |
| 44 | + return await mediaPreviewVisibilityClosure() |
| 45 | + } else { |
| 46 | + return underlyingMediaPreviewVisibility |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | + var underlyingMediaPreviewVisibility: MediaPreviews! |
| 51 | + var mediaPreviewVisibilityClosure: (() async -> MediaPreviews)? |
| 52 | + var threadsEnabled: Bool { |
| 53 | + get { return underlyingThreadsEnabled } |
| 54 | + set(value) { underlyingThreadsEnabled = value } |
| 55 | + } |
| 56 | + var underlyingThreadsEnabled: Bool! |
| 57 | + |
| 58 | + //MARK: - notificationItemProxy |
| 59 | + |
| 60 | + var notificationItemProxyRoomIDEventIDUnderlyingCallsCount = 0 |
| 61 | + var notificationItemProxyRoomIDEventIDCallsCount: Int { |
| 62 | + get { |
| 63 | + if Thread.isMainThread { |
| 64 | + return notificationItemProxyRoomIDEventIDUnderlyingCallsCount |
| 65 | + } else { |
| 66 | + var returnValue: Int? = nil |
| 67 | + DispatchQueue.main.sync { |
| 68 | + returnValue = notificationItemProxyRoomIDEventIDUnderlyingCallsCount |
| 69 | + } |
| 70 | + |
| 71 | + return returnValue! |
| 72 | + } |
| 73 | + } |
| 74 | + set { |
| 75 | + if Thread.isMainThread { |
| 76 | + notificationItemProxyRoomIDEventIDUnderlyingCallsCount = newValue |
| 77 | + } else { |
| 78 | + DispatchQueue.main.sync { |
| 79 | + notificationItemProxyRoomIDEventIDUnderlyingCallsCount = newValue |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | + var notificationItemProxyRoomIDEventIDCalled: Bool { |
| 85 | + return notificationItemProxyRoomIDEventIDCallsCount > 0 |
| 86 | + } |
| 87 | + var notificationItemProxyRoomIDEventIDReceivedArguments: (roomID: String, eventID: String)? |
| 88 | + var notificationItemProxyRoomIDEventIDReceivedInvocations: [(roomID: String, eventID: String)] = [] |
| 89 | + |
| 90 | + var notificationItemProxyRoomIDEventIDUnderlyingReturnValue: NotificationItemProxyProtocol? |
| 91 | + var notificationItemProxyRoomIDEventIDReturnValue: NotificationItemProxyProtocol? { |
| 92 | + get { |
| 93 | + if Thread.isMainThread { |
| 94 | + return notificationItemProxyRoomIDEventIDUnderlyingReturnValue |
| 95 | + } else { |
| 96 | + var returnValue: NotificationItemProxyProtocol?? = nil |
| 97 | + DispatchQueue.main.sync { |
| 98 | + returnValue = notificationItemProxyRoomIDEventIDUnderlyingReturnValue |
| 99 | + } |
| 100 | + |
| 101 | + return returnValue! |
| 102 | + } |
| 103 | + } |
| 104 | + set { |
| 105 | + if Thread.isMainThread { |
| 106 | + notificationItemProxyRoomIDEventIDUnderlyingReturnValue = newValue |
| 107 | + } else { |
| 108 | + DispatchQueue.main.sync { |
| 109 | + notificationItemProxyRoomIDEventIDUnderlyingReturnValue = newValue |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | + } |
| 114 | + var notificationItemProxyRoomIDEventIDClosure: ((String, String) async -> NotificationItemProxyProtocol?)? |
| 115 | + |
| 116 | + func notificationItemProxy(roomID: String, eventID: String) async -> NotificationItemProxyProtocol? { |
| 117 | + notificationItemProxyRoomIDEventIDCallsCount += 1 |
| 118 | + notificationItemProxyRoomIDEventIDReceivedArguments = (roomID: roomID, eventID: eventID) |
| 119 | + DispatchQueue.main.async { |
| 120 | + self.notificationItemProxyRoomIDEventIDReceivedInvocations.append((roomID: roomID, eventID: eventID)) |
| 121 | + } |
| 122 | + if let notificationItemProxyRoomIDEventIDClosure = notificationItemProxyRoomIDEventIDClosure { |
| 123 | + return await notificationItemProxyRoomIDEventIDClosure(roomID, eventID) |
| 124 | + } else { |
| 125 | + return notificationItemProxyRoomIDEventIDReturnValue |
| 126 | + } |
| 127 | + } |
| 128 | + //MARK: - roomForIdentifier |
| 129 | + |
| 130 | + var roomForIdentifierUnderlyingCallsCount = 0 |
| 131 | + var roomForIdentifierCallsCount: Int { |
| 132 | + get { |
| 133 | + if Thread.isMainThread { |
| 134 | + return roomForIdentifierUnderlyingCallsCount |
| 135 | + } else { |
| 136 | + var returnValue: Int? = nil |
| 137 | + DispatchQueue.main.sync { |
| 138 | + returnValue = roomForIdentifierUnderlyingCallsCount |
| 139 | + } |
| 140 | + |
| 141 | + return returnValue! |
| 142 | + } |
| 143 | + } |
| 144 | + set { |
| 145 | + if Thread.isMainThread { |
| 146 | + roomForIdentifierUnderlyingCallsCount = newValue |
| 147 | + } else { |
| 148 | + DispatchQueue.main.sync { |
| 149 | + roomForIdentifierUnderlyingCallsCount = newValue |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | + } |
| 154 | + var roomForIdentifierCalled: Bool { |
| 155 | + return roomForIdentifierCallsCount > 0 |
| 156 | + } |
| 157 | + var roomForIdentifierReceivedRoomID: String? |
| 158 | + var roomForIdentifierReceivedInvocations: [String] = [] |
| 159 | + |
| 160 | + var roomForIdentifierUnderlyingReturnValue: Room? |
| 161 | + var roomForIdentifierReturnValue: Room? { |
| 162 | + get { |
| 163 | + if Thread.isMainThread { |
| 164 | + return roomForIdentifierUnderlyingReturnValue |
| 165 | + } else { |
| 166 | + var returnValue: Room?? = nil |
| 167 | + DispatchQueue.main.sync { |
| 168 | + returnValue = roomForIdentifierUnderlyingReturnValue |
| 169 | + } |
| 170 | + |
| 171 | + return returnValue! |
| 172 | + } |
| 173 | + } |
| 174 | + set { |
| 175 | + if Thread.isMainThread { |
| 176 | + roomForIdentifierUnderlyingReturnValue = newValue |
| 177 | + } else { |
| 178 | + DispatchQueue.main.sync { |
| 179 | + roomForIdentifierUnderlyingReturnValue = newValue |
| 180 | + } |
| 181 | + } |
| 182 | + } |
| 183 | + } |
| 184 | + var roomForIdentifierClosure: ((String) -> Room?)? |
| 185 | + |
| 186 | + func roomForIdentifier(_ roomID: String) -> Room? { |
| 187 | + roomForIdentifierCallsCount += 1 |
| 188 | + roomForIdentifierReceivedRoomID = roomID |
| 189 | + DispatchQueue.main.async { |
| 190 | + self.roomForIdentifierReceivedInvocations.append(roomID) |
| 191 | + } |
| 192 | + if let roomForIdentifierClosure = roomForIdentifierClosure { |
| 193 | + return roomForIdentifierClosure(roomID) |
| 194 | + } else { |
| 195 | + return roomForIdentifierReturnValue |
| 196 | + } |
| 197 | + } |
| 198 | +} |
| 199 | +class NotificationItemProxyMock: NotificationItemProxyProtocol, @unchecked Sendable { |
| 200 | + var event: NotificationEvent? |
| 201 | + var senderID: String { |
| 202 | + get { return underlyingSenderID } |
| 203 | + set(value) { underlyingSenderID = value } |
| 204 | + } |
| 205 | + var underlyingSenderID: String! |
| 206 | + var roomID: String { |
| 207 | + get { return underlyingRoomID } |
| 208 | + set(value) { underlyingRoomID = value } |
| 209 | + } |
| 210 | + var underlyingRoomID: String! |
| 211 | + var receiverID: String { |
| 212 | + get { return underlyingReceiverID } |
| 213 | + set(value) { underlyingReceiverID = value } |
| 214 | + } |
| 215 | + var underlyingReceiverID: String! |
| 216 | + var senderDisplayName: String? |
| 217 | + var senderAvatarMediaSource: MediaSourceProxy? |
| 218 | + var roomDisplayName: String { |
| 219 | + get { return underlyingRoomDisplayName } |
| 220 | + set(value) { underlyingRoomDisplayName = value } |
| 221 | + } |
| 222 | + var underlyingRoomDisplayName: String! |
| 223 | + var roomAvatarMediaSource: MediaSourceProxy? |
| 224 | + var roomJoinedMembers: Int { |
| 225 | + get { return underlyingRoomJoinedMembers } |
| 226 | + set(value) { underlyingRoomJoinedMembers = value } |
| 227 | + } |
| 228 | + var underlyingRoomJoinedMembers: Int! |
| 229 | + var isRoomDirect: Bool { |
| 230 | + get { return underlyingIsRoomDirect } |
| 231 | + set(value) { underlyingIsRoomDirect = value } |
| 232 | + } |
| 233 | + var underlyingIsRoomDirect: Bool! |
| 234 | + var isRoomPrivate: Bool { |
| 235 | + get { return underlyingIsRoomPrivate } |
| 236 | + set(value) { underlyingIsRoomPrivate = value } |
| 237 | + } |
| 238 | + var underlyingIsRoomPrivate: Bool! |
| 239 | + var isNoisy: Bool { |
| 240 | + get { return underlyingIsNoisy } |
| 241 | + set(value) { underlyingIsNoisy = value } |
| 242 | + } |
| 243 | + var underlyingIsNoisy: Bool! |
| 244 | + var hasMention: Bool { |
| 245 | + get { return underlyingHasMention } |
| 246 | + set(value) { underlyingHasMention = value } |
| 247 | + } |
| 248 | + var underlyingHasMention: Bool! |
| 249 | + var threadRootEventID: String? |
| 250 | + |
| 251 | +} |
| 252 | +// swiftlint:enable all |
0 commit comments