chatapi.h 709 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef CHATAPI_H
  2. #define CHATAPI_H
  3. #include <QFuture>
  4. #include <QJsonObject>
  5. #include <QString>
  6. #include "../network/networkaccessmanager.h"
  7. namespace ChatApi {
  8. /**
  9. * 创建聊天室
  10. * @param roomName 聊天室名称
  11. * @param description 聊天室描述
  12. * @param maxUsers 最大用户数
  13. * @return 返回包含基本响应的 Future
  14. */
  15. QFuture<HttpResponse> createRoom(const QString& roomName, const QString& description = "", int maxUsers = 100);
  16. /**
  17. * 获取聊天室列表
  18. * @param page 页码
  19. * @param pageSize 每页大小
  20. * @return 返回包含聊天室列表的 Future
  21. */
  22. QFuture<HttpResponse> getRoomList(int page = 1, int pageSize = 10);
  23. } // namespace ChatApi
  24. #endif // CHATAPI_H