Re: Detecting if iPod is connected?
Re: Detecting if iPod is connected?
- Subject: Re: Detecting if iPod is connected?
- From: Kevin Ballard <email@hidden>
- Date: Tue, 25 Jan 2005 21:38:49 -0500
I don't know anything about IOKit, except that you can request to be
told when a new FireWire device is plugged in (so you can detect the
iPod without it being mounted). Once you know that a new device is
plugged in, you can use a reverse-engineered private iPod framework to
get a list of all connected iPods and to get a lock for them (which
mounts them if they aren't already), get the mountpoint, do what you
want, and unlock them.
The private iPod framework isn't hard to reverse-engineer, although the
normal caveats about using private frameworks apply.
If you don't want to use a private framework, you could just content
yourself with listening for volume mounted notifications (either via
IOKit or NSWorkspace's NSNotificationCenter), then looking for the
/iPod_Control on each volume - if it exists, it's an iPod (unless
somebody is deliberately trying to fool your code - you might want to
look for the iTunes database inside iPod_Control as well)
On Jan 25, 2005, at 8:34 PM, Colin Cornaby wrote:
I was wondering if anyone here had done iPod connection? It occurred
to me that somehow if you did a sweep of the connected FireWire
devices, you could tell which ones are iPods and tell it to mount.
Looking at IOKit it looks like you can return the FireWire devices,
and pull some information (the most obvious so far looks to be the
vendor being "Apple Computer" as to telling which ones are iPods).
Before I went through all the trouble of trying to code out this
problem, I was wondering if anybody else has done work with IOKit in
regard to FireWire devices, or perhaps even iPods, who could give me a
few pointers.
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden