diff --git a/Sources/ElixxirDAppsSDK/E2E.swift b/Sources/ElixxirDAppsSDK/E2E.swift index 872b18895f3ae87daf235b328c66ca97e1f6a462..da1b6d48beb6da5aba6f34e6edf2120a16acdbd3 100644 --- a/Sources/ElixxirDAppsSDK/E2E.swift +++ b/Sources/ElixxirDAppsSDK/E2E.swift @@ -8,6 +8,7 @@ public struct E2E { public var partitionSize: E2EPartitionSize public var addPartnerCallback: E2EAddPartnerCallback public var addService: E2EAddService + public var removeService: E2ERemoveService // TODO: } @@ -21,7 +22,8 @@ extension E2E { payloadSize: .live(bindingsE2E: bindingsE2E), partitionSize: .live(bindingsE2E: bindingsE2E), addPartnerCallback: .live(bindingsE2E), - addService: .live(bindingsE2E) + addService: .live(bindingsE2E), + removeService: .live(bindingsE2E) ) } } @@ -34,6 +36,7 @@ extension E2E { payloadSize: .unimplemented, partitionSize: .unimplemented, addPartnerCallback: .unimplemented, - addService: .unimplemented + addService: .unimplemented, + removeService: .unimplemented ) } diff --git a/Sources/ElixxirDAppsSDK/E2ERemoveService.swift b/Sources/ElixxirDAppsSDK/E2ERemoveService.swift new file mode 100644 index 0000000000000000000000000000000000000000..c1d33cbe0c0413d7ae792966d19387c036ab781a --- /dev/null +++ b/Sources/ElixxirDAppsSDK/E2ERemoveService.swift @@ -0,0 +1,22 @@ +import Bindings +import XCTestDynamicOverlay + +public struct E2ERemoveService { + public var run: (String) throws -> Void + + public func callAsFunction(tag: String) throws { + try run(tag) + } +} + +extension E2ERemoveService { + public static func live(_ bindingsE2E: BindingsE2e) -> E2ERemoveService { + E2ERemoveService(run: bindingsE2E.removeService(_:)) + } +} + +extension E2ERemoveService { + public static let unimplemented = E2ERemoveService( + run: XCTUnimplemented("\(Self.self)") + ) +}