Skip to content
Snippets Groups Projects
Select Git revision
  • bfca8d844e5c36fe09712b3bea609e2a12b13644
  • 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

DB+GroupChatInfo.swift

Blame
  • NewCMix.swift 834 B
    import Bindings
    import XCTestDynamicOverlay
    
    public struct NewCMix {
      public var run: (String, String, Data, String?) throws -> Void
    
      public func callAsFunction(
        ndfJSON: String,
        storageDir: String,
        password: Data,
        registrationCode: String?
      ) throws {
        try run(ndfJSON, storageDir, password, registrationCode)
      }
    }
    
    extension NewCMix {
      public static let live = NewCMix { ndfJSON, storageDir, password, registrationCode in
        var error: NSError?
        let result = BindingsNewCmix(ndfJSON, storageDir, password, registrationCode, &error)
        if let error = error {
          throw error
        }
        if !result {
          fatalError("BindingsNewCMix returned `false` without providing error")
        }
      }
    }
    
    extension NewCMix {
      public static let unimplemented = NewCMix(
        run: XCTUnimplemented("\(Self.self)")
      )
    }