Documentation Archive Developer
Search

vmnet Changes for Swift

vmnet

DeclarationProtocols
From
struct interface_event_t : OptionSetType {
    init(rawValue rawValue: UInt32)
    static var VMNET_INTERFACE_PACKETS_AVAILABLE: interface_event_t { get }
}
OptionSetType
To
struct interface_event_t : OptionSet {
    init(rawValue rawValue: UInt32)
    static var VMNET_INTERFACE_PACKETS_AVAILABLE: interface_event_t { get }
    func intersect(_ other: interface_event_t) -> interface_event_t
    func exclusiveOr(_ other: interface_event_t) -> interface_event_t
    mutating func unionInPlace(_ other: interface_event_t)
    mutating func intersectInPlace(_ other: interface_event_t)
    mutating func exclusiveOrInPlace(_ other: interface_event_t)
    func isSubsetOf(_ other: interface_event_t) -> Bool
    func isDisjointWith(_ other: interface_event_t) -> Bool
    func isSupersetOf(_ other: interface_event_t) -> Bool
    mutating func subtractInPlace(_ other: interface_event_t)
    func isStrictSupersetOf(_ other: interface_event_t) -> Bool
    func isStrictSubsetOf(_ other: interface_event_t) -> Bool
}
extension interface_event_t {
    func union(_ other: interface_event_t) -> interface_event_t
    func intersection(_ other: interface_event_t) -> interface_event_t
    func symmetricDifference(_ other: interface_event_t) -> interface_event_t
}
extension interface_event_t {
    func contains(_ member: interface_event_t) -> Bool
    mutating func insert(_ newMember: interface_event_t) -> (inserted: Bool, memberAfterInsert: interface_event_t)
    mutating func remove(_ member: interface_event_t) -> interface_event_t?
    mutating func update(with newMember: interface_event_t) -> interface_event_t?
}
extension interface_event_t {
    convenience init()
    mutating func formUnion(_ other: interface_event_t)
    mutating func formIntersection(_ other: interface_event_t)
    mutating func formSymmetricDifference(_ other: interface_event_t)
}
extension interface_event_t {
    convenience init<S : Sequence where S.Iterator.Element == interface_event_t>(_ sequence: S)
    convenience init(arrayLiteral arrayLiteral: interface_event_t...)
    mutating func subtract(_ other: interface_event_t)
    func isSubset(of other: interface_event_t) -> Bool
    func isSuperset(of other: interface_event_t) -> Bool
    func isDisjoint(with other: interface_event_t) -> Bool
    func subtracting(_ other: interface_event_t) -> interface_event_t
    var isEmpty: Bool { get }
    func isStrictSuperset(of other: interface_event_t) -> Bool
    func isStrictSubset(of other: interface_event_t) -> Bool
}
OptionSet

Modified interface_ref
Declaration
From
typealias interface_ref = COpaquePointer
To
typealias interface_ref = OpaquePointer

Declaration
From
func vmnet_interface_set_event_callback(_ interface: interface_ref, _ flags: interface_event_t, _ queue: dispatch_queue_t?, _ handler: ((interface_event_t, xpc_object_t) -> Void)?) -> vmnet_return_t
To
func vmnet_interface_set_event_callback(_ interface: interface_ref, _ flags: interface_event_t, _ queue: DispatchQueue?, _ handler: (@escaping (interface_event_t, xpc_object_t) -> Swift.Void)?) -> vmnet_return_t

Declaration
From
func vmnet_start_interface(_ interface_desc: xpc_object_t, _ queue: dispatch_queue_t, _ handler: (vmnet_return_t, xpc_object_t?) -> Void) -> interface_ref
To
func vmnet_start_interface(_ interface_desc: xpc_object_t, _ queue: DispatchQueue, _ handler: @escaping (vmnet_return_t, xpc_object_t?) -> Swift.Void) -> interface_ref?

Declaration
From
func vmnet_stop_interface(_ interface: interface_ref, _ queue: dispatch_queue_t, _ handler: (vmnet_return_t) -> Void) -> vmnet_return_t
To
func vmnet_stop_interface(_ interface: interface_ref, _ queue: DispatchQueue, _ handler: @escaping (vmnet_return_t) -> Swift.Void) -> vmnet_return_t