Skip to content
Snippets Groups Projects
Select Git revision
  • d7def0e2aa2a2fe6c8683c2432b901cf476fa1c1
  • main default protected
  • dev protected
  • hotfixes-oct-2022
  • refactor/avatar-cell
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1
  • 1.0.8
  • 1.0.7
  • 1.0.6
12 results

Package.swift

Blame
  • CmixWaitForMessageDelivery.swift 883 B
    import Bindings
    import XCTestDynamicOverlay
    
    public struct CmixWaitForMessageDelivery {
      public var run: (MessageSendReport, Int, MessageDeliveryCallback) throws -> Void
    
      public func callAsFunction(
        report: MessageSendReport,
        timeoutMS: Int,
        callback: MessageDeliveryCallback
      ) throws {
        try run(report, timeoutMS, callback)
      }
    }
    
    extension CmixWaitForMessageDelivery {
      public static func live(_ bindingsCmix: BindingsCmix) -> CmixWaitForMessageDelivery {
        CmixWaitForMessageDelivery { report, timeoutMS, callback in
          try bindingsCmix.wait(
            forMessageDelivery: try report.encode(),
            mdc: callback.makeBindingsMessageDeliveryCallback(),
            timeoutMS: timeoutMS
          )
        }
      }
    }
    
    extension CmixWaitForMessageDelivery {
      public static let unimplemented = CmixWaitForMessageDelivery(
        run: XCTUnimplemented("\(Self.self)")
      )
    }