| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef CHATAPI_H
- #define CHATAPI_H
- #include <QFuture>
- #include <QJsonObject>
- #include <QString>
- #include "../network/networkaccessmanager.h"
- namespace ChatApi {
- /**
- * 创建聊天室
- * @param roomName 聊天室名称
- * @param description 聊天室描述
- * @param maxUsers 最大用户数
- * @return 返回包含基本响应的 Future
- */
- QFuture<HttpResponse> createRoom(const QString& roomName, const QString& description = "", int maxUsers = 100);
- /**
- * 获取聊天室列表
- * @param page 页码
- * @param pageSize 每页大小
- * @return 返回包含聊天室列表的 Future
- */
- QFuture<HttpResponse> getRoomList(int page = 1, int pageSize = 10);
- /**
- * 重置房间统计数据
- * @param roomId 房间ID
- * @return 返回包含基本响应的 Future
- */
- QFuture<HttpResponse> resetRoomStats(const QString& roomId);
- /**
- * 重置用户消息统计数据
- * @param roomId 房间ID
- * @param userId 用户ID
- * @return 返回包含基本响应的 Future
- */
- QFuture<HttpResponse> resetUserStats(const QString& roomId, const QString& userId);
- } // namespace ChatApi
- #endif // CHATAPI_H
|