Monitor for plugged/unplugged messages to be able to use that as a trigger to enable/disable XMBC...
Item 3 here: https://forums.highrez.co.uk/viewtopic.php?f=6&t=4330&p=21919#p21918