IOService.h Reference

Declared in
IOService.h

Overview

This header contains the definition of the IOService class. IOService is the sole direct subclass of IORegistryEntry and is the base class of almost all I/O Kit family superclasses. IOService defines methods that support the life cycle of I/O Kit drivers. For more information on IOService, see I/O Kit Fundamentals.

Included Headers

  • <IOKit/IORegistryEntry.h>

  • <IOKit/IOReturn.h>

  • <IOKit/IODeviceMemory.h>

  • <IOKit/IONotifier.h>

  • <IOKit/IOLocks.h>

  • <IOKit/IOKitDebug.h>

  • <IOKit/IOInterrupts.h>

  • <IOKit/pwr_mgt/IOPMpowerState.h>

  • <IOKit/IOServicePM.h>

  • <IOKit/IOReportTypes.h>

  • <kern/thread_call.h>

See Also
  • IORegistryEntry

Callbacks

See the Overview section above for header-level documentation.

See Also
  • IORegistryEntry

IOServiceInterestHandler

typedef IOReturn ( *IOServiceInterestHandler)(
   void *target,
   void *refCon,
   UInt32 messageType,
   IOService *provider,
   void *messageArgument,
   vm_size_t argSize );

Parameters
target

Reference supplied when the notification was registered.

refCon

Reference constant supplied when the notification was registered.

messageType

Type of the message - IOKit defined in IOKit/IOMessage.h or family specific.

provider

The IOService object who is delivering the notification. It is retained for the duration of the handler's invocation and doesn't need to be released by the handler.

messageArgument

An argument for message, dependent on its type.

argSize

Non zero if the argument represents a struct of that size, used when delivering messages outside the kernel.

Availability
  • Available in OS X v10.0 and later.
Declared In
IOService.h

IOServiceNotificationHandler

typedef bool ( *IOServiceNotificationHandler)(
   void *target,
   void *refCon,
   IOService *newService );

Parameters
target

Reference supplied when the notification was registered.

refCon

Reference constant supplied when the notification was registered.

newService

The IOService object the notification is delivering. It is retained for the duration of the handler's invocation and doesn't need to be released by the handler.

Availability
  • Available in OS X v10.0 and later.
Declared In
IOService.h