def register_on_machine_state_changed(self, callback):
        """Set the callback function to consume on machine state changed events.

        Callback receives a IMachineStateChangedEvent object.

        Returns the callback_id
        """
        event_type = library.VBoxEventType.on_machine_state_changed
        return self.event_source.register_callback(callback, event_type)
def register_on_machine_state_changed ( self , callback ) : event_type = library . VBoxEventType . on_machine_state_changed return self . event_source . register_callback ( callback , event_type )
Set the callback function to consume on machine state changed events.

        Callback receives a IMachineStateChangedEvent object.

        Returns the callback_id