response.h 541 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <rpcdb.h>
  3. #include <string>
  4. using std::string;
  5. class interpret_response {
  6. protected:
  7. interpret_response();
  8. public:
  9. virtual ~interpret_response();
  10. int interpret(response* res);
  11. protected:
  12. bool get_logged_in();
  13. void set_logged_in(bool value);
  14. string get_username();
  15. void set_username(string username);
  16. unsigned long get_session_key();
  17. void set_session_key(unsigned long session_key);
  18. virtual command_type get_command() = 0;
  19. virtual int perform(response* res) = 0;
  20. };