Do use an enum type instead of a generic int

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>