Files
IM/include/mp/Body.h
dongl ba80c3954d 0510 15:15 gtest邮件可发送 创建session类 记录全局链接会话 时间轮记录session超时。
邮件验证码 可以发送 c端test 没写  验证验证码注册还未完成
2023-05-10 16:07:31 +08:00

52 lines
1.0 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(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(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() {
body = new mp::body();
}
virtual ~Body() {
delete body;
}
protected:
mp::body* body;
};
#endif //IM2_BODY_H