This seems a lot similar to hardware switches for Wi-Fi and Bluetooth devices, which are handled by rfkill. Of course, this adds support for microphone and webcam now, but wouldn't it make sense to extend rfkill? To me the purpose of these hardware switches seems close enough to be handled by a generic framework.