mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 00:51:48 +08:00
add sendMessage function
This commit is contained in:
@ -122,12 +122,26 @@ namespace model
|
||||
QList<Message>* getRecentMessageList(const QString& chatSessionId);
|
||||
void resetRecentMessageList(const QString& chatSessionId, std::shared_ptr<bite_im::GetRecentMsgRsp> resp);
|
||||
|
||||
//发送消息给服务器
|
||||
void sendTextMessageAsync(const QString& chatSessionId, const QString& content);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
///辅助函数
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//根据会话id查询会话信息
|
||||
ChatSessionInfo* findChatSessionById(const QString& chatSessionId);
|
||||
//根据用户ID查询会话信息
|
||||
ChatSessionInfo* findChatSessionByUserId(const QString& userId);
|
||||
//把指定的会话信息,放到列表头部
|
||||
void topCurrentChatSessionId(const ChatSessionInfo& chatSessionInfo);
|
||||
|
||||
//设置/获取当前选中的会话
|
||||
void setCurrentChatSessionId(const QString& chatSessionId);
|
||||
const QString& getCurrentSessionId();
|
||||
|
||||
//添加消息到DataCenter中
|
||||
void addMessage(const Message& message);
|
||||
signals:
|
||||
//自定义信号
|
||||
void getMyselfDone();
|
||||
@ -135,5 +149,7 @@ namespace model
|
||||
void getChatSessionListDone();
|
||||
void getApplyListDone();
|
||||
void getRecentMessageListDone(const QString& chatSessionId);
|
||||
void sendMessageDone(MessageType messageType, const QByteArray& content, const QString& extraInfo);
|
||||
void updateLastMessage(const QString& chatSessionId);
|
||||
};
|
||||
} //end namespace model
|
||||
|
||||
Reference in New Issue
Block a user