Adding device detector class.

Note: this class is not well maintained and needs more definitions to
bring it up to date.