matrixuser.h 654 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef MATRIXUSER_H
  2. #define MATRIXUSER_H
  3. #include "core/reference.h"
  4. #include "matrix.h"
  5. class MatrixClient;
  6. class MatrixUser : public Reference {
  7. friend class MatrixClient;
  8. GDCLASS(MatrixUser, Reference);
  9. MatrixClient *client;
  10. String user_id;
  11. String display_name;
  12. String avatar_url;
  13. protected:
  14. static void _bind_methods();
  15. public:
  16. String get_display_name(bool sync=false);
  17. String get_friendly_name(bool sync=false);
  18. Error set_display_name(String display_name);
  19. String get_avatar_url(bool sync=false);
  20. Error set_avatar_url(String mxcurl);
  21. MatrixUser();
  22. void init(MatrixClient *client, String user_id);
  23. };
  24. #endif