The OpenNI::DeviceStateChangedListener class provides a means of registering for, and responding to
when a device's state is changed.
onDeviceStateChanged is triggered whenever the state of a connected device is changed.
To use this class, you should write a new class that inherits from it, and override the onDeviceStateChanged method. Once you instantiate your class, use the OpenNI::addDeviceStateChangedListener() function to add your listener object to OpenNI's list of listeners. Your handler function will then be called whenever the event occurs. A OpenNI::removeDeviceStateChangedListener() function is also provided, if you want to have your class stop listening to these events for any reason.