diff --git a/Sources/ElixxirDAppsSDK/Cmix.swift b/Sources/ElixxirDAppsSDK/Cmix.swift index 5c5d9e34be8c9c6eab34eae2f1f6f4b95522c0e7..c9518d30ee1c426d48706cad13282924b7ac616e 100644 --- a/Sources/ElixxirDAppsSDK/Cmix.swift +++ b/Sources/ElixxirDAppsSDK/Cmix.swift @@ -3,6 +3,7 @@ import Bindings public struct Cmix { public var getId: CmixGetId public var makeReceptionIdentity: CmixMakeReceptionIdentity + public var makeLegacyReceptionIdentity: CmixMakeLegacyReceptionIdentity public var isHealthy: CmixIsHealthy public var hasRunningProcesses: CmixHasRunningProcesses public var networkFollowerStatus: CmixNetworkFollowerStatus @@ -15,6 +16,7 @@ extension Cmix { Cmix( getId: .live(bindingsCmix), makeReceptionIdentity: .live(bindingsCmix), + makeLegacyReceptionIdentity: .live(bindingsCmix), isHealthy: .live(bindingsCmix), hasRunningProcesses: .live(bindingsCmix), networkFollowerStatus: .live(bindingsCmix), @@ -28,6 +30,7 @@ extension Cmix { public static let unimplemented = Cmix( getId: .unimplemented, makeReceptionIdentity: .unimplemented, + makeLegacyReceptionIdentity: .unimplemented, isHealthy: .unimplemented, hasRunningProcesses: .unimplemented, networkFollowerStatus: .unimplemented, diff --git a/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift b/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift new file mode 100644 index 0000000000000000000000000000000000000000..2f461616bce21750aa9b57fc258e779eaccccbc3 --- /dev/null +++ b/Sources/ElixxirDAppsSDK/CmixMakeLegacyReceptionIdentity.swift @@ -0,0 +1,22 @@ +import Bindings +import XCTestDynamicOverlay + +public struct CmixMakeLegacyReceptionIdentity { + public var run: () throws -> Data + + public func callAsFunction() throws -> Data { + try run() + } +} + +extension CmixMakeLegacyReceptionIdentity { + public static func live(_ bindingsCmix: BindingsCmix) -> CmixMakeLegacyReceptionIdentity { + CmixMakeLegacyReceptionIdentity(run: bindingsCmix.makeLegacyReceptionIdentity) + } +} + +extension CmixMakeLegacyReceptionIdentity { + public static let unimplemented = CmixMakeLegacyReceptionIdentity( + run: XCTUnimplemented("\(Self.self)") + ) +}