IM_Client/api/MP/Body.h
dongl a67f301e79 现在只能添加直接添加的 待和server修改
已修改
请求包添加了几个函数
add修改
待完善
addfriendswindow 界面
添加好友后好友列表立马回显
2023-06-18 18:42:58 +08:00

68 lines
1.5 KiB
C++

//
// Created by dongl on 23-4-21.
//
#ifndef IM2_BODY_H
#define IM2_BODY_H
#include "proto/mp.body.pb.h"
class Body {
public:
// account 可能是 账户 手机号 邮箱
Body(mp::MP_SUB_TYPE subType, const std::string& account, const std::string& password) {
body = new mp::body();
body->set_subcommand(subType);
body->set_account(account);
body->set_password(password);
}
Body(mp::MP_SUB_TYPE subType, const std::string& account, const std::string& password, const std::string& data) {
body = new mp::body();
body->set_subcommand(subType);
body->set_account(account);
body->set_password(password);
body->set_data(data);
}
Body(mp::MP_SUB_TYPE subType, const std::string& account) {
body = new mp::body();
body->set_subcommand(subType);
body->set_account(account);
}
Body(mp::MP_SUB_TYPE subType, uint64_t target, uint64_t source, const std::string& data) {
body = new mp::body();
body->set_target(target);
body->set_source(source);
body->set_data(data);
body->set_subcommand(subType);
}
Body(mp::MP_SUB_TYPE subType, uint64_t target, uint64_t source) {
body = new mp::body();
body->set_target(target);
body->set_source(source);
body->set_subcommand(subType);
}
Body() {
body = new mp::body();
}
virtual ~Body() {
}
protected:
mp::body* body;
};
#endif //IM2_BODY_H