A structure containing user-defined data and callbacks for CFHost objects.


struct CFHostClientContext


Instance Properties

var copyDescription: CFAllocatorCopyDescriptionCallBack?

The callback used to create a descriptive string representation of the info pointer (or the data pointed to by the info pointer) for debugging purposes. This callback is called by the CFCopyDescription(_:) function.

var info: UnsafeMutableRawPointer?

An arbitrary pointer to allocated memory containing user-defined data that can be associated with the host and that is passed to the callbacks.

var release: CFAllocatorReleaseCallBack?

The callback used to remove a retain previously added for the host on the info pointer.

var retain: CFAllocatorRetainCallBack?

The callback used to add a retain for the host on the info pointer for the life of the host, and may be used for temporary references the host needs to take. This callback returns the actual info pointer to store in the host, almost always just the pointer passed as the parameter.

var version: CFIndex

The version number of the structure type passed as a parameter to the host client function. The only valid version number is 0.

See Also


class CFHost

An opaque reference representing an CFHost object.

enum CFHostInfoType

Values indicating the type of data that is to be resolved or the type of data that was resolved.

func CFHostCreateWithAddress(CFAllocator?, CFData) -> Unmanaged<CFHost>

Uses an address to create an instance of a host object.

func CFHostCreateWithName(CFAllocator?, CFString) -> Unmanaged<CFHost>

Uses a name to create an instance of a host object.

func CFHostGetTypeID() -> CFTypeID

Gets the Core Foundation type identifier for the CFHost opaque type.

func CFHostSetClient(CFHost, CFHostClientCallBack?, UnsafeMutablePointer<CFHostClientContext>?) -> Bool

Associates a client context and a callback function with a CFHost object or disassociates a client context and callback function that were previously set.