Is this I/O Kit matching or disk arbitration matching?
For the former, I don't think there's a clean way to match the IOMedia object, because that would require matching against more than one level of the I/O Kit device tree (with at least one level in between). So you have to do a passive match against the IOMedia object and then examine its provider's provider('s provider's provider...) to determine whether to actually match, e.g. match against:
<key>IOProviderClass</key>
<string>IOMedia</string>
<key>IOPropertyMatch</key>
<dict>
<key>Whole</key>
<true/>
</dict>
And then iterate your way up the tree until you find a node that contains a "Protocol Characteristics" dictionary and examine its "Physical Interconnect" property to see if it says "USB".
I'm not 100% certain that there's not a simpler way, but I don't know about it if it exists.
If you're using the Disk Arbitration framework, it is easy:
CFMutableDictionaryRef matchingDict =
CFDictionaryCreateMutable(
kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
CFDictionaryAddValue(matchingDict,
kDADiskDescriptionDeviceProtocolKey,
CFSTR(kIOPropertyPhysicalInterconnectTypeUSB));
(quoted from the Disk Arbitration Programming Guide). From there, you can get the underlying IOMedia object by calling the DADiskCopyIOMedia function, which makes that probably the better API, assuming you're not doing in-kernel matching.
For other folks who might read this answer in the future, if you happen to be doing in-kernel matching for a kext that needs to attach to an IOMedia nub, just walk the provider chain in your probe method, and return either an instance of your class (to allow your driver to attach) or NULL (to reject that IOMedia object). Obviously that doesn't apply to a Cocoa app. Count your blessings. :-)