更改项目结构, mp独立为一个模块

This commit is contained in:
2023-05-14 15:38:07 +08:00
parent dd89995e42
commit 8fa47d103c
34 changed files with 14 additions and 17 deletions

51
MP/Body.h Normal file
View File

@@ -0,0 +1,51 @@
//
// 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() {
}
protected:
mp::body* body;
};
#endif //IM2_BODY_H

31
MP/Cqi.h Normal file
View File

@@ -0,0 +1,31 @@
//
// Created by dongl on 23-4-21.
//
#ifndef IM2_CQI_H
#define IM2_CQI_H
#include "proto/mp.cqi.pb.h"
class Cqi {
public:
Cqi() {
cqi = new mp::cqi();
// 后期读配置文件
#ifdef _WIN32
cqi->set_cqi_type(mp::MC_TYPE_WINDOWS);
#else
cqi->set_cqi_type(mp::MC_TYPE_LINUX);
#endif
cqi->set_cqi_version(3.01);
}
virtual ~Cqi() {
}
protected:
mp::cqi* cqi;
};
#endif //IM2_CQI_H

56
MP/EnumMapping.h Normal file
View File

@@ -0,0 +1,56 @@
//
// Created by dongl on 23-4-25.
//
#ifndef IM2_ENUMMAPPING_H
#define IM2_ENUMMAPPING_H
#include "proto/mp.mph.pb.h"
// 定义一个宏来包含需要用到的枚举值
#define MY_ENUM_VALUES \
X(MP_REQUEST_LOGIN) \
X(MP_REQUEST_LOGOUT) \
X(MP_REQUEST_REGISTER) \
X(MP_RESPONSE_LOGIN) \
X(MP_RESPONSE_LOGOUT) \
X(MP_RESPONSE_REGISTER)
#if 0
// method 1
// 直接定义枚举值
enum {
SUMMER,
AUTUMN,
WINTER,
};
#else
// method 2
// 利用宏展开获取并定义枚举
#undef X
#define X(x) x,
enum {
MY_ENUM_VALUES
};
#endif
// 重新定义宏函数并获取新的展开形式,以获取枚举值对应的字符串;
const char *myenumToString(int n) {
#undef X
#define X(x) case (x): { return #x; }
#define MAKE_ENUM_CASES \
MY_ENUM_VALUES \
default: { return "unknown enum string."; }
switch (n) {
MAKE_ENUM_CASES
}
}
#endif //IM2_ENUMMAPPING_H

29
MP/Mph.h Normal file
View File

@@ -0,0 +1,29 @@
//
// Created by dongl on 23-4-21.
//
#ifndef IM2_MPH_H
#define IM2_MPH_H
#include "proto/mp.mph.pb.h"
class Mph {
public:
Mph(mp::MP_TYPE type) {
mph = new mp::mph();
mph->set_mp_sum(1);
mph->set_mp_id(1);
mph->set_mp_type(type);
mph->set_mpb_size(1);
}
virtual ~Mph() {
delete mph;
}
protected:
mp::mph* mph;
};
#endif //IM2_MPH_H

8
MP/Packet.h Normal file
View File

@@ -0,0 +1,8 @@
//
// Created by dongl on 23-4-26.
//
#ifndef IM2_PACKET_H
#define IM2_PACKET_H
#endif //IM2_PACKET_H

29
MP/Request.h Normal file
View File

@@ -0,0 +1,29 @@
//
// Created by dongl on 23-4-21.
//
#ifndef IM2_REQUEST_H
#define IM2_REQUEST_H
#include "proto/mp.request.pb.h"
#include "Mph.h"
#include "Body.h"
#include "Cqi.h"
class Request : public Mph, Body, Cqi {
public:
Request(mp::MP_TYPE type, mp::MP_SUB_TYPE subType, const std::string& account, const std::string& password);
Request(mp::MP_TYPE type, uint64_t target, uint64_t source, const std::string& data);
~Request() override;
public:
std::string packet();
private:
void init();
private:
mp::request* request = nullptr;
};
#endif //IM2_REQUEST_H

30
MP/Response.h Normal file
View File

@@ -0,0 +1,30 @@
//
// Created by dongl on 23-4-21.
//
#ifndef IM2_RESPONSE_H
#define IM2_RESPONSE_H
#include "proto/mp.response.pb.h"
#include "Mph.h"
#include "Body.h"
#include "Sri.h"
class Response : public Mph, Sri{
public:
Response(mp::MP_TYPE type, mp::MP_SRI code, const std::string &username, const std::string &msg, const std::string &token);
~Response() override;
std::string packet ();
private:
void init();
private:
mp::response* response = nullptr;
};
#endif //IM2_RESPONSE_H

32
MP/Sri.h Normal file
View File

@@ -0,0 +1,32 @@
//
// Created by dongl on 23-4-23.
//
#ifndef IM2_SRI_H
#define IM2_SRI_H
#include "proto/mp.sri.pb.h"
class Sri {
public:
Sri(mp::MP_SRI code, const std::string& username, const std::string& msg, const std::string& token) {
sri = new mp::sri();
sri->set_sri_code(code);
sri->set_sri_msg(msg);
sri->set_sri_token(token);
sri->set_sri_username(username);
}
Sri() {}
virtual ~Sri() {
}
public:
mp::sri* sri = nullptr;
};
#endif //IM2_SRI_H

View File

@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.body.proto
#include "proto/mp.body.pb.h"
#include "mp.body.pb.h"
#include <algorithm>

633
MP/proto/mp.body.pb.h Normal file
View File

@@ -0,0 +1,633 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.body.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_mp_2ebody_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_mp_2ebody_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3012000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "mp.mph.pb.h"
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_mp_2ebody_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_mp_2ebody_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mp_2ebody_2eproto;
namespace mp {
class body;
class bodyDefaultTypeInternal;
extern bodyDefaultTypeInternal _body_default_instance_;
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template<> ::mp::body* Arena::CreateMaybeMessage<::mp::body>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace mp {
// ===================================================================
class body PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mp.body) */ {
public:
inline body() : body(nullptr) {};
virtual ~body();
body(const body& from);
body(body&& from) noexcept
: body() {
*this = ::std::move(from);
}
inline body& operator=(const body& from) {
CopyFrom(from);
return *this;
}
inline body& operator=(body&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const body& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const body* internal_default_instance() {
return reinterpret_cast<const body*>(
&_body_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(body& a, body& b) {
a.Swap(&b);
}
inline void Swap(body* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(body* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline body* New() const final {
return CreateMaybeMessage<body>(nullptr);
}
body* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<body>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const body& from);
void MergeFrom(const body& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(body* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "mp.body";
}
protected:
explicit body(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_mp_2ebody_2eproto);
return ::descriptor_table_mp_2ebody_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kAccountFieldNumber = 2,
kPasswordFieldNumber = 3,
kDataFieldNumber = 6,
kTargetFieldNumber = 4,
kSourceFieldNumber = 5,
kSubcommandFieldNumber = 1,
};
// string account = 2;
void clear_account();
const std::string& account() const;
void set_account(const std::string& value);
void set_account(std::string&& value);
void set_account(const char* value);
void set_account(const char* value, size_t size);
std::string* mutable_account();
std::string* release_account();
void set_allocated_account(std::string* account);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_account();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_account(
std::string* account);
private:
const std::string& _internal_account() const;
void _internal_set_account(const std::string& value);
std::string* _internal_mutable_account();
public:
// string password = 3;
void clear_password();
const std::string& password() const;
void set_password(const std::string& value);
void set_password(std::string&& value);
void set_password(const char* value);
void set_password(const char* value, size_t size);
std::string* mutable_password();
std::string* release_password();
void set_allocated_password(std::string* password);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_password();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_password(
std::string* password);
private:
const std::string& _internal_password() const;
void _internal_set_password(const std::string& value);
std::string* _internal_mutable_password();
public:
// string data = 6;
void clear_data();
const std::string& data() const;
void set_data(const std::string& value);
void set_data(std::string&& value);
void set_data(const char* value);
void set_data(const char* value, size_t size);
std::string* mutable_data();
std::string* release_data();
void set_allocated_data(std::string* data);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_data();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_data(
std::string* data);
private:
const std::string& _internal_data() const;
void _internal_set_data(const std::string& value);
std::string* _internal_mutable_data();
public:
// uint64 target = 4;
void clear_target();
::PROTOBUF_NAMESPACE_ID::uint64 target() const;
void set_target(::PROTOBUF_NAMESPACE_ID::uint64 value);
private:
::PROTOBUF_NAMESPACE_ID::uint64 _internal_target() const;
void _internal_set_target(::PROTOBUF_NAMESPACE_ID::uint64 value);
public:
// uint64 source = 5;
void clear_source();
::PROTOBUF_NAMESPACE_ID::uint64 source() const;
void set_source(::PROTOBUF_NAMESPACE_ID::uint64 value);
private:
::PROTOBUF_NAMESPACE_ID::uint64 _internal_source() const;
void _internal_set_source(::PROTOBUF_NAMESPACE_ID::uint64 value);
public:
// .mp.MP_SUB_TYPE subcommand = 1;
void clear_subcommand();
::mp::MP_SUB_TYPE subcommand() const;
void set_subcommand(::mp::MP_SUB_TYPE value);
private:
::mp::MP_SUB_TYPE _internal_subcommand() const;
void _internal_set_subcommand(::mp::MP_SUB_TYPE value);
public:
// @@protoc_insertion_point(class_scope:mp.body)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr account_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr password_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_;
::PROTOBUF_NAMESPACE_ID::uint64 target_;
::PROTOBUF_NAMESPACE_ID::uint64 source_;
int subcommand_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_mp_2ebody_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// body
// .mp.MP_SUB_TYPE subcommand = 1;
inline void body::clear_subcommand() {
subcommand_ = 0;
}
inline ::mp::MP_SUB_TYPE body::_internal_subcommand() const {
return static_cast< ::mp::MP_SUB_TYPE >(subcommand_);
}
inline ::mp::MP_SUB_TYPE body::subcommand() const {
// @@protoc_insertion_point(field_get:mp.body.subcommand)
return _internal_subcommand();
}
inline void body::_internal_set_subcommand(::mp::MP_SUB_TYPE value) {
subcommand_ = value;
}
inline void body::set_subcommand(::mp::MP_SUB_TYPE value) {
_internal_set_subcommand(value);
// @@protoc_insertion_point(field_set:mp.body.subcommand)
}
// string account = 2;
inline void body::clear_account() {
account_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& body::account() const {
// @@protoc_insertion_point(field_get:mp.body.account)
return _internal_account();
}
inline void body::set_account(const std::string& value) {
_internal_set_account(value);
// @@protoc_insertion_point(field_set:mp.body.account)
}
inline std::string* body::mutable_account() {
// @@protoc_insertion_point(field_mutable:mp.body.account)
return _internal_mutable_account();
}
inline const std::string& body::_internal_account() const {
return account_.Get();
}
inline void body::_internal_set_account(const std::string& value) {
account_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void body::set_account(std::string&& value) {
account_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.body.account)
}
inline void body::set_account(const char* value) {
GOOGLE_DCHECK(value != nullptr);
account_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.body.account)
}
inline void body::set_account(const char* value,
size_t size) {
account_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.body.account)
}
inline std::string* body::_internal_mutable_account() {
return account_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* body::release_account() {
// @@protoc_insertion_point(field_release:mp.body.account)
return account_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void body::set_allocated_account(std::string* account) {
if (account != nullptr) {
} else {
}
account_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), account,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.body.account)
}
inline std::string* body::unsafe_arena_release_account() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.body.account)
GOOGLE_DCHECK(GetArena() != nullptr);
return account_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void body::unsafe_arena_set_allocated_account(
std::string* account) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (account != nullptr) {
} else {
}
account_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
account, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.body.account)
}
// string password = 3;
inline void body::clear_password() {
password_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& body::password() const {
// @@protoc_insertion_point(field_get:mp.body.password)
return _internal_password();
}
inline void body::set_password(const std::string& value) {
_internal_set_password(value);
// @@protoc_insertion_point(field_set:mp.body.password)
}
inline std::string* body::mutable_password() {
// @@protoc_insertion_point(field_mutable:mp.body.password)
return _internal_mutable_password();
}
inline const std::string& body::_internal_password() const {
return password_.Get();
}
inline void body::_internal_set_password(const std::string& value) {
password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void body::set_password(std::string&& value) {
password_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.body.password)
}
inline void body::set_password(const char* value) {
GOOGLE_DCHECK(value != nullptr);
password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.body.password)
}
inline void body::set_password(const char* value,
size_t size) {
password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.body.password)
}
inline std::string* body::_internal_mutable_password() {
return password_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* body::release_password() {
// @@protoc_insertion_point(field_release:mp.body.password)
return password_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void body::set_allocated_password(std::string* password) {
if (password != nullptr) {
} else {
}
password_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), password,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.body.password)
}
inline std::string* body::unsafe_arena_release_password() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.body.password)
GOOGLE_DCHECK(GetArena() != nullptr);
return password_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void body::unsafe_arena_set_allocated_password(
std::string* password) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (password != nullptr) {
} else {
}
password_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
password, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.body.password)
}
// uint64 target = 4;
inline void body::clear_target() {
target_ = PROTOBUF_ULONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 body::_internal_target() const {
return target_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 body::target() const {
// @@protoc_insertion_point(field_get:mp.body.target)
return _internal_target();
}
inline void body::_internal_set_target(::PROTOBUF_NAMESPACE_ID::uint64 value) {
target_ = value;
}
inline void body::set_target(::PROTOBUF_NAMESPACE_ID::uint64 value) {
_internal_set_target(value);
// @@protoc_insertion_point(field_set:mp.body.target)
}
// uint64 source = 5;
inline void body::clear_source() {
source_ = PROTOBUF_ULONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 body::_internal_source() const {
return source_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 body::source() const {
// @@protoc_insertion_point(field_get:mp.body.source)
return _internal_source();
}
inline void body::_internal_set_source(::PROTOBUF_NAMESPACE_ID::uint64 value) {
source_ = value;
}
inline void body::set_source(::PROTOBUF_NAMESPACE_ID::uint64 value) {
_internal_set_source(value);
// @@protoc_insertion_point(field_set:mp.body.source)
}
// string data = 6;
inline void body::clear_data() {
data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& body::data() const {
// @@protoc_insertion_point(field_get:mp.body.data)
return _internal_data();
}
inline void body::set_data(const std::string& value) {
_internal_set_data(value);
// @@protoc_insertion_point(field_set:mp.body.data)
}
inline std::string* body::mutable_data() {
// @@protoc_insertion_point(field_mutable:mp.body.data)
return _internal_mutable_data();
}
inline const std::string& body::_internal_data() const {
return data_.Get();
}
inline void body::_internal_set_data(const std::string& value) {
data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void body::set_data(std::string&& value) {
data_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.body.data)
}
inline void body::set_data(const char* value) {
GOOGLE_DCHECK(value != nullptr);
data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.body.data)
}
inline void body::set_data(const char* value,
size_t size) {
data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.body.data)
}
inline std::string* body::_internal_mutable_data() {
return data_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* body::release_data() {
// @@protoc_insertion_point(field_release:mp.body.data)
return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void body::set_allocated_data(std::string* data) {
if (data != nullptr) {
} else {
}
data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.body.data)
}
inline std::string* body::unsafe_arena_release_data() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.body.data)
GOOGLE_DCHECK(GetArena() != nullptr);
return data_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void body::unsafe_arena_set_allocated_data(
std::string* data) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (data != nullptr) {
} else {
}
data_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
data, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.body.data)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace mp
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_mp_2ebody_2eproto

View File

@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.cqi.proto
#include "proto/mp.cqi.pb.h"
#include "mp.cqi.pb.h"
#include <algorithm>

313
MP/proto/mp.cqi.pb.h Normal file
View File

@@ -0,0 +1,313 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.cqi.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_mp_2ecqi_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_mp_2ecqi_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3012000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_mp_2ecqi_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_mp_2ecqi_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mp_2ecqi_2eproto;
namespace mp {
class cqi;
class cqiDefaultTypeInternal;
extern cqiDefaultTypeInternal _cqi_default_instance_;
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template<> ::mp::cqi* Arena::CreateMaybeMessage<::mp::cqi>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace mp {
enum MP_C_TYPE : int {
MC_TYPE_LINUX = 0,
MC_TYPE_WINDOWS = 1,
MP_C_TYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
MP_C_TYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool MP_C_TYPE_IsValid(int value);
constexpr MP_C_TYPE MP_C_TYPE_MIN = MC_TYPE_LINUX;
constexpr MP_C_TYPE MP_C_TYPE_MAX = MC_TYPE_WINDOWS;
constexpr int MP_C_TYPE_ARRAYSIZE = MP_C_TYPE_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MP_C_TYPE_descriptor();
template<typename T>
inline const std::string& MP_C_TYPE_Name(T enum_t_value) {
static_assert(::std::is_same<T, MP_C_TYPE>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function MP_C_TYPE_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
MP_C_TYPE_descriptor(), enum_t_value);
}
inline bool MP_C_TYPE_Parse(
const std::string& name, MP_C_TYPE* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<MP_C_TYPE>(
MP_C_TYPE_descriptor(), name, value);
}
// ===================================================================
class cqi PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mp.cqi) */ {
public:
inline cqi() : cqi(nullptr) {};
virtual ~cqi();
cqi(const cqi& from);
cqi(cqi&& from) noexcept
: cqi() {
*this = ::std::move(from);
}
inline cqi& operator=(const cqi& from) {
CopyFrom(from);
return *this;
}
inline cqi& operator=(cqi&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const cqi& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const cqi* internal_default_instance() {
return reinterpret_cast<const cqi*>(
&_cqi_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(cqi& a, cqi& b) {
a.Swap(&b);
}
inline void Swap(cqi* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(cqi* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline cqi* New() const final {
return CreateMaybeMessage<cqi>(nullptr);
}
cqi* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<cqi>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const cqi& from);
void MergeFrom(const cqi& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(cqi* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "mp.cqi";
}
protected:
explicit cqi(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_mp_2ecqi_2eproto);
return ::descriptor_table_mp_2ecqi_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kCqiTypeFieldNumber = 1,
kCqiVersionFieldNumber = 2,
};
// .mp.MP_C_TYPE cqi_type = 1;
void clear_cqi_type();
::mp::MP_C_TYPE cqi_type() const;
void set_cqi_type(::mp::MP_C_TYPE value);
private:
::mp::MP_C_TYPE _internal_cqi_type() const;
void _internal_set_cqi_type(::mp::MP_C_TYPE value);
public:
// float cqi_version = 2;
void clear_cqi_version();
float cqi_version() const;
void set_cqi_version(float value);
private:
float _internal_cqi_version() const;
void _internal_set_cqi_version(float value);
public:
// @@protoc_insertion_point(class_scope:mp.cqi)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
int cqi_type_;
float cqi_version_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_mp_2ecqi_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// cqi
// .mp.MP_C_TYPE cqi_type = 1;
inline void cqi::clear_cqi_type() {
cqi_type_ = 0;
}
inline ::mp::MP_C_TYPE cqi::_internal_cqi_type() const {
return static_cast< ::mp::MP_C_TYPE >(cqi_type_);
}
inline ::mp::MP_C_TYPE cqi::cqi_type() const {
// @@protoc_insertion_point(field_get:mp.cqi.cqi_type)
return _internal_cqi_type();
}
inline void cqi::_internal_set_cqi_type(::mp::MP_C_TYPE value) {
cqi_type_ = value;
}
inline void cqi::set_cqi_type(::mp::MP_C_TYPE value) {
_internal_set_cqi_type(value);
// @@protoc_insertion_point(field_set:mp.cqi.cqi_type)
}
// float cqi_version = 2;
inline void cqi::clear_cqi_version() {
cqi_version_ = 0;
}
inline float cqi::_internal_cqi_version() const {
return cqi_version_;
}
inline float cqi::cqi_version() const {
// @@protoc_insertion_point(field_get:mp.cqi.cqi_version)
return _internal_cqi_version();
}
inline void cqi::_internal_set_cqi_version(float value) {
cqi_version_ = value;
}
inline void cqi::set_cqi_version(float value) {
_internal_set_cqi_version(value);
// @@protoc_insertion_point(field_set:mp.cqi.cqi_version)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< ::mp::MP_C_TYPE> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::mp::MP_C_TYPE>() {
return ::mp::MP_C_TYPE_descriptor();
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_mp_2ecqi_2eproto

View File

@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.mph.proto
#include "proto/mp.mph.pb.h"
#include "mp.mph.pb.h"
#include <algorithm>

534
MP/proto/mp.mph.pb.h Normal file
View File

@@ -0,0 +1,534 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.mph.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_mp_2emph_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_mp_2emph_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3012000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_mp_2emph_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_mp_2emph_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mp_2emph_2eproto;
namespace mp {
class mph;
class mphDefaultTypeInternal;
extern mphDefaultTypeInternal _mph_default_instance_;
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template<> ::mp::mph* Arena::CreateMaybeMessage<::mp::mph>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace mp {
enum MP_TYPE : int {
MP_REQUEST_LOGIN = 0,
MP_REQUEST_LOGOUT = 1,
MP_REQUEST_REGISTER = 2,
MP_RESPONSE_LOGIN = 20,
MP_RESPONSE_LOGOUT = 21,
MP_RESPONSE_REGISTER = 22,
MP_REQUEST_PE_CODE = 40,
MP_RESPONSE_PE_CODE = 60,
MP_REQUEST_IM_ADD = 100,
MP_RESPONSE_IM_ADD = 120,
MP_TYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
MP_TYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool MP_TYPE_IsValid(int value);
constexpr MP_TYPE MP_TYPE_MIN = MP_REQUEST_LOGIN;
constexpr MP_TYPE MP_TYPE_MAX = MP_RESPONSE_IM_ADD;
constexpr int MP_TYPE_ARRAYSIZE = MP_TYPE_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MP_TYPE_descriptor();
template<typename T>
inline const std::string& MP_TYPE_Name(T enum_t_value) {
static_assert(::std::is_same<T, MP_TYPE>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function MP_TYPE_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
MP_TYPE_descriptor(), enum_t_value);
}
inline bool MP_TYPE_Parse(
const std::string& name, MP_TYPE* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<MP_TYPE>(
MP_TYPE_descriptor(), name, value);
}
enum MP_SUB_TYPE : int {
MP_REQUEST_LOGIN_EMAIL = 0,
MP_REQUEST_LOGIN_PHONE = 1,
MP_REQUEST_LOGIN_ACCOUNT = 2,
MP_REQUEST_REGISTER_EMAIL = 3,
MP_REQUEST_REGISTER_PHONE = 4,
MP_REQUEST_PE_CODE_EMAIL = 5,
MP_RESPONSE_PE_CODE_EMAIL = 6,
MP_REQUEST_PE_CODE_PHONE = 7,
MP_RESPONSE_PE_CODE_PHONE = 8,
MP_REQUEST_ADD_CONTACT_PERSON = 20,
MP_REQUEST_REMOVE_CONTACT_PERSON = 21,
MP_REQUEST_BLACK_LIST_CONTACT_PERSON = 22,
MP_RESPONSE_ADD_CONTACT_PERSON = 40,
MP_RESPONSE_REMOVE_CONTACT_PERSON = 41,
MP_RESPONSE_BLACK_LIST_CONTACT_PERSON = 42,
MP_SUB_TYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
MP_SUB_TYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool MP_SUB_TYPE_IsValid(int value);
constexpr MP_SUB_TYPE MP_SUB_TYPE_MIN = MP_REQUEST_LOGIN_EMAIL;
constexpr MP_SUB_TYPE MP_SUB_TYPE_MAX = MP_RESPONSE_BLACK_LIST_CONTACT_PERSON;
constexpr int MP_SUB_TYPE_ARRAYSIZE = MP_SUB_TYPE_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MP_SUB_TYPE_descriptor();
template<typename T>
inline const std::string& MP_SUB_TYPE_Name(T enum_t_value) {
static_assert(::std::is_same<T, MP_SUB_TYPE>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function MP_SUB_TYPE_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
MP_SUB_TYPE_descriptor(), enum_t_value);
}
inline bool MP_SUB_TYPE_Parse(
const std::string& name, MP_SUB_TYPE* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<MP_SUB_TYPE>(
MP_SUB_TYPE_descriptor(), name, value);
}
// ===================================================================
class mph PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mp.mph) */ {
public:
inline mph() : mph(nullptr) {};
virtual ~mph();
mph(const mph& from);
mph(mph&& from) noexcept
: mph() {
*this = ::std::move(from);
}
inline mph& operator=(const mph& from) {
CopyFrom(from);
return *this;
}
inline mph& operator=(mph&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const mph& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const mph* internal_default_instance() {
return reinterpret_cast<const mph*>(
&_mph_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(mph& a, mph& b) {
a.Swap(&b);
}
inline void Swap(mph* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(mph* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline mph* New() const final {
return CreateMaybeMessage<mph>(nullptr);
}
mph* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<mph>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const mph& from);
void MergeFrom(const mph& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(mph* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "mp.mph";
}
protected:
explicit mph(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_mp_2emph_2eproto);
return ::descriptor_table_mp_2emph_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kPathFieldNumber = 5,
kMpIdFieldNumber = 2,
kMpbSizeFieldNumber = 1,
kMpSumFieldNumber = 3,
kMpTypeFieldNumber = 4,
};
// string path = 5;
void clear_path();
const std::string& path() const;
void set_path(const std::string& value);
void set_path(std::string&& value);
void set_path(const char* value);
void set_path(const char* value, size_t size);
std::string* mutable_path();
std::string* release_path();
void set_allocated_path(std::string* path);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_path();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_path(
std::string* path);
private:
const std::string& _internal_path() const;
void _internal_set_path(const std::string& value);
std::string* _internal_mutable_path();
public:
// uint64 mp_id = 2;
void clear_mp_id();
::PROTOBUF_NAMESPACE_ID::uint64 mp_id() const;
void set_mp_id(::PROTOBUF_NAMESPACE_ID::uint64 value);
private:
::PROTOBUF_NAMESPACE_ID::uint64 _internal_mp_id() const;
void _internal_set_mp_id(::PROTOBUF_NAMESPACE_ID::uint64 value);
public:
// uint32 mpb_size = 1;
void clear_mpb_size();
::PROTOBUF_NAMESPACE_ID::uint32 mpb_size() const;
void set_mpb_size(::PROTOBUF_NAMESPACE_ID::uint32 value);
private:
::PROTOBUF_NAMESPACE_ID::uint32 _internal_mpb_size() const;
void _internal_set_mpb_size(::PROTOBUF_NAMESPACE_ID::uint32 value);
public:
// uint32 mp_sum = 3;
void clear_mp_sum();
::PROTOBUF_NAMESPACE_ID::uint32 mp_sum() const;
void set_mp_sum(::PROTOBUF_NAMESPACE_ID::uint32 value);
private:
::PROTOBUF_NAMESPACE_ID::uint32 _internal_mp_sum() const;
void _internal_set_mp_sum(::PROTOBUF_NAMESPACE_ID::uint32 value);
public:
// .mp.MP_TYPE mp_type = 4;
void clear_mp_type();
::mp::MP_TYPE mp_type() const;
void set_mp_type(::mp::MP_TYPE value);
private:
::mp::MP_TYPE _internal_mp_type() const;
void _internal_set_mp_type(::mp::MP_TYPE value);
public:
// @@protoc_insertion_point(class_scope:mp.mph)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_;
::PROTOBUF_NAMESPACE_ID::uint64 mp_id_;
::PROTOBUF_NAMESPACE_ID::uint32 mpb_size_;
::PROTOBUF_NAMESPACE_ID::uint32 mp_sum_;
int mp_type_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_mp_2emph_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// mph
// uint32 mpb_size = 1;
inline void mph::clear_mpb_size() {
mpb_size_ = 0u;
}
inline ::PROTOBUF_NAMESPACE_ID::uint32 mph::_internal_mpb_size() const {
return mpb_size_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint32 mph::mpb_size() const {
// @@protoc_insertion_point(field_get:mp.mph.mpb_size)
return _internal_mpb_size();
}
inline void mph::_internal_set_mpb_size(::PROTOBUF_NAMESPACE_ID::uint32 value) {
mpb_size_ = value;
}
inline void mph::set_mpb_size(::PROTOBUF_NAMESPACE_ID::uint32 value) {
_internal_set_mpb_size(value);
// @@protoc_insertion_point(field_set:mp.mph.mpb_size)
}
// uint64 mp_id = 2;
inline void mph::clear_mp_id() {
mp_id_ = PROTOBUF_ULONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 mph::_internal_mp_id() const {
return mp_id_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 mph::mp_id() const {
// @@protoc_insertion_point(field_get:mp.mph.mp_id)
return _internal_mp_id();
}
inline void mph::_internal_set_mp_id(::PROTOBUF_NAMESPACE_ID::uint64 value) {
mp_id_ = value;
}
inline void mph::set_mp_id(::PROTOBUF_NAMESPACE_ID::uint64 value) {
_internal_set_mp_id(value);
// @@protoc_insertion_point(field_set:mp.mph.mp_id)
}
// uint32 mp_sum = 3;
inline void mph::clear_mp_sum() {
mp_sum_ = 0u;
}
inline ::PROTOBUF_NAMESPACE_ID::uint32 mph::_internal_mp_sum() const {
return mp_sum_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint32 mph::mp_sum() const {
// @@protoc_insertion_point(field_get:mp.mph.mp_sum)
return _internal_mp_sum();
}
inline void mph::_internal_set_mp_sum(::PROTOBUF_NAMESPACE_ID::uint32 value) {
mp_sum_ = value;
}
inline void mph::set_mp_sum(::PROTOBUF_NAMESPACE_ID::uint32 value) {
_internal_set_mp_sum(value);
// @@protoc_insertion_point(field_set:mp.mph.mp_sum)
}
// .mp.MP_TYPE mp_type = 4;
inline void mph::clear_mp_type() {
mp_type_ = 0;
}
inline ::mp::MP_TYPE mph::_internal_mp_type() const {
return static_cast< ::mp::MP_TYPE >(mp_type_);
}
inline ::mp::MP_TYPE mph::mp_type() const {
// @@protoc_insertion_point(field_get:mp.mph.mp_type)
return _internal_mp_type();
}
inline void mph::_internal_set_mp_type(::mp::MP_TYPE value) {
mp_type_ = value;
}
inline void mph::set_mp_type(::mp::MP_TYPE value) {
_internal_set_mp_type(value);
// @@protoc_insertion_point(field_set:mp.mph.mp_type)
}
// string path = 5;
inline void mph::clear_path() {
path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& mph::path() const {
// @@protoc_insertion_point(field_get:mp.mph.path)
return _internal_path();
}
inline void mph::set_path(const std::string& value) {
_internal_set_path(value);
// @@protoc_insertion_point(field_set:mp.mph.path)
}
inline std::string* mph::mutable_path() {
// @@protoc_insertion_point(field_mutable:mp.mph.path)
return _internal_mutable_path();
}
inline const std::string& mph::_internal_path() const {
return path_.Get();
}
inline void mph::_internal_set_path(const std::string& value) {
path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void mph::set_path(std::string&& value) {
path_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.mph.path)
}
inline void mph::set_path(const char* value) {
GOOGLE_DCHECK(value != nullptr);
path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.mph.path)
}
inline void mph::set_path(const char* value,
size_t size) {
path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.mph.path)
}
inline std::string* mph::_internal_mutable_path() {
return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* mph::release_path() {
// @@protoc_insertion_point(field_release:mp.mph.path)
return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void mph::set_allocated_path(std::string* path) {
if (path != nullptr) {
} else {
}
path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.mph.path)
}
inline std::string* mph::unsafe_arena_release_path() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.mph.path)
GOOGLE_DCHECK(GetArena() != nullptr);
return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void mph::unsafe_arena_set_allocated_path(
std::string* path) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (path != nullptr) {
} else {
}
path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
path, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.mph.path)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< ::mp::MP_TYPE> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::mp::MP_TYPE>() {
return ::mp::MP_TYPE_descriptor();
}
template <> struct is_proto_enum< ::mp::MP_SUB_TYPE> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::mp::MP_SUB_TYPE>() {
return ::mp::MP_SUB_TYPE_descriptor();
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_mp_2emph_2eproto

View File

@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.request.proto
#include "proto/mp.request.pb.h"
#include "mp.request.pb.h"
#include <algorithm>

407
MP/proto/mp.request.pb.h Normal file
View File

@@ -0,0 +1,407 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.request.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_mp_2erequest_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_mp_2erequest_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3012000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "mp.body.pb.h"
#include "mp.cqi.pb.h"
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_mp_2erequest_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_mp_2erequest_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mp_2erequest_2eproto;
namespace mp {
class request;
class requestDefaultTypeInternal;
extern requestDefaultTypeInternal _request_default_instance_;
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template<> ::mp::request* Arena::CreateMaybeMessage<::mp::request>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace mp {
// ===================================================================
class request PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mp.request) */ {
public:
inline request() : request(nullptr) {};
virtual ~request();
request(const request& from);
request(request&& from) noexcept
: request() {
*this = ::std::move(from);
}
inline request& operator=(const request& from) {
CopyFrom(from);
return *this;
}
inline request& operator=(request&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const request& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const request* internal_default_instance() {
return reinterpret_cast<const request*>(
&_request_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(request& a, request& b) {
a.Swap(&b);
}
inline void Swap(request* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(request* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline request* New() const final {
return CreateMaybeMessage<request>(nullptr);
}
request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<request>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const request& from);
void MergeFrom(const request& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(request* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "mp.request";
}
protected:
explicit request(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_mp_2erequest_2eproto);
return ::descriptor_table_mp_2erequest_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kBodyFieldNumber = 1,
kCqiFieldNumber = 2,
};
// .mp.body body = 1;
bool has_body() const;
private:
bool _internal_has_body() const;
public:
void clear_body();
const ::mp::body& body() const;
::mp::body* release_body();
::mp::body* mutable_body();
void set_allocated_body(::mp::body* body);
private:
const ::mp::body& _internal_body() const;
::mp::body* _internal_mutable_body();
public:
void unsafe_arena_set_allocated_body(
::mp::body* body);
::mp::body* unsafe_arena_release_body();
// .mp.cqi cqi = 2;
bool has_cqi() const;
private:
bool _internal_has_cqi() const;
public:
void clear_cqi();
const ::mp::cqi& cqi() const;
::mp::cqi* release_cqi();
::mp::cqi* mutable_cqi();
void set_allocated_cqi(::mp::cqi* cqi);
private:
const ::mp::cqi& _internal_cqi() const;
::mp::cqi* _internal_mutable_cqi();
public:
void unsafe_arena_set_allocated_cqi(
::mp::cqi* cqi);
::mp::cqi* unsafe_arena_release_cqi();
// @@protoc_insertion_point(class_scope:mp.request)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::mp::body* body_;
::mp::cqi* cqi_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_mp_2erequest_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// request
// .mp.body body = 1;
inline bool request::_internal_has_body() const {
return this != internal_default_instance() && body_ != nullptr;
}
inline bool request::has_body() const {
return _internal_has_body();
}
inline const ::mp::body& request::_internal_body() const {
const ::mp::body* p = body_;
return p != nullptr ? *p : *reinterpret_cast<const ::mp::body*>(
&::mp::_body_default_instance_);
}
inline const ::mp::body& request::body() const {
// @@protoc_insertion_point(field_get:mp.request.body)
return _internal_body();
}
inline void request::unsafe_arena_set_allocated_body(
::mp::body* body) {
if (GetArena() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(body_);
}
body_ = body;
if (body) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.request.body)
}
inline ::mp::body* request::release_body() {
auto temp = unsafe_arena_release_body();
if (GetArena() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
return temp;
}
inline ::mp::body* request::unsafe_arena_release_body() {
// @@protoc_insertion_point(field_release:mp.request.body)
::mp::body* temp = body_;
body_ = nullptr;
return temp;
}
inline ::mp::body* request::_internal_mutable_body() {
if (body_ == nullptr) {
auto* p = CreateMaybeMessage<::mp::body>(GetArena());
body_ = p;
}
return body_;
}
inline ::mp::body* request::mutable_body() {
// @@protoc_insertion_point(field_mutable:mp.request.body)
return _internal_mutable_body();
}
inline void request::set_allocated_body(::mp::body* body) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(body_);
}
if (body) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(body)->GetArena();
if (message_arena != submessage_arena) {
body = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, body, submessage_arena);
}
} else {
}
body_ = body;
// @@protoc_insertion_point(field_set_allocated:mp.request.body)
}
// .mp.cqi cqi = 2;
inline bool request::_internal_has_cqi() const {
return this != internal_default_instance() && cqi_ != nullptr;
}
inline bool request::has_cqi() const {
return _internal_has_cqi();
}
inline const ::mp::cqi& request::_internal_cqi() const {
const ::mp::cqi* p = cqi_;
return p != nullptr ? *p : *reinterpret_cast<const ::mp::cqi*>(
&::mp::_cqi_default_instance_);
}
inline const ::mp::cqi& request::cqi() const {
// @@protoc_insertion_point(field_get:mp.request.cqi)
return _internal_cqi();
}
inline void request::unsafe_arena_set_allocated_cqi(
::mp::cqi* cqi) {
if (GetArena() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cqi_);
}
cqi_ = cqi;
if (cqi) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.request.cqi)
}
inline ::mp::cqi* request::release_cqi() {
auto temp = unsafe_arena_release_cqi();
if (GetArena() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
return temp;
}
inline ::mp::cqi* request::unsafe_arena_release_cqi() {
// @@protoc_insertion_point(field_release:mp.request.cqi)
::mp::cqi* temp = cqi_;
cqi_ = nullptr;
return temp;
}
inline ::mp::cqi* request::_internal_mutable_cqi() {
if (cqi_ == nullptr) {
auto* p = CreateMaybeMessage<::mp::cqi>(GetArena());
cqi_ = p;
}
return cqi_;
}
inline ::mp::cqi* request::mutable_cqi() {
// @@protoc_insertion_point(field_mutable:mp.request.cqi)
return _internal_mutable_cqi();
}
inline void request::set_allocated_cqi(::mp::cqi* cqi) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(cqi_);
}
if (cqi) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cqi)->GetArena();
if (message_arena != submessage_arena) {
cqi = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, cqi, submessage_arena);
}
} else {
}
cqi_ = cqi;
// @@protoc_insertion_point(field_set_allocated:mp.request.cqi)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace mp
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_mp_2erequest_2eproto

View File

@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.response.proto
#include "proto/mp.response.pb.h"
#include "mp.response.pb.h"
#include <algorithm>

311
MP/proto/mp.response.pb.h Normal file
View File

@@ -0,0 +1,311 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.response.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_mp_2eresponse_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_mp_2eresponse_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3012000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "mp.sri.pb.h"
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_mp_2eresponse_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_mp_2eresponse_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mp_2eresponse_2eproto;
namespace mp {
class response;
class responseDefaultTypeInternal;
extern responseDefaultTypeInternal _response_default_instance_;
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template<> ::mp::response* Arena::CreateMaybeMessage<::mp::response>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace mp {
// ===================================================================
class response PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mp.response) */ {
public:
inline response() : response(nullptr) {};
virtual ~response();
response(const response& from);
response(response&& from) noexcept
: response() {
*this = ::std::move(from);
}
inline response& operator=(const response& from) {
CopyFrom(from);
return *this;
}
inline response& operator=(response&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const response& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const response* internal_default_instance() {
return reinterpret_cast<const response*>(
&_response_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(response& a, response& b) {
a.Swap(&b);
}
inline void Swap(response* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(response* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline response* New() const final {
return CreateMaybeMessage<response>(nullptr);
}
response* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<response>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const response& from);
void MergeFrom(const response& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(response* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "mp.response";
}
protected:
explicit response(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_mp_2eresponse_2eproto);
return ::descriptor_table_mp_2eresponse_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kSriFieldNumber = 1,
};
// .mp.sri sri = 1;
bool has_sri() const;
private:
bool _internal_has_sri() const;
public:
void clear_sri();
const ::mp::sri& sri() const;
::mp::sri* release_sri();
::mp::sri* mutable_sri();
void set_allocated_sri(::mp::sri* sri);
private:
const ::mp::sri& _internal_sri() const;
::mp::sri* _internal_mutable_sri();
public:
void unsafe_arena_set_allocated_sri(
::mp::sri* sri);
::mp::sri* unsafe_arena_release_sri();
// @@protoc_insertion_point(class_scope:mp.response)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::mp::sri* sri_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_mp_2eresponse_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// response
// .mp.sri sri = 1;
inline bool response::_internal_has_sri() const {
return this != internal_default_instance() && sri_ != nullptr;
}
inline bool response::has_sri() const {
return _internal_has_sri();
}
inline const ::mp::sri& response::_internal_sri() const {
const ::mp::sri* p = sri_;
return p != nullptr ? *p : *reinterpret_cast<const ::mp::sri*>(
&::mp::_sri_default_instance_);
}
inline const ::mp::sri& response::sri() const {
// @@protoc_insertion_point(field_get:mp.response.sri)
return _internal_sri();
}
inline void response::unsafe_arena_set_allocated_sri(
::mp::sri* sri) {
if (GetArena() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(sri_);
}
sri_ = sri;
if (sri) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.response.sri)
}
inline ::mp::sri* response::release_sri() {
auto temp = unsafe_arena_release_sri();
if (GetArena() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
return temp;
}
inline ::mp::sri* response::unsafe_arena_release_sri() {
// @@protoc_insertion_point(field_release:mp.response.sri)
::mp::sri* temp = sri_;
sri_ = nullptr;
return temp;
}
inline ::mp::sri* response::_internal_mutable_sri() {
if (sri_ == nullptr) {
auto* p = CreateMaybeMessage<::mp::sri>(GetArena());
sri_ = p;
}
return sri_;
}
inline ::mp::sri* response::mutable_sri() {
// @@protoc_insertion_point(field_mutable:mp.response.sri)
return _internal_mutable_sri();
}
inline void response::set_allocated_sri(::mp::sri* sri) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(sri_);
}
if (sri) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(sri)->GetArena();
if (message_arena != submessage_arena) {
sri = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, sri, submessage_arena);
}
} else {
}
sri_ = sri;
// @@protoc_insertion_point(field_set_allocated:mp.response.sri)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace mp
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_mp_2eresponse_2eproto

View File

@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.sri.proto
#include "proto/mp.sri.pb.h"
#include "mp.sri.pb.h"
#include <algorithm>

794
MP/proto/mp.sri.pb.h Normal file
View File

@@ -0,0 +1,794 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mp.sri.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_mp_2esri_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_mp_2esri_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3012000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_mp_2esri_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_mp_2esri_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mp_2esri_2eproto;
namespace mp {
class sri;
class sriDefaultTypeInternal;
extern sriDefaultTypeInternal _sri_default_instance_;
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template<> ::mp::sri* Arena::CreateMaybeMessage<::mp::sri>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace mp {
enum MP_SRI : int {
MP_LOGIN_ACCOUNT_NOT = 0,
MP_LOGIN_SUCCESS = 1,
MP_LOGIN_FAIL = 2,
MP_REGISTER_SUCCESS = 10,
MP_REGISTER_SUCCESS_PHONE = 11,
MP_REGISTER_SUCCESS_EMAIL = 12,
MP_REGISTER_EXIST = 13,
MP_REGISTER_SQL_ERR = 14,
MP_LOGOUT_SUCCESS = 20,
MP_LOGOUT_FAIL = 21,
MP_ADD_FRIENDS = 30,
MP_ADD_FRIENDS_0 = 31,
MP_ADD_FRIENDS_1 = 32,
MP_ADD_FRIENDS_2 = 33,
MP_ADD_FRIENDS_ERR = 34,
MP_ADD_FRIENDS_NOT_TYPE = 35,
MP_ADD_FRIENDS_SQL_ERR = 36,
MP_ADD_FRIENDS_ANSWER_ERR = 37,
MP_PE_CODE_SUCCESS = 50,
MP_PE_CODE_FAIL = 51,
MP_SRI_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
MP_SRI_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
};
bool MP_SRI_IsValid(int value);
constexpr MP_SRI MP_SRI_MIN = MP_LOGIN_ACCOUNT_NOT;
constexpr MP_SRI MP_SRI_MAX = MP_PE_CODE_FAIL;
constexpr int MP_SRI_ARRAYSIZE = MP_SRI_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MP_SRI_descriptor();
template<typename T>
inline const std::string& MP_SRI_Name(T enum_t_value) {
static_assert(::std::is_same<T, MP_SRI>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function MP_SRI_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
MP_SRI_descriptor(), enum_t_value);
}
inline bool MP_SRI_Parse(
const std::string& name, MP_SRI* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<MP_SRI>(
MP_SRI_descriptor(), name, value);
}
// ===================================================================
class sri PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mp.sri) */ {
public:
inline sri() : sri(nullptr) {};
virtual ~sri();
sri(const sri& from);
sri(sri&& from) noexcept
: sri() {
*this = ::std::move(from);
}
inline sri& operator=(const sri& from) {
CopyFrom(from);
return *this;
}
inline sri& operator=(sri&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const sri& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const sri* internal_default_instance() {
return reinterpret_cast<const sri*>(
&_sri_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(sri& a, sri& b) {
a.Swap(&b);
}
inline void Swap(sri* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(sri* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline sri* New() const final {
return CreateMaybeMessage<sri>(nullptr);
}
sri* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<sri>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const sri& from);
void MergeFrom(const sri& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(sri* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "mp.sri";
}
protected:
explicit sri(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_mp_2esri_2eproto);
return ::descriptor_table_mp_2esri_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kSriUsernameFieldNumber = 2,
kSriEmailFieldNumber = 4,
kSriMsgFieldNumber = 6,
kSriTokenFieldNumber = 7,
kSriAccountFieldNumber = 3,
kSriPhoneFieldNumber = 5,
kSriCodeFieldNumber = 1,
};
// string sri_username = 2;
void clear_sri_username();
const std::string& sri_username() const;
void set_sri_username(const std::string& value);
void set_sri_username(std::string&& value);
void set_sri_username(const char* value);
void set_sri_username(const char* value, size_t size);
std::string* mutable_sri_username();
std::string* release_sri_username();
void set_allocated_sri_username(std::string* sri_username);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_sri_username();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_sri_username(
std::string* sri_username);
private:
const std::string& _internal_sri_username() const;
void _internal_set_sri_username(const std::string& value);
std::string* _internal_mutable_sri_username();
public:
// string sri_email = 4;
void clear_sri_email();
const std::string& sri_email() const;
void set_sri_email(const std::string& value);
void set_sri_email(std::string&& value);
void set_sri_email(const char* value);
void set_sri_email(const char* value, size_t size);
std::string* mutable_sri_email();
std::string* release_sri_email();
void set_allocated_sri_email(std::string* sri_email);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_sri_email();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_sri_email(
std::string* sri_email);
private:
const std::string& _internal_sri_email() const;
void _internal_set_sri_email(const std::string& value);
std::string* _internal_mutable_sri_email();
public:
// string sri_msg = 6;
void clear_sri_msg();
const std::string& sri_msg() const;
void set_sri_msg(const std::string& value);
void set_sri_msg(std::string&& value);
void set_sri_msg(const char* value);
void set_sri_msg(const char* value, size_t size);
std::string* mutable_sri_msg();
std::string* release_sri_msg();
void set_allocated_sri_msg(std::string* sri_msg);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_sri_msg();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_sri_msg(
std::string* sri_msg);
private:
const std::string& _internal_sri_msg() const;
void _internal_set_sri_msg(const std::string& value);
std::string* _internal_mutable_sri_msg();
public:
// string sri_token = 7;
void clear_sri_token();
const std::string& sri_token() const;
void set_sri_token(const std::string& value);
void set_sri_token(std::string&& value);
void set_sri_token(const char* value);
void set_sri_token(const char* value, size_t size);
std::string* mutable_sri_token();
std::string* release_sri_token();
void set_allocated_sri_token(std::string* sri_token);
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
std::string* unsafe_arena_release_sri_token();
GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
" string fields are deprecated and will be removed in a"
" future release.")
void unsafe_arena_set_allocated_sri_token(
std::string* sri_token);
private:
const std::string& _internal_sri_token() const;
void _internal_set_sri_token(const std::string& value);
std::string* _internal_mutable_sri_token();
public:
// uint64 sri_account = 3;
void clear_sri_account();
::PROTOBUF_NAMESPACE_ID::uint64 sri_account() const;
void set_sri_account(::PROTOBUF_NAMESPACE_ID::uint64 value);
private:
::PROTOBUF_NAMESPACE_ID::uint64 _internal_sri_account() const;
void _internal_set_sri_account(::PROTOBUF_NAMESPACE_ID::uint64 value);
public:
// uint64 sri_phone = 5;
void clear_sri_phone();
::PROTOBUF_NAMESPACE_ID::uint64 sri_phone() const;
void set_sri_phone(::PROTOBUF_NAMESPACE_ID::uint64 value);
private:
::PROTOBUF_NAMESPACE_ID::uint64 _internal_sri_phone() const;
void _internal_set_sri_phone(::PROTOBUF_NAMESPACE_ID::uint64 value);
public:
// .mp.MP_SRI sri_code = 1;
void clear_sri_code();
::mp::MP_SRI sri_code() const;
void set_sri_code(::mp::MP_SRI value);
private:
::mp::MP_SRI _internal_sri_code() const;
void _internal_set_sri_code(::mp::MP_SRI value);
public:
// @@protoc_insertion_point(class_scope:mp.sri)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sri_username_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sri_email_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sri_msg_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sri_token_;
::PROTOBUF_NAMESPACE_ID::uint64 sri_account_;
::PROTOBUF_NAMESPACE_ID::uint64 sri_phone_;
int sri_code_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_mp_2esri_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// sri
// .mp.MP_SRI sri_code = 1;
inline void sri::clear_sri_code() {
sri_code_ = 0;
}
inline ::mp::MP_SRI sri::_internal_sri_code() const {
return static_cast< ::mp::MP_SRI >(sri_code_);
}
inline ::mp::MP_SRI sri::sri_code() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_code)
return _internal_sri_code();
}
inline void sri::_internal_set_sri_code(::mp::MP_SRI value) {
sri_code_ = value;
}
inline void sri::set_sri_code(::mp::MP_SRI value) {
_internal_set_sri_code(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_code)
}
// string sri_username = 2;
inline void sri::clear_sri_username() {
sri_username_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& sri::sri_username() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_username)
return _internal_sri_username();
}
inline void sri::set_sri_username(const std::string& value) {
_internal_set_sri_username(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_username)
}
inline std::string* sri::mutable_sri_username() {
// @@protoc_insertion_point(field_mutable:mp.sri.sri_username)
return _internal_mutable_sri_username();
}
inline const std::string& sri::_internal_sri_username() const {
return sri_username_.Get();
}
inline void sri::_internal_set_sri_username(const std::string& value) {
sri_username_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void sri::set_sri_username(std::string&& value) {
sri_username_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.sri.sri_username)
}
inline void sri::set_sri_username(const char* value) {
GOOGLE_DCHECK(value != nullptr);
sri_username_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.sri.sri_username)
}
inline void sri::set_sri_username(const char* value,
size_t size) {
sri_username_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.sri.sri_username)
}
inline std::string* sri::_internal_mutable_sri_username() {
return sri_username_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* sri::release_sri_username() {
// @@protoc_insertion_point(field_release:mp.sri.sri_username)
return sri_username_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void sri::set_allocated_sri_username(std::string* sri_username) {
if (sri_username != nullptr) {
} else {
}
sri_username_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sri_username,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.sri.sri_username)
}
inline std::string* sri::unsafe_arena_release_sri_username() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.sri.sri_username)
GOOGLE_DCHECK(GetArena() != nullptr);
return sri_username_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void sri::unsafe_arena_set_allocated_sri_username(
std::string* sri_username) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (sri_username != nullptr) {
} else {
}
sri_username_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
sri_username, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.sri.sri_username)
}
// uint64 sri_account = 3;
inline void sri::clear_sri_account() {
sri_account_ = PROTOBUF_ULONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 sri::_internal_sri_account() const {
return sri_account_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 sri::sri_account() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_account)
return _internal_sri_account();
}
inline void sri::_internal_set_sri_account(::PROTOBUF_NAMESPACE_ID::uint64 value) {
sri_account_ = value;
}
inline void sri::set_sri_account(::PROTOBUF_NAMESPACE_ID::uint64 value) {
_internal_set_sri_account(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_account)
}
// string sri_email = 4;
inline void sri::clear_sri_email() {
sri_email_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& sri::sri_email() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_email)
return _internal_sri_email();
}
inline void sri::set_sri_email(const std::string& value) {
_internal_set_sri_email(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_email)
}
inline std::string* sri::mutable_sri_email() {
// @@protoc_insertion_point(field_mutable:mp.sri.sri_email)
return _internal_mutable_sri_email();
}
inline const std::string& sri::_internal_sri_email() const {
return sri_email_.Get();
}
inline void sri::_internal_set_sri_email(const std::string& value) {
sri_email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void sri::set_sri_email(std::string&& value) {
sri_email_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.sri.sri_email)
}
inline void sri::set_sri_email(const char* value) {
GOOGLE_DCHECK(value != nullptr);
sri_email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.sri.sri_email)
}
inline void sri::set_sri_email(const char* value,
size_t size) {
sri_email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.sri.sri_email)
}
inline std::string* sri::_internal_mutable_sri_email() {
return sri_email_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* sri::release_sri_email() {
// @@protoc_insertion_point(field_release:mp.sri.sri_email)
return sri_email_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void sri::set_allocated_sri_email(std::string* sri_email) {
if (sri_email != nullptr) {
} else {
}
sri_email_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sri_email,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.sri.sri_email)
}
inline std::string* sri::unsafe_arena_release_sri_email() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.sri.sri_email)
GOOGLE_DCHECK(GetArena() != nullptr);
return sri_email_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void sri::unsafe_arena_set_allocated_sri_email(
std::string* sri_email) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (sri_email != nullptr) {
} else {
}
sri_email_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
sri_email, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.sri.sri_email)
}
// uint64 sri_phone = 5;
inline void sri::clear_sri_phone() {
sri_phone_ = PROTOBUF_ULONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 sri::_internal_sri_phone() const {
return sri_phone_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 sri::sri_phone() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_phone)
return _internal_sri_phone();
}
inline void sri::_internal_set_sri_phone(::PROTOBUF_NAMESPACE_ID::uint64 value) {
sri_phone_ = value;
}
inline void sri::set_sri_phone(::PROTOBUF_NAMESPACE_ID::uint64 value) {
_internal_set_sri_phone(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_phone)
}
// string sri_msg = 6;
inline void sri::clear_sri_msg() {
sri_msg_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& sri::sri_msg() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_msg)
return _internal_sri_msg();
}
inline void sri::set_sri_msg(const std::string& value) {
_internal_set_sri_msg(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_msg)
}
inline std::string* sri::mutable_sri_msg() {
// @@protoc_insertion_point(field_mutable:mp.sri.sri_msg)
return _internal_mutable_sri_msg();
}
inline const std::string& sri::_internal_sri_msg() const {
return sri_msg_.Get();
}
inline void sri::_internal_set_sri_msg(const std::string& value) {
sri_msg_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void sri::set_sri_msg(std::string&& value) {
sri_msg_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.sri.sri_msg)
}
inline void sri::set_sri_msg(const char* value) {
GOOGLE_DCHECK(value != nullptr);
sri_msg_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.sri.sri_msg)
}
inline void sri::set_sri_msg(const char* value,
size_t size) {
sri_msg_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.sri.sri_msg)
}
inline std::string* sri::_internal_mutable_sri_msg() {
return sri_msg_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* sri::release_sri_msg() {
// @@protoc_insertion_point(field_release:mp.sri.sri_msg)
return sri_msg_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void sri::set_allocated_sri_msg(std::string* sri_msg) {
if (sri_msg != nullptr) {
} else {
}
sri_msg_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sri_msg,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.sri.sri_msg)
}
inline std::string* sri::unsafe_arena_release_sri_msg() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.sri.sri_msg)
GOOGLE_DCHECK(GetArena() != nullptr);
return sri_msg_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void sri::unsafe_arena_set_allocated_sri_msg(
std::string* sri_msg) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (sri_msg != nullptr) {
} else {
}
sri_msg_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
sri_msg, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.sri.sri_msg)
}
// string sri_token = 7;
inline void sri::clear_sri_token() {
sri_token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline const std::string& sri::sri_token() const {
// @@protoc_insertion_point(field_get:mp.sri.sri_token)
return _internal_sri_token();
}
inline void sri::set_sri_token(const std::string& value) {
_internal_set_sri_token(value);
// @@protoc_insertion_point(field_set:mp.sri.sri_token)
}
inline std::string* sri::mutable_sri_token() {
// @@protoc_insertion_point(field_mutable:mp.sri.sri_token)
return _internal_mutable_sri_token();
}
inline const std::string& sri::_internal_sri_token() const {
return sri_token_.Get();
}
inline void sri::_internal_set_sri_token(const std::string& value) {
sri_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void sri::set_sri_token(std::string&& value) {
sri_token_.Set(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:mp.sri.sri_token)
}
inline void sri::set_sri_token(const char* value) {
GOOGLE_DCHECK(value != nullptr);
sri_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArena());
// @@protoc_insertion_point(field_set_char:mp.sri.sri_token)
}
inline void sri::set_sri_token(const char* value,
size_t size) {
sri_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:mp.sri.sri_token)
}
inline std::string* sri::_internal_mutable_sri_token() {
return sri_token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* sri::release_sri_token() {
// @@protoc_insertion_point(field_release:mp.sri.sri_token)
return sri_token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void sri::set_allocated_sri_token(std::string* sri_token) {
if (sri_token != nullptr) {
} else {
}
sri_token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sri_token,
GetArena());
// @@protoc_insertion_point(field_set_allocated:mp.sri.sri_token)
}
inline std::string* sri::unsafe_arena_release_sri_token() {
// @@protoc_insertion_point(field_unsafe_arena_release:mp.sri.sri_token)
GOOGLE_DCHECK(GetArena() != nullptr);
return sri_token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArena());
}
inline void sri::unsafe_arena_set_allocated_sri_token(
std::string* sri_token) {
GOOGLE_DCHECK(GetArena() != nullptr);
if (sri_token != nullptr) {
} else {
}
sri_token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
sri_token, GetArena());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:mp.sri.sri_token)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace mp
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< ::mp::MP_SRI> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::mp::MP_SRI>() {
return ::mp::MP_SRI_descriptor();
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_mp_2esri_2eproto

13
MP/protohuf/mp.body.proto Normal file
View File

@@ -0,0 +1,13 @@
syntax = "proto3";
package mp;
import "mp.mph.proto";
message body {
MP_SUB_TYPE subcommand = 1;
string account = 2;
string password = 3;
uint64 target = 4;
uint64 source = 5;
string data = 6;
}

13
MP/protohuf/mp.cqi.proto Normal file
View File

@@ -0,0 +1,13 @@
syntax = "proto3";
package mp;
enum MP_C_TYPE {
MC_TYPE_LINUX = 0;
MC_TYPE_WINDOWS = 1;
};
// 客户端请求消息
message cqi {
MP_C_TYPE cqi_type = 1;
float cqi_version = 2;
}

56
MP/protohuf/mp.mph.proto Normal file
View File

@@ -0,0 +1,56 @@
syntax = "proto3";
package mp;
enum MP_TYPE {
// 0 - 19
MP_REQUEST_LOGIN = 0;
MP_REQUEST_LOGOUT = 1;
MP_REQUEST_REGISTER = 2;
// 20 - 39
MP_RESPONSE_LOGIN = 20;
MP_RESPONSE_LOGOUT = 21;
MP_RESPONSE_REGISTER = 22;
// 40 - 59
MP_REQUEST_PE_CODE = 40; // 请求验证码
// 60 - 79
MP_RESPONSE_PE_CODE = 60;
MP_REQUEST_IM_ADD = 100;
MP_RESPONSE_IM_ADD = 120;
// 200 以后为 聊天消息包
}
enum MP_SUB_TYPE {
MP_REQUEST_LOGIN_EMAIL = 0;
MP_REQUEST_LOGIN_PHONE = 1;
MP_REQUEST_LOGIN_ACCOUNT = 2;
MP_REQUEST_REGISTER_EMAIL = 3;
MP_REQUEST_REGISTER_PHONE = 4;
MP_REQUEST_PE_CODE_EMAIL = 5;
MP_RESPONSE_PE_CODE_EMAIL = 6;
MP_REQUEST_PE_CODE_PHONE = 7;
MP_RESPONSE_PE_CODE_PHONE = 8;
MP_REQUEST_ADD_CONTACT_PERSON = 20;
MP_REQUEST_REMOVE_CONTACT_PERSON = 21;
MP_REQUEST_BLACK_LIST_CONTACT_PERSON = 22;
MP_RESPONSE_ADD_CONTACT_PERSON = 40;
MP_RESPONSE_REMOVE_CONTACT_PERSON = 41;
MP_RESPONSE_BLACK_LIST_CONTACT_PERSON = 42;
}
message mph {
uint32 mpb_size = 1; // 包体大小
uint64 mp_id = 2; // 包id
uint32 mp_sum = 3; // 包序号
MP_TYPE mp_type = 4; // 包类型
string path = 5;
}

View File

@@ -0,0 +1,10 @@
syntax = "proto3";
package mp;
import "mp.body.proto";
import "mp.cqi.proto";
message request {
body body = 1;
cqi cqi = 2;
}

View File

@@ -0,0 +1,8 @@
syntax = "proto3";
package mp;
import "mp.sri.proto";
message response {
sri sri = 1;
}

39
MP/protohuf/mp.sri.proto Normal file
View File

@@ -0,0 +1,39 @@
syntax = "proto3";
package mp;
enum MP_SRI {
MP_LOGIN_ACCOUNT_NOT = 0;
MP_LOGIN_SUCCESS = 1;
MP_LOGIN_FAIL = 2;
MP_REGISTER_SUCCESS = 10;
MP_REGISTER_SUCCESS_PHONE = 11;
MP_REGISTER_SUCCESS_EMAIL = 12;
MP_REGISTER_EXIST = 13;
MP_REGISTER_SQL_ERR = 14;
MP_LOGOUT_SUCCESS = 20;
MP_LOGOUT_FAIL = 21;
MP_ADD_FRIENDS = 30;
MP_ADD_FRIENDS_0 = 31;
MP_ADD_FRIENDS_1 = 32;
MP_ADD_FRIENDS_2 = 33;
MP_ADD_FRIENDS_ERR = 34;
MP_ADD_FRIENDS_NOT_TYPE = 35;
MP_ADD_FRIENDS_SQL_ERR = 36;
MP_ADD_FRIENDS_ANSWER_ERR = 37;
MP_PE_CODE_SUCCESS = 50;
MP_PE_CODE_FAIL = 51;
}
message sri {
MP_SRI sri_code = 1;
string sri_username = 2;
uint64 sri_account = 3;
string sri_email = 4;
uint64 sri_phone = 5;
string sri_msg = 6;
string sri_token = 7;
}