refactor: use C enum to define constants instead of C macros.