Added callback adapter to transform return values, e.g. int -> enum in case of result codes.