Blocks callback APIs as an alternative to the delegate

Add a blocks callback APIs as an alternative to the traditional delegate based callback system currently used.