Adds a generic method to register a command type callback.
Merge pull request #1 from sebastien-f/master

Adds a generic method to register a command type callback.