#ifndef _IO_MIG_MACH_PORT_H_
#define _IO_MIG_MACH_PORT_H_
#include <dispatch/dispatch.h>
#include <CoreFoundation/CoreFoundation.h>
#include <mach/mach.h>
__BEGIN_DECLS
typedef struct __IOMIGMachPort * IOMIGMachPortRef;
typedef void (*IOMIGMachPortTerminationCallback)(IOMIGMachPortRef client, void * refcon);
typedef Boolean (*IOMIGMachPortDemuxCallback)(IOMIGMachPortRef client, mach_msg_header_t * request, mach_msg_header_t * reply, void *refcon);
CF_EXPORT
CFTypeID IOMIGMachPortGetTypeID(void);
CF_EXPORT
IOMIGMachPortRef IOMIGMachPortCreate(CFAllocatorRef allocator, CFIndex maxMessageSize, mach_port_t port);
CF_EXPORT
mach_port_t IOMIGMachPortGetPort(IOMIGMachPortRef migPort);
CF_EXPORT
void IOMIGMachPortRegisterTerminationCallback(IOMIGMachPortRef client, IOMIGMachPortTerminationCallback callback, void *refcon);
CF_EXPORT
void IOMIGMachPortRegisterDemuxCallback(IOMIGMachPortRef client, IOMIGMachPortDemuxCallback callback, void *refcon);
CF_EXPORT
void IOMIGMachPortScheduleWithRunLoop(IOMIGMachPortRef server, CFRunLoopRef runLoop, CFStringRef runLoopMode);
CF_EXPORT
void IOMIGMachPortUnscheduleFromRunLoop(IOMIGMachPortRef server, CFRunLoopRef runLoop, CFStringRef runLoopMode);
CF_EXPORT
void IOMIGMachPortScheduleWithDispatchQueue(IOMIGMachPortRef server, dispatch_queue_t queue);
CF_EXPORT
void IOMIGMachPortUnscheduleFromDispatchQueue(IOMIGMachPortRef server, dispatch_queue_t queue);
CF_EXPORT
void IOMIGMachPortCacheAdd(mach_port_t port, CFTypeRef server);
CF_EXPORT
void IOMIGMachPortCacheRemove(mach_port_t port);
CF_EXPORT
CFTypeRef IOMIGMachPortCacheCopy(mach_port_t port);
__END_DECLS
#endif