Skip to content
Snippets Groups Projects
Commit 0f4cb344 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Replace CMixWaitForMessageDelivery with CMixWaitForRoundResult

parent ca86f699
Branches
Tags
2 merge requests!102Release 1.0.0,!25Update Bindings
......@@ -14,7 +14,7 @@ public struct CMix {
public var waitForNetwork: CMixWaitForNetwork
public var registerClientErrorCallback: CMixRegisterClientErrorCallback
public var addHealthCallback: CMixAddHealthCallback
public var waitForMessageDelivery: CMixWaitForMessageDelivery
public var waitForRoundResult: CMixWaitForRoundResult
public var connect: CMixConnect
}
......@@ -34,7 +34,7 @@ extension CMix {
waitForNetwork: .live(bindingsCMix),
registerClientErrorCallback: .live(bindingsCMix),
addHealthCallback: .live(bindingsCMix),
waitForMessageDelivery: .live(bindingsCMix),
waitForRoundResult: .live(bindingsCMix),
connect: .live(bindingsCMix)
)
}
......@@ -55,7 +55,7 @@ extension CMix {
waitForNetwork: .unimplemented,
registerClientErrorCallback: .unimplemented,
addHealthCallback: .unimplemented,
waitForMessageDelivery: .unimplemented,
waitForRoundResult: .unimplemented,
connect: .unimplemented
)
}
import Bindings
import XCTestDynamicOverlay
public struct CMixWaitForMessageDelivery {
public struct CMixWaitForRoundResult {
public var run: (E2ESendReport, Int, MessageDeliveryCallback) throws -> Void
public func callAsFunction(
......@@ -13,11 +13,11 @@ public struct CMixWaitForMessageDelivery {
}
}
extension CMixWaitForMessageDelivery {
public static func live(_ bindingsCMix: BindingsCmix) -> CMixWaitForMessageDelivery {
CMixWaitForMessageDelivery { report, timeoutMS, callback in
extension CMixWaitForRoundResult {
public static func live(_ bindingsCMix: BindingsCmix) -> CMixWaitForRoundResult {
CMixWaitForRoundResult { report, timeoutMS, callback in
try bindingsCMix.wait(
forMessageDelivery: try report.encode(),
forRoundResult: try report.encode(),
mdc: callback.makeBindingsMessageDeliveryCallback(),
timeoutMS: timeoutMS
)
......@@ -25,8 +25,8 @@ extension CMixWaitForMessageDelivery {
}
}
extension CMixWaitForMessageDelivery {
public static let unimplemented = CMixWaitForMessageDelivery(
extension CMixWaitForRoundResult {
public static let unimplemented = CMixWaitForRoundResult(
run: XCTUnimplemented("\(Self.self)")
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment