• 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
Re: Mount/Unmount events in Foundation tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mount/Unmount events in Foundation tool


  • Subject: Re: Mount/Unmount events in Foundation tool
  • From: James Bucanek <email@hidden>
  • Date: Fri, 26 Jan 2007 10:25:42 -0700

R. Matthew Emerson wrote on Thursday, January 25, 2007:
>It would appear to be necessary to grovel through the DiskArbitration
>framework headers.

It would -- something I don't normally think about.

The lack of documentation here is somewhat distressing. Are these considered internal or private APIs in any way? Your example uses the DARegisterDiskAppearedCallback() function. On a whim, I searched developer.apple.com for DARegisterDiskAppearedCallback and got 0 hits. So Apple apparently has no documentation or example code that uses this function.

>It looks pretty straightforward, though.  I was able to throw
>together a trivial program in about 15 or 20 minutes from first
>looking at DiskArbitration.h.  Maybe it will help get you going.

It did indeed, thanks! I now have a registered DADiskAppearedCallback and my Cocoa tool is merrily getting disk mount events. Very nice.


Chris Suter wrote on Friday, January 26, 2007:
>Look at the source code for disktool.
>
>http://www.opensource.apple.com/darwinsource/10.4.8.ppc/DiskArbitration-156/disktool/disktool.c

Actually, this turned out to be more confusing than helpful. disktool never registers to get notifications of disk mount/unmount events (which makes sense, since it's a transient command line tool).

--
James Bucanek
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Mount/Unmount events in Foundation tool
      • From: Chris Suter <email@hidden>
References: 
 >Re: Mount/Unmount events in Foundation tool (From: "R. Matthew Emerson" <email@hidden>)

  • Prev by Date: Re: transparent background in Quartz Composition
  • Next by Date: Re: NSBrowser and NSLineBreakByTruncatingMiddle
  • Previous by thread: Re: Mount/Unmount events in Foundation tool
  • Next by thread: Re: Mount/Unmount events in Foundation tool
  • Index(es):
    • Date
    • Thread