mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 09:01:50 +08:00
refactor: 大规模调整项目目录结构,将ChatClient和ChatServer整合为Monorepo结构,并分为两个独立文件夹:chatclient/ 和 chatserver/。更新了ChatClient的CMakeLists.txt配置以适配新结构。
This commit is contained in:
318
ChatClient/include/model/data.h
Normal file
318
ChatClient/include/model/data.h
Normal file
@ -0,0 +1,318 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QIcon>
|
||||
#include <QString>
|
||||
#include <QUuid>
|
||||
|
||||
#include "base.qpb.h"
|
||||
#include "gateway.qpb.h"
|
||||
#include "user.qpb.h"
|
||||
#include "friend.qpb.h"
|
||||
#include "file.qpb.h"
|
||||
#include "notify.qpb.h"
|
||||
#include "speech_recognition.qpb.h"
|
||||
#include "message_storage.qpb.h"
|
||||
#include "message_transmit.qpb.h"
|
||||
|
||||
// 创建命名空间
|
||||
namespace model {
|
||||
///////////////////////////
|
||||
//工具函数,后续很多模块可能会用到
|
||||
///////////////////////////
|
||||
|
||||
//获取仅当前的源文件名
|
||||
static inline QString getFileName(const QString& path) {
|
||||
QFileInfo fileinfo(path);
|
||||
return fileinfo.fileName();
|
||||
}
|
||||
|
||||
//封装一个宏作为日志打印的方式
|
||||
#define TAG QString("[%1:%2]").arg(model::getFileName(__FILE__), QString::number(__LINE__))
|
||||
#define LOG() qDebug().noquote() << TAG
|
||||
|
||||
|
||||
//避免链接阶段出现“函数重定义的问题”
|
||||
static inline QString formatTime(int64_t timestamp) {
|
||||
//先把时间戳转换为datetime对象
|
||||
QDateTime datetime = QDateTime::fromSecsSinceEpoch(timestamp);
|
||||
//把datetime对象转化为格式化的时间
|
||||
return datetime.toString("MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
//通过这个函数得到秒级别的时间
|
||||
static inline int64_t getTime() {
|
||||
return QDateTime::currentSecsSinceEpoch();
|
||||
}
|
||||
|
||||
//根据QByteArray转换为QIcon
|
||||
static inline QIcon makeIcon(const QByteArray& byteArray) {
|
||||
//存储和操作图像数据的类
|
||||
QPixmap pixmap;
|
||||
pixmap.loadFromData(byteArray);
|
||||
QIcon icon(pixmap);
|
||||
return icon;
|
||||
}
|
||||
|
||||
// 读写文件操作
|
||||
// 从指定的文件中,读取所有的二进制内容,得到一个QByteArray
|
||||
static inline QByteArray loadFileToByteArray(const QString& path) {
|
||||
QFile file(path);
|
||||
bool ok = file.open(QFile::ReadOnly);
|
||||
if(!ok) {
|
||||
qDebug() << "文件打开失败!!!";
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
QByteArray content = file.readAll();
|
||||
file.close();
|
||||
return content;
|
||||
}
|
||||
|
||||
//将QByteArray的内容写入到某个指定的文件里
|
||||
static inline void writeByteArrayToFile(const QString& path, const QByteArray& content) {
|
||||
QFile file(path);
|
||||
bool ok = file.open(QFile::WriteOnly);
|
||||
if(!ok) {
|
||||
qDebug() << "文件打开失败!!!";
|
||||
return;
|
||||
}
|
||||
|
||||
file.write(content);
|
||||
file.flush();
|
||||
file.close();
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
// 用户信息
|
||||
///////////////////////////
|
||||
class UserInfo {
|
||||
public:
|
||||
//初始化,避免一些随机值可能的负面影响
|
||||
QString userId = ""; //用户编号
|
||||
QString nickname = ""; //用户昵称
|
||||
QString description = ""; //用户签名
|
||||
QString phone = ""; //手机号码
|
||||
QIcon avatar; //用户头像
|
||||
|
||||
//从protobuffer的UserInfo对象,转换为当前代码的UserInfo对象
|
||||
void load(const bite_im::UserInfo& userInfo) {
|
||||
this->userId = userInfo.userId();
|
||||
this->nickname = userInfo.nickname();
|
||||
this->phone = userInfo.phone();
|
||||
this->description = userInfo.description();
|
||||
if (userInfo.avatar().isEmpty()) {
|
||||
//使用默认的头像即可
|
||||
this->avatar = QIcon(":resource/image/defaultAvatar.png");
|
||||
}
|
||||
else {
|
||||
this->avatar = makeIcon(userInfo.avatar());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////
|
||||
//消息信息
|
||||
///////////////////////////
|
||||
enum MessageType {
|
||||
TEXT_TYPE, //文本消息
|
||||
IMAGE_TYPE, //图片消息
|
||||
FILE_TYPE, //文件消息
|
||||
SPEECH_TYPE //语音消息
|
||||
};
|
||||
|
||||
class Message {
|
||||
public:
|
||||
QString messageId = ""; //消息的编号
|
||||
QString chatSessionId = ""; //消息所属会话的编号
|
||||
QString time = ""; //消息的时间,通过格式化的方式来表示
|
||||
MessageType messageType = TEXT_TYPE; //消息类型
|
||||
UserInfo sender; //发送者信息
|
||||
QByteArray content; //消息的正文内容
|
||||
QString fileId = ""; //文件的身份标识,当为文件,图片,语音,视频有效,当为文本则为""
|
||||
QString fileName = ""; //文件名称
|
||||
|
||||
static Message makeMessage(MessageType messageType, const QString& chatSessionId, const UserInfo& sender,
|
||||
const QByteArray& content, const QString& extraInfo) {
|
||||
if(messageType == TEXT_TYPE) {
|
||||
return makeTextMessage(chatSessionId, sender, content);
|
||||
} else if(messageType == IMAGE_TYPE) {
|
||||
return makeImageMessage(chatSessionId, sender, content);
|
||||
} else if(messageType == FILE_TYPE) {
|
||||
return makeFileMessage(chatSessionId, sender, content, extraInfo);
|
||||
} else if(messageType == SPEECH_TYPE) {
|
||||
return makeSpeechMessage(chatSessionId, sender, content);
|
||||
} else {
|
||||
//触发了未知消息类型
|
||||
return Message();
|
||||
}
|
||||
}
|
||||
|
||||
void load(const bite_im::MessageInfo& messageInfo) {
|
||||
this->messageId = messageInfo.messageId();
|
||||
this->chatSessionId = messageInfo.chatSessionId();
|
||||
this->time = formatTime(messageInfo.timestamp());
|
||||
this->sender.load(messageInfo.sender());
|
||||
|
||||
//设置消息的类型
|
||||
auto type = messageInfo.message().messageType();
|
||||
if (type == bite_im::MessageTypeGadget::MessageType::STRING) {
|
||||
this->messageType = TEXT_TYPE;
|
||||
this->content = messageInfo.message().stringMessage().content().toUtf8();
|
||||
}
|
||||
else if (type == bite_im::MessageTypeGadget::MessageType::IMAGE) {
|
||||
this->messageType = IMAGE_TYPE;
|
||||
if (messageInfo.message().imageMessage().hasImageContent()) {
|
||||
this->content = messageInfo.message().imageMessage().imageContent();
|
||||
}
|
||||
if (messageInfo.message().imageMessage().hasFileId()) {
|
||||
this->fileId = messageInfo.message().imageMessage().fileId();
|
||||
}
|
||||
}
|
||||
else if (type == bite_im::MessageTypeGadget::MessageType::FILE) {
|
||||
this->messageType = FILE_TYPE;
|
||||
if (messageInfo.message().fileMessage().hasFileContents()) {
|
||||
this->content = messageInfo.message().fileMessage().fileContents();
|
||||
}
|
||||
if (messageInfo.message().fileMessage().hasFileId()) {
|
||||
this->fileId = messageInfo.message().fileMessage().fileId();
|
||||
}
|
||||
this->fileName = messageInfo.message().fileMessage().fileName();
|
||||
}
|
||||
else if (type == bite_im::MessageTypeGadget::MessageType::SPEECH) {
|
||||
this->messageType = SPEECH_TYPE;
|
||||
if (messageInfo.message().speechMessage().hasFileContents()) {
|
||||
this->content = messageInfo.message().speechMessage().fileContents();
|
||||
}
|
||||
if (messageInfo.message().speechMessage().hasFileId()) {
|
||||
this->fileId = messageInfo.message().speechMessage().fileId();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// 错误的类型, 啥都不做了, 只是打印一个日志
|
||||
LOG() << "非法的消息类型! type=" << type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
static QString makeId() {
|
||||
//Uuid这东西背后也是一套算法,能够生成“全球唯一的身份标识”
|
||||
//Qt对UUID也有封装
|
||||
//{75eb37e5-5af5-4bfb-8d0e-5261038a9107}(16进制的整数)
|
||||
return "M" + QUuid::createUuid().toString().mid(25, 12);
|
||||
}
|
||||
|
||||
static Message makeTextMessage(const QString& chatSessionId,const UserInfo& sender, const QByteArray& content) {
|
||||
Message message;
|
||||
//此处需要确保生成的messageId是唯一的
|
||||
message.messageId = makeId();
|
||||
message.chatSessionId = chatSessionId;
|
||||
message.sender = sender;
|
||||
message.time = formatTime(getTime());
|
||||
message.content = content;
|
||||
message.messageType = TEXT_TYPE;
|
||||
//对于文本消息来说,以下属性并不使用,所以设置为""
|
||||
message.fileId = "";
|
||||
message.fileName = "";
|
||||
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
static Message makeImageMessage(const QString& chatSessionId,const UserInfo& sender, const QByteArray& content) {
|
||||
Message message;
|
||||
|
||||
message.messageId = makeId();
|
||||
message.chatSessionId = chatSessionId;
|
||||
message.sender = sender;
|
||||
message.time = formatTime(getTime());
|
||||
message.content = content;
|
||||
message.messageType = IMAGE_TYPE;
|
||||
//后续使用时再进一步进行设置
|
||||
message.fileId = "";
|
||||
//此处并不使用,设置为""
|
||||
message.fileName = "";
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
static Message makeFileMessage(const QString& chatSessionId,const UserInfo& sender, const QByteArray& content, const QString& fileName) {
|
||||
Message message;
|
||||
|
||||
message.messageId = makeId();
|
||||
message.chatSessionId = chatSessionId;
|
||||
message.sender = sender;
|
||||
message.time = formatTime(getTime());
|
||||
message.content = content;
|
||||
message.messageType = FILE_TYPE;
|
||||
//后续使用时再进一步进行设置
|
||||
message.fileId = "";
|
||||
//此处并不使用,设置为""
|
||||
message.fileName = fileName;
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
static Message makeSpeechMessage(const QString& chatSessionId,const UserInfo& sender, const QByteArray& content) {
|
||||
Message message;
|
||||
|
||||
message.messageId = makeId();
|
||||
message.chatSessionId = chatSessionId;
|
||||
message.sender = sender;
|
||||
message.time = formatTime(getTime());
|
||||
message.content = content;
|
||||
message.messageType = SPEECH_TYPE;
|
||||
//后续使用时再进一步进行设置
|
||||
message.fileId = "";
|
||||
//此处并不使用,设置为""
|
||||
message.fileName = "";
|
||||
|
||||
return message;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////
|
||||
//会话信息
|
||||
///////////////////////////
|
||||
class ChatSessionInfo {
|
||||
public:
|
||||
QString chatSessionId = ""; //会话编号
|
||||
QString chatSessionName = ""; //会话名字(单聊或群聊)
|
||||
Message lastMessage; //表示会话的最新消息
|
||||
QIcon avatar; //会话的头像(单聊或群聊)
|
||||
QString userId = ""; //(单聊为对方的id,群聊为"")
|
||||
|
||||
|
||||
void load(const bite_im::ChatSessionInfo& chatSessionInfo) {
|
||||
this->chatSessionId = chatSessionInfo.chatSessionId();
|
||||
this->chatSessionName = chatSessionInfo.chatSessionName();
|
||||
if (chatSessionInfo.hasSingleChatFriendId()) {
|
||||
this->userId = chatSessionInfo.singleChatFriendId();
|
||||
}
|
||||
if (chatSessionInfo.hasPrevMessage()) {
|
||||
lastMessage.load(chatSessionInfo.prevMessage());
|
||||
}
|
||||
if (chatSessionInfo.hasAvatar() && !chatSessionInfo.avatar().isEmpty()) {
|
||||
//如果有头像,则设置这个头像
|
||||
this->avatar = makeIcon(chatSessionInfo.avatar());
|
||||
}
|
||||
else {
|
||||
//如果没有,则会根据是单聊还是群聊,使用不同的默认头像
|
||||
if (userId != "") {
|
||||
//单聊
|
||||
this->avatar = QIcon(":/resource/image/defaultAvatar.png");
|
||||
}
|
||||
else {
|
||||
//群聊
|
||||
this->avatar = QIcon(":/resource/image/groupAvatar.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} //end namespace model
|
||||
265
ChatClient/include/model/datacenter.h
Normal file
265
ChatClient/include/model/datacenter.h
Normal file
@ -0,0 +1,265 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <qstandardpaths.h>
|
||||
#include <QDir>
|
||||
#include <QJsonObject>
|
||||
|
||||
//#include <QList>
|
||||
|
||||
#include "data.h"
|
||||
#include "../network/netclient.h"
|
||||
|
||||
namespace model
|
||||
{
|
||||
|
||||
class DataCenter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static DataCenter* getInstance();
|
||||
|
||||
~DataCenter();
|
||||
/// <summary>
|
||||
/// 计算两个整数的和。
|
||||
/// </summary>
|
||||
/// <param name="a">第一个加数</param>
|
||||
/// <param name="b">第二个加数</param>
|
||||
/// <returns>返回 a + b 的结果</returns>
|
||||
/*int add(int a, int b) {
|
||||
return a + b;
|
||||
}*/
|
||||
|
||||
private:
|
||||
DataCenter();
|
||||
|
||||
static DataCenter* instance;
|
||||
|
||||
//列出DataCenter中要组织管理的所有数据
|
||||
|
||||
//当前客户端登录到服务器对应的登录会话Id
|
||||
QString loginSessionId;
|
||||
|
||||
//当前的用户信息
|
||||
UserInfo* myself = nullptr;
|
||||
|
||||
//好友列表
|
||||
QList<UserInfo>* friendList = nullptr;
|
||||
|
||||
//会话列表
|
||||
QList<ChatSessionInfo>* chatSessionList = nullptr;
|
||||
|
||||
//记录当前选中的会话是哪个
|
||||
QString currentChatSessionId = "";
|
||||
|
||||
//记录每个会话中,都有哪些成员
|
||||
QHash<QString, QList<UserInfo>>* memberList = nullptr;//unordered_map
|
||||
|
||||
//待处理的好友申请列表
|
||||
QList<UserInfo>* applyList = nullptr;
|
||||
|
||||
//每个会话最近消息的列表,key为chatSessionId,value为消息列表
|
||||
QHash<QString, QList<Message>>* recentMessages = nullptr;
|
||||
|
||||
//存储每个会话,表示未读消息的数量
|
||||
QHash<QString, int>* unreadMessageCount = nullptr;
|
||||
|
||||
// 用户的好友搜索结果
|
||||
QList<UserInfo>* searchUserResult = nullptr;
|
||||
|
||||
//保存一个历史消息搜索结果
|
||||
QList<Message>* searchMessageResult = nullptr;
|
||||
|
||||
//短信(邮箱)验证码的验证Id
|
||||
QString currentVerifyCodeId = "";
|
||||
|
||||
//让dataCenter持有Netclient实例
|
||||
network::NetClient netClient;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// 初始化数据文件
|
||||
/// </summary>
|
||||
void initDataFile();
|
||||
|
||||
//存储数据到文件中
|
||||
void saveDataFile();
|
||||
|
||||
//从数据文件中加载数据到内存
|
||||
void loadDataFile();
|
||||
|
||||
//清空未读消息数目
|
||||
void clearUnread(const QString& chatSessionId);
|
||||
|
||||
//增加未读消息的数目
|
||||
void addUnread(const QString& chatSessionId);
|
||||
|
||||
//获取未读消息的数目
|
||||
int getUnread(const QString& chatSessionId);
|
||||
|
||||
//获取到当前的登录会话Id
|
||||
const QString& getLoginSessionId() const{
|
||||
return loginSessionId;
|
||||
}
|
||||
|
||||
//验证网络的连通性
|
||||
void ping() { netClient.ping(); }
|
||||
|
||||
//针对netclient中的websocket进行初始化
|
||||
void initWebsocket();
|
||||
|
||||
//通过网络获取到用户的个人信息
|
||||
void getMyselfAsync();
|
||||
|
||||
UserInfo* getMyselfsync();
|
||||
//
|
||||
void resetMyself(std::shared_ptr<bite_im::GetUserInfoRsp> resp);
|
||||
|
||||
//通过网络获取好友列表
|
||||
QList<UserInfo>* getFriendList();
|
||||
void getFriendListAsync();
|
||||
void resetFriendList(std::shared_ptr<bite_im::GetFriendListRsp> resp);
|
||||
|
||||
//获取会话列表
|
||||
QList<ChatSessionInfo>* getChatSessionList();
|
||||
void getChatSessionListAsync();
|
||||
void resetChatSessionList(std::shared_ptr<bite_im::GetChatSessionListRsp> resp);
|
||||
|
||||
//获取好友申请列表
|
||||
QList<UserInfo>* getApplyList();
|
||||
void getApplyListAsync();
|
||||
void resetApplyList(std::shared_ptr<bite_im::GetPendingFriendEventListRsp> resp);
|
||||
|
||||
//获取最近的消息列表
|
||||
void getRecnetMessageListAsync(const QString& chatSessionId, bool updateUI);
|
||||
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);
|
||||
void sendImageMessageAsync(const QString& chatSessionId, const QByteArray& content);
|
||||
void sendFileMessageAsync(const QString& chatSessionId, const QString& fileName, const QByteArray& content);
|
||||
void sendSpeechMessageAsync(const QString& chatSessionId, const QByteArray& content);
|
||||
|
||||
//修改用户昵称
|
||||
void changeNicknameAsync(const QString& nickname);
|
||||
void resetNickname(const QString& nickname);
|
||||
|
||||
//修改用户签名
|
||||
void changeDescriptionAsync(const QString& desc);
|
||||
void resetDescription(const QString& desc);
|
||||
|
||||
//获取邮箱验证码
|
||||
void getVerifyCodeAsync(const QString& email);
|
||||
void resetVerifyCodeId(const QString& verifyCodeId);
|
||||
|
||||
//获取verifyCodeId
|
||||
const QString& getVerifyCodeId() const;
|
||||
|
||||
//修改邮箱号码
|
||||
void changePhoneAsync(const QString& email, const QString& verifyCodeId, const QString& verifyCode);
|
||||
void resetPhone(const QString& email);
|
||||
|
||||
//修改头像
|
||||
void changeAvatarAsync(const QByteArray& imageBytes);
|
||||
void resetAvatar(const QByteArray& avatar);
|
||||
|
||||
//删除好友
|
||||
void deleteFriendAsync(const QString& userId);
|
||||
void removeFriend(const QString& userId);
|
||||
void addFriendApplyAsync(const QString& userId);
|
||||
|
||||
//发送同意好友申请操作
|
||||
void acceptFriendApplyAsync(const QString& userId);
|
||||
UserInfo removeFromApplyList(const QString& userId);
|
||||
|
||||
//拒绝好友申请操作
|
||||
void rejectFriendApplyAsync(const QString& userId);
|
||||
|
||||
//创建群聊
|
||||
void createGroupChatSessionAsync(const QList<QString>& userIdList);
|
||||
|
||||
//获取会话成员列表
|
||||
void getMemberListAsync(const QString& chatSessionId);
|
||||
QList<UserInfo>* getMemberList(const QString& chatSessionId);
|
||||
void resetMemberList(const QString& chatSessionId, const QList<bite_im::UserInfo>& memberList);
|
||||
|
||||
//搜索用户
|
||||
void searchUserAsync(const QString& searchKey);
|
||||
QList<UserInfo>* getSearchUserResult();
|
||||
void resetSearchUserResult(const QList<bite_im::UserInfo>& userList);
|
||||
|
||||
//搜索历史消息
|
||||
void searchMessageAsync(const QString& searchKey);
|
||||
void searchMessageByTimeAsync(const QDateTime& begTime, const QDateTime& endTime);
|
||||
QList<Message>* getSearchMessageReuslt();
|
||||
void resetSearchMessageResult(const QList<bite_im::MessageInfo>& msgList);
|
||||
|
||||
//登录注册
|
||||
void userLoginAsync(const QString& username, const QString& password);
|
||||
void resetLoginSessionId(const QString& loginSessionId);
|
||||
void userRegisterAsync(const QString& username, const QString& password);
|
||||
void phoneLoginAsync(const QString& phone, const QString& verifyCode);
|
||||
void phoneRegisterAsync(const QString& phone, const QString& verifyCode);
|
||||
|
||||
//获取单个文件
|
||||
void getSingleFileAsync(const QString& fileId);
|
||||
|
||||
//语音转文字
|
||||
void speechConvertTextAsync(const QString& fileId, const QByteArray& content);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
///辅助函数
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//根据会话id查询会话信息
|
||||
ChatSessionInfo* findChatSessionById(const QString& chatSessionId);
|
||||
//根据用户ID查询会话信息
|
||||
ChatSessionInfo* findChatSessionByUserId(const QString& userId);
|
||||
//把指定的会话信息,放到列表头部
|
||||
void topCurrentChatSessionId(const ChatSessionInfo& chatSessionInfo);
|
||||
//根据用户id查询好友信息
|
||||
UserInfo* findFriendById(const QString& userId);
|
||||
|
||||
//设置/获取当前选中的会话
|
||||
void setCurrentChatSessionId(const QString& chatSessionId);
|
||||
const QString& getCurrentSessionId();
|
||||
|
||||
//添加消息到DataCenter中
|
||||
void addMessage(const Message& message);
|
||||
signals:
|
||||
//自定义信号
|
||||
void getMyselfDone();
|
||||
void getFriendListDone();
|
||||
void getChatSessionListDone();
|
||||
void getApplyListDone();
|
||||
void getRecentMessageListDone(const QString& chatSessionId);
|
||||
void getRecentMessageListDoneNoUI(const QString& chatSessionId);
|
||||
void sendMessageDone(MessageType messageType, const QByteArray& content, const QString& extraInfo);
|
||||
void updateLastMessage(const QString& chatSessionId);
|
||||
void receiveMessageDone(const Message& lastMessage);
|
||||
void changeNicknameDone();
|
||||
void changeDescriptionDone();
|
||||
void getVerifyCodeDone(bool ok);
|
||||
void changePhoneDone();
|
||||
void changeAvatarDone();
|
||||
void deleteFriendDone();
|
||||
void clearCurrentSession();
|
||||
void addFriendApplyDone();
|
||||
void receiveFriendApplyDone();
|
||||
void acceptFriendApplyDone();
|
||||
void rejectFriendApplyDone();
|
||||
void receiveFriendProcessDone(const QString& nickname, bool agree);
|
||||
void createGroupChatSessionDone();
|
||||
void receiveSessionCreateDone();
|
||||
void getMemberListDone(const QString& chatSessionId);
|
||||
void searchUserDone();
|
||||
void searchMessageDone();
|
||||
void userLoginDone(bool ok, const QString& reason);
|
||||
void userRegisterDone(bool ok, const QString& reason);
|
||||
void phoneLoginDone(bool ok, const QString& reason);
|
||||
void phoneRegisterDone(bool ok, const QString& reason);
|
||||
void getSingleFileDone(const QString& fileId, const QByteArray& fileContent);
|
||||
void speechConvertTextDone(const QString& fileId, const QString& text);
|
||||
};
|
||||
} //end namespace model
|
||||
Reference in New Issue
Block a user