<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: insertion code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 03:20:04 GMT</pubDate>
    <description>DZone Snippets: insertion code</description>
    <item>
      <title>How to make the system notify you of audio cd insertion</title>
      <link>http://snippets.dzone.com/posts/show/3856</link>
      <description>// Uses the DiskArbitration framework to notify ya of when new audio cds are inserted&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;NSDictionary *match = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"IOCDMedia", [NSNumber numberWithBool:YES], nil] forKeys:[NSArray arrayWithObjects:(NSString *)kDADiskDescriptionMediaKindKey, kDADiskDescriptionMediaWholeKey, nil]];&lt;br /&gt;		&lt;br /&gt;_session = DASessionCreate(kCFAllocatorDefault);&lt;br /&gt;DASessionScheduleWithRunLoop(_session, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);&lt;br /&gt;DARegisterDiskAppearedCallback(_session, (CFDictionaryRef)match, diskAppearedCallback, NULL);&lt;br /&gt;DARegisterDiskDisappearedCallback(_session, (CFDictionaryRef)match, diskDisappearedCallback, NULL);&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 23 Apr 2007 12:05:23 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3856</guid>
      <author>aptiva (Fj&#195;&#182;lnir &#195;?sgeirsson)</author>
    </item>
  </channel>
</rss>
