user.h 546 B

123456789101112131415161718192021222324
  1. #ifndef __USER_H
  2. #define __USER_H
  3. #include "datablock.h"
  4. #include "biglist.h"
  5. #include <cstdint>
  6. class chatroom; // Forward declaration https://stackoverflow.com/questions/8526819/c-header-files-including-each-other-mutually
  7. class user
  8. {
  9. public:
  10. int64_t userid;
  11. datablock *username;
  12. datablock *password;
  13. biglist<chatroom *> chatrooms_allowed;
  14. user();
  15. ~user();
  16. void initialize();
  17. void clear();
  18. static user *find(biglist<user *>*user_list,datastring user_name);
  19. static user *find(biglist<user *>*user_list,int64_t user_id);
  20. };
  21. #endif