You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
473 B

3 months ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string.h>
  4. namespace iflytop {
  5. class Errno {
  6. public:
  7. const int code;
  8. const char* const errormsg;
  9. static const Errno OK;
  10. static const Errno ERR_USER_NAME_EXIST;
  11. static const Errno ERR_USER_PASSWD_ERROR;
  12. static const Errno ERR_USER_SPACE_FULL;
  13. Errno(int code, const char* errormsg) : code(code), errormsg(errormsg) {}
  14. bool isEq(const Errno& e) const { return code == e.code; }
  15. };
  16. } // namespace iflytop