Callbacks allow n2n API users to extend n2n without modifying the upstream code. This also allows us to move the hin2n code, which is specific of android, out of the n2n repository.