pub unsafe extern "C-unwind" fn SCNetworkConnectionCreateWithServiceID(
allocator: Option<&CFAllocator>,
service_id: &CFString,
callout: SCNetworkConnectionCallBack,
context: *mut SCNetworkConnectionContext,
) -> Option<CFRetained<SCNetworkConnection>>SCNetworkConnection only.Expand description
Creates a new connection reference to use for getting the status or for connecting or disconnecting the associated service.
Parameter allocator: The CFAllocator that should be used to allocate
memory for the connection structure. This parameter may be
NULL in which case the current default CFAllocator is used.
If this reference is not a valid CFAllocator, the behavior
is undefined.
Parameter serviceID: A string that defines the service identifier
of the connection. Service identifiers uniquely identify
services in the system configuration database.
Parameter callout: The function to be called when the status
of the connection changes. If this parameter is NULL, the
application will not receive notifications of status change
and will need to poll for updates.
Parameter context: The SCNetworkConnectionContext associated with the
callout.
Returns: Returns a reference to the new SCNetworkConnection.