Conversion to enum for messages in C++, addition of the connection class prototypes in java