Abstract event manager

sharing event manager API
FWIW you could probably place simple definitions next to the declaration for readability.