• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Callbacks from IOKit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Callbacks from IOKit


  • Subject: Callbacks from IOKit
  • From: Rick Mann <email@hidden>
  • Date: Mon, 21 Apr 2008 18:05:30 -0700

Being somewhat new to Cocoa, I often wonder if there's a better way to do things.

I'm doing some stuff with USB, and the example code I'm using uses IOServiceAddMatchingNotification() to add a pointer to a C callback to get notified when things happen on the USB bus.

In C++, one typically uses the refcon parameter in these APIs to pass a pointer to the C++ object responsible for handling the callback, and a pointer to a static C++ member function that massages the call into a method dispatch.

Is the same approach typically done in Obj-C? Are there higher-level APIs in Cocoa that I should use instead of IOServiceAddMatchingNotification()?

TIA,
--
Rick

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Callbacks from IOKit
      • From: Florent Pillet <email@hidden>
  • Prev by Date: Re: Where is mach_port_deallocate()?
  • Next by Date: Re: SynchroScrollView
  • Previous by thread: Re: Where is mach_port_deallocate()?
  • Next by thread: Re: Callbacks from IOKit
  • Index(es):
    • Date
    • Thread