convert the thread IO state and type to use enums.