util: In NameEnumeration, define functions for onData and onTimeout in the constructor.