Re: Detecting if iPod is connected?
Re: Detecting if iPod is connected?
- Subject: Re: Detecting if iPod is connected?
- From: Colin Cornaby <email@hidden>
- Date: Tue, 25 Jan 2005 18:41:32 -0800
I read something similar to this. The one thing I don't know if this
code handles is if there already is an iPod connected when the program
starts. I'm assuming the user is not using disk access on the iPod.
This means after iPod has done its sync job, my program may still start
up and needs to run a check for iPods. I don't think at this point any
iPod mounting, unmounting will occur, therefore no notifications. But
correct me if I'm wrong.
On Jan 25, 2005, at 6:32 PM, Olivier Lanctôt wrote:
Something along those lines
in -init
NSNotificationCenter *workspaceNotifCenter = [[NSWorkspace
sharedWorkspace] notificationCenter];
[workspaceNotifCenter addObserver:self
selector:@selector(_didUnmountCheck:)
name:NSWorkspaceDidUnmountNotification
object:nil];
- (void)_didUnmountCheck:(NSNotification *)aNotif {
if ([[[aNotif userInfo] objectForKey:@"NSDevicePath"]
isEqualToString:[self podPath]]) {
[self _unmanageCurrentPod];
[self _updateUI];
}
}
just use workspace's notifs
and when you wanna know if a drive is an ipod, you look for the
special ipod folders/files. like iPod_Control, and stuff.
On Tue, 25 Jan 2005 17:34:16 -0800, Colin Cornaby
<email@hidden> 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.
---------------------------
Colin Cornaby - http://gomac.blogspot.com/
Carpe Stellarem - Lead Programmer, Duality 5, InterAction -
http://carpestellarem.com
Macintosh Specialist - University of Portland - htttp://up.edu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
Olivier
---------------------------
Colin Cornaby - http://gomac.blogspot.com/
Carpe Stellarem - Lead Programmer, Duality 5, InterAction -
http://carpestellarem.com
Macintosh Specialist - University of Portland - htttp://up.edu
_______________________________________________
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