btw, in Vala, you can switch on a string. So this could be written as:

switch (transfer_mode_header) {
case TRANSFER_MODE_STREAMING:
...