looks like a better solution for this is to make CPeripherals extend Observable and make CWinEvents observe it for changes: https://github.com/xbmc/xbmc/blob/master/xbmc/utils/Observer.h

then call SetChanged() in OnDeviceRemoved(), OnDeviceAdded() and OnDeviceChanged(), and call NotifyObservers() after parsing the updates.

then we don't need the dupe list in this class, the iteration over that list here, and the ifdefs