Re: iTunes DB Change Notifications?
Re: iTunes DB Change Notifications?
- Subject: Re: iTunes DB Change Notifications?
- From: "I. Savant" <email@hidden>
- Date: Mon, 27 Jul 2009 13:46:24 -0400
On Jul 27, 2009, at 1:38 PM, Brad Gibbs wrote:
I've looked through the docs and Googled, but may not be looking for
the right terms.
Are there change notifications for the iTunes database? I'd like to
have an iTunes client on a different machine on the local network be
notified of changes, rather than having to poll and reload the
database regularly.
Short answer: No.
Long answer: You can get around this, but you won't get
instantaneous notifications. iTunes maintains an XML PLIST
representation of the database for third-party developers to latch
onto for reading only. Using FSEvents for Leopard and above (or
UKKQueue for Tiger and before), you can watch this file for changes
and respond accordingly.
Caveat: This doesn't work on network volumes. You'll have to have
the local machine monitoring for the changes and notifying any
interested parties (clients) over the network.
--
I.S.
_______________________________________________
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