Where Ideas Come To Die
What is daap://
bbum writes: “However, the claim could be made that the discovery of the daap:// protocol was a violation of the DMCA's reverse engineering clauses.”
daap:// is not a protocol in the sense that ftp://, http://, and even gopher:// are. In OS X the Launch Services system allows an application to register itself as being able to handle URIs prefixed with a certain string. This registration is declared in the program's Info.plist file. The Safari web browser has the following in its Info.plist file:
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>Web site URL</string> <key>CFBundleURLSchemes</key> <array> <string>http</string> <string>https</string> </array> <key>LSIsAppleDefaultForScheme</key> <true/> </dict> </array>
As you can see Safari declares itself as being able to handle URIs beginning with http or https.
iTunes has this in its Info.plist file:
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>iTunes Remote Library URL</string> <key>CFBundleURLSchemes</key> <array> <string>daap</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSIsAppleDefaultForType</key> <string>Yes</string> </dict> <dict> <key>CFBundleURLName</key> <string>iTunes Music Store URL</string> <key>CFBundleURLSchemes</key> <array> <string>itms</string> <string>itmss</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSIsAppleDefaultForType</key> <string>Yes</string> </dict>
In this iTunes declares itself as being the default program for applications beginning with daap and itms. To see this in action with an itms link replace itms with http and it will download an XML file. daap is HTTP as well, the hacked methods that have been devised to download the streams use noting more than curl to redirect the stream to a file.
Apple did not invent a new protocol for iTunes shared libraries or for the music store. They took advantage of a feature of OS X to create a very user friendly approach to integrating the web with an user's applications on their own computer. Instead of relying on downloading a helper file and having it be opened and bucking flakey MIME type support they choose to implement it this way. They have also used disk:// for remote mounting of disk image files with Disk Copy, ical:// for loading of calendars in iCal and iChat:// handles iChat. I'm sure there they have made more.
There are down sides to this, as it blurs the line between what is a protocol and what is not. However the upsides, easy integration and it “just works” on a Mac counter the URI argument.