421 lines
17 KiB
C++
Executable File
421 lines
17 KiB
C++
Executable File
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: encrypted_message.proto
|
|
|
|
#ifndef PROTOBUF_encrypted_5fmessage_2eproto__INCLUDED
|
|
#define PROTOBUF_encrypted_5fmessage_2eproto__INCLUDED
|
|
|
|
#include <string>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
|
|
#if GOOGLE_PROTOBUF_VERSION < 3003000
|
|
#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 3003002 < GOOGLE_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/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/metadata_lite.h>
|
|
#include <google/protobuf/message_lite.h>
|
|
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
|
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
|
#include <google/protobuf/generated_enum_util.h>
|
|
// @@protoc_insertion_point(includes)
|
|
namespace encrypted_messages {
|
|
class EncryptedMessage;
|
|
class EncryptedMessageDefaultTypeInternal;
|
|
extern EncryptedMessageDefaultTypeInternal _EncryptedMessage_default_instance_;
|
|
} // namespace encrypted_messages
|
|
|
|
namespace encrypted_messages {
|
|
|
|
namespace protobuf_encrypted_5fmessage_2eproto {
|
|
// Internal implementation detail -- do not call these.
|
|
struct TableStruct {
|
|
static const ::google::protobuf::internal::ParseTableField entries[];
|
|
static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
|
|
static const ::google::protobuf::internal::ParseTable schema[];
|
|
static const ::google::protobuf::uint32 offsets[];
|
|
static void InitDefaultsImpl();
|
|
static void Shutdown();
|
|
};
|
|
void AddDescriptors();
|
|
void InitDefaults();
|
|
} // namespace protobuf_encrypted_5fmessage_2eproto
|
|
|
|
enum EncryptedMessage_Algorithm {
|
|
EncryptedMessage_Algorithm_UNKNOWN_ALGORITHM = 0,
|
|
EncryptedMessage_Algorithm_AEAD_ECDH_AES_128_CTR_HMAC_SHA256 = 1
|
|
};
|
|
bool EncryptedMessage_Algorithm_IsValid(int value);
|
|
const EncryptedMessage_Algorithm EncryptedMessage_Algorithm_Algorithm_MIN = EncryptedMessage_Algorithm_UNKNOWN_ALGORITHM;
|
|
const EncryptedMessage_Algorithm EncryptedMessage_Algorithm_Algorithm_MAX = EncryptedMessage_Algorithm_AEAD_ECDH_AES_128_CTR_HMAC_SHA256;
|
|
const int EncryptedMessage_Algorithm_Algorithm_ARRAYSIZE = EncryptedMessage_Algorithm_Algorithm_MAX + 1;
|
|
|
|
// ===================================================================
|
|
|
|
class EncryptedMessage : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:encrypted_messages.EncryptedMessage) */ {
|
|
public:
|
|
EncryptedMessage();
|
|
virtual ~EncryptedMessage();
|
|
|
|
EncryptedMessage(const EncryptedMessage& from);
|
|
|
|
inline EncryptedMessage& operator=(const EncryptedMessage& from) {
|
|
CopyFrom(from);
|
|
return *this;
|
|
}
|
|
|
|
inline const ::std::string& unknown_fields() const {
|
|
return _internal_metadata_.unknown_fields();
|
|
}
|
|
|
|
inline ::std::string* mutable_unknown_fields() {
|
|
return _internal_metadata_.mutable_unknown_fields();
|
|
}
|
|
|
|
static const EncryptedMessage& default_instance();
|
|
|
|
static inline const EncryptedMessage* internal_default_instance() {
|
|
return reinterpret_cast<const EncryptedMessage*>(
|
|
&_EncryptedMessage_default_instance_);
|
|
}
|
|
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
|
|
0;
|
|
|
|
GOOGLE_ATTRIBUTE_NOINLINE void Swap(EncryptedMessage* other);
|
|
|
|
// implements Message ----------------------------------------------
|
|
|
|
inline EncryptedMessage* New() const PROTOBUF_FINAL { return New(NULL); }
|
|
|
|
EncryptedMessage* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
|
|
void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
|
|
PROTOBUF_FINAL;
|
|
void CopyFrom(const EncryptedMessage& from);
|
|
void MergeFrom(const EncryptedMessage& from);
|
|
void Clear() PROTOBUF_FINAL;
|
|
bool IsInitialized() const PROTOBUF_FINAL;
|
|
|
|
size_t ByteSizeLong() const PROTOBUF_FINAL;
|
|
bool MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
|
|
void SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
|
|
void DiscardUnknownFields();
|
|
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
|
|
private:
|
|
void SharedCtor();
|
|
void SharedDtor();
|
|
void SetCachedSize(int size) const;
|
|
void InternalSwap(EncryptedMessage* other);
|
|
private:
|
|
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
|
return NULL;
|
|
}
|
|
inline void* MaybeArenaPtr() const {
|
|
return NULL;
|
|
}
|
|
public:
|
|
|
|
::std::string GetTypeName() const PROTOBUF_FINAL;
|
|
|
|
// nested types ----------------------------------------------------
|
|
|
|
typedef EncryptedMessage_Algorithm Algorithm;
|
|
static const Algorithm UNKNOWN_ALGORITHM =
|
|
EncryptedMessage_Algorithm_UNKNOWN_ALGORITHM;
|
|
static const Algorithm AEAD_ECDH_AES_128_CTR_HMAC_SHA256 =
|
|
EncryptedMessage_Algorithm_AEAD_ECDH_AES_128_CTR_HMAC_SHA256;
|
|
static inline bool Algorithm_IsValid(int value) {
|
|
return EncryptedMessage_Algorithm_IsValid(value);
|
|
}
|
|
static const Algorithm Algorithm_MIN =
|
|
EncryptedMessage_Algorithm_Algorithm_MIN;
|
|
static const Algorithm Algorithm_MAX =
|
|
EncryptedMessage_Algorithm_Algorithm_MAX;
|
|
static const int Algorithm_ARRAYSIZE =
|
|
EncryptedMessage_Algorithm_Algorithm_ARRAYSIZE;
|
|
|
|
// accessors -------------------------------------------------------
|
|
|
|
// required bytes encrypted_message = 1;
|
|
bool has_encrypted_message() const;
|
|
void clear_encrypted_message();
|
|
static const int kEncryptedMessageFieldNumber = 1;
|
|
const ::std::string& encrypted_message() const;
|
|
void set_encrypted_message(const ::std::string& value);
|
|
#if LANG_CXX11
|
|
void set_encrypted_message(::std::string&& value);
|
|
#endif
|
|
void set_encrypted_message(const char* value);
|
|
void set_encrypted_message(const void* value, size_t size);
|
|
::std::string* mutable_encrypted_message();
|
|
::std::string* release_encrypted_message();
|
|
void set_allocated_encrypted_message(::std::string* encrypted_message);
|
|
|
|
// required bytes client_public_key = 3;
|
|
bool has_client_public_key() const;
|
|
void clear_client_public_key();
|
|
static const int kClientPublicKeyFieldNumber = 3;
|
|
const ::std::string& client_public_key() const;
|
|
void set_client_public_key(const ::std::string& value);
|
|
#if LANG_CXX11
|
|
void set_client_public_key(::std::string&& value);
|
|
#endif
|
|
void set_client_public_key(const char* value);
|
|
void set_client_public_key(const void* value, size_t size);
|
|
::std::string* mutable_client_public_key();
|
|
::std::string* release_client_public_key();
|
|
void set_allocated_client_public_key(::std::string* client_public_key);
|
|
|
|
// required uint32 server_public_key_version = 2;
|
|
bool has_server_public_key_version() const;
|
|
void clear_server_public_key_version();
|
|
static const int kServerPublicKeyVersionFieldNumber = 2;
|
|
::google::protobuf::uint32 server_public_key_version() const;
|
|
void set_server_public_key_version(::google::protobuf::uint32 value);
|
|
|
|
// optional .encrypted_messages.EncryptedMessage.Algorithm algorithm = 4 [default = AEAD_ECDH_AES_128_CTR_HMAC_SHA256];
|
|
bool has_algorithm() const;
|
|
void clear_algorithm();
|
|
static const int kAlgorithmFieldNumber = 4;
|
|
::encrypted_messages::EncryptedMessage_Algorithm algorithm() const;
|
|
void set_algorithm(::encrypted_messages::EncryptedMessage_Algorithm value);
|
|
|
|
// @@protoc_insertion_point(class_scope:encrypted_messages.EncryptedMessage)
|
|
private:
|
|
void set_has_encrypted_message();
|
|
void clear_has_encrypted_message();
|
|
void set_has_server_public_key_version();
|
|
void clear_has_server_public_key_version();
|
|
void set_has_client_public_key();
|
|
void clear_has_client_public_key();
|
|
void set_has_algorithm();
|
|
void clear_has_algorithm();
|
|
|
|
// helper for ByteSizeLong()
|
|
size_t RequiredFieldsByteSizeFallback() const;
|
|
|
|
::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
|
|
::google::protobuf::internal::HasBits<1> _has_bits_;
|
|
mutable int _cached_size_;
|
|
::google::protobuf::internal::ArenaStringPtr encrypted_message_;
|
|
::google::protobuf::internal::ArenaStringPtr client_public_key_;
|
|
::google::protobuf::uint32 server_public_key_version_;
|
|
int algorithm_;
|
|
friend struct protobuf_encrypted_5fmessage_2eproto::TableStruct;
|
|
};
|
|
// ===================================================================
|
|
|
|
|
|
// ===================================================================
|
|
|
|
#if !PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
// EncryptedMessage
|
|
|
|
// required bytes encrypted_message = 1;
|
|
inline bool EncryptedMessage::has_encrypted_message() const {
|
|
return (_has_bits_[0] & 0x00000001u) != 0;
|
|
}
|
|
inline void EncryptedMessage::set_has_encrypted_message() {
|
|
_has_bits_[0] |= 0x00000001u;
|
|
}
|
|
inline void EncryptedMessage::clear_has_encrypted_message() {
|
|
_has_bits_[0] &= ~0x00000001u;
|
|
}
|
|
inline void EncryptedMessage::clear_encrypted_message() {
|
|
encrypted_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
clear_has_encrypted_message();
|
|
}
|
|
inline const ::std::string& EncryptedMessage::encrypted_message() const {
|
|
// @@protoc_insertion_point(field_get:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
return encrypted_message_.GetNoArena();
|
|
}
|
|
inline void EncryptedMessage::set_encrypted_message(const ::std::string& value) {
|
|
set_has_encrypted_message();
|
|
encrypted_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
|
// @@protoc_insertion_point(field_set:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
}
|
|
#if LANG_CXX11
|
|
inline void EncryptedMessage::set_encrypted_message(::std::string&& value) {
|
|
set_has_encrypted_message();
|
|
encrypted_message_.SetNoArena(
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
|
// @@protoc_insertion_point(field_set_rvalue:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
}
|
|
#endif
|
|
inline void EncryptedMessage::set_encrypted_message(const char* value) {
|
|
GOOGLE_DCHECK(value != NULL);
|
|
set_has_encrypted_message();
|
|
encrypted_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
|
// @@protoc_insertion_point(field_set_char:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
}
|
|
inline void EncryptedMessage::set_encrypted_message(const void* value, size_t size) {
|
|
set_has_encrypted_message();
|
|
encrypted_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
|
// @@protoc_insertion_point(field_set_pointer:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
}
|
|
inline ::std::string* EncryptedMessage::mutable_encrypted_message() {
|
|
set_has_encrypted_message();
|
|
// @@protoc_insertion_point(field_mutable:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
return encrypted_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline ::std::string* EncryptedMessage::release_encrypted_message() {
|
|
// @@protoc_insertion_point(field_release:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
clear_has_encrypted_message();
|
|
return encrypted_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline void EncryptedMessage::set_allocated_encrypted_message(::std::string* encrypted_message) {
|
|
if (encrypted_message != NULL) {
|
|
set_has_encrypted_message();
|
|
} else {
|
|
clear_has_encrypted_message();
|
|
}
|
|
encrypted_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), encrypted_message);
|
|
// @@protoc_insertion_point(field_set_allocated:encrypted_messages.EncryptedMessage.encrypted_message)
|
|
}
|
|
|
|
// required uint32 server_public_key_version = 2;
|
|
inline bool EncryptedMessage::has_server_public_key_version() const {
|
|
return (_has_bits_[0] & 0x00000004u) != 0;
|
|
}
|
|
inline void EncryptedMessage::set_has_server_public_key_version() {
|
|
_has_bits_[0] |= 0x00000004u;
|
|
}
|
|
inline void EncryptedMessage::clear_has_server_public_key_version() {
|
|
_has_bits_[0] &= ~0x00000004u;
|
|
}
|
|
inline void EncryptedMessage::clear_server_public_key_version() {
|
|
server_public_key_version_ = 0u;
|
|
clear_has_server_public_key_version();
|
|
}
|
|
inline ::google::protobuf::uint32 EncryptedMessage::server_public_key_version() const {
|
|
// @@protoc_insertion_point(field_get:encrypted_messages.EncryptedMessage.server_public_key_version)
|
|
return server_public_key_version_;
|
|
}
|
|
inline void EncryptedMessage::set_server_public_key_version(::google::protobuf::uint32 value) {
|
|
set_has_server_public_key_version();
|
|
server_public_key_version_ = value;
|
|
// @@protoc_insertion_point(field_set:encrypted_messages.EncryptedMessage.server_public_key_version)
|
|
}
|
|
|
|
// required bytes client_public_key = 3;
|
|
inline bool EncryptedMessage::has_client_public_key() const {
|
|
return (_has_bits_[0] & 0x00000002u) != 0;
|
|
}
|
|
inline void EncryptedMessage::set_has_client_public_key() {
|
|
_has_bits_[0] |= 0x00000002u;
|
|
}
|
|
inline void EncryptedMessage::clear_has_client_public_key() {
|
|
_has_bits_[0] &= ~0x00000002u;
|
|
}
|
|
inline void EncryptedMessage::clear_client_public_key() {
|
|
client_public_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
clear_has_client_public_key();
|
|
}
|
|
inline const ::std::string& EncryptedMessage::client_public_key() const {
|
|
// @@protoc_insertion_point(field_get:encrypted_messages.EncryptedMessage.client_public_key)
|
|
return client_public_key_.GetNoArena();
|
|
}
|
|
inline void EncryptedMessage::set_client_public_key(const ::std::string& value) {
|
|
set_has_client_public_key();
|
|
client_public_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
|
// @@protoc_insertion_point(field_set:encrypted_messages.EncryptedMessage.client_public_key)
|
|
}
|
|
#if LANG_CXX11
|
|
inline void EncryptedMessage::set_client_public_key(::std::string&& value) {
|
|
set_has_client_public_key();
|
|
client_public_key_.SetNoArena(
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
|
// @@protoc_insertion_point(field_set_rvalue:encrypted_messages.EncryptedMessage.client_public_key)
|
|
}
|
|
#endif
|
|
inline void EncryptedMessage::set_client_public_key(const char* value) {
|
|
GOOGLE_DCHECK(value != NULL);
|
|
set_has_client_public_key();
|
|
client_public_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
|
// @@protoc_insertion_point(field_set_char:encrypted_messages.EncryptedMessage.client_public_key)
|
|
}
|
|
inline void EncryptedMessage::set_client_public_key(const void* value, size_t size) {
|
|
set_has_client_public_key();
|
|
client_public_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
|
// @@protoc_insertion_point(field_set_pointer:encrypted_messages.EncryptedMessage.client_public_key)
|
|
}
|
|
inline ::std::string* EncryptedMessage::mutable_client_public_key() {
|
|
set_has_client_public_key();
|
|
// @@protoc_insertion_point(field_mutable:encrypted_messages.EncryptedMessage.client_public_key)
|
|
return client_public_key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline ::std::string* EncryptedMessage::release_client_public_key() {
|
|
// @@protoc_insertion_point(field_release:encrypted_messages.EncryptedMessage.client_public_key)
|
|
clear_has_client_public_key();
|
|
return client_public_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline void EncryptedMessage::set_allocated_client_public_key(::std::string* client_public_key) {
|
|
if (client_public_key != NULL) {
|
|
set_has_client_public_key();
|
|
} else {
|
|
clear_has_client_public_key();
|
|
}
|
|
client_public_key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), client_public_key);
|
|
// @@protoc_insertion_point(field_set_allocated:encrypted_messages.EncryptedMessage.client_public_key)
|
|
}
|
|
|
|
// optional .encrypted_messages.EncryptedMessage.Algorithm algorithm = 4 [default = AEAD_ECDH_AES_128_CTR_HMAC_SHA256];
|
|
inline bool EncryptedMessage::has_algorithm() const {
|
|
return (_has_bits_[0] & 0x00000008u) != 0;
|
|
}
|
|
inline void EncryptedMessage::set_has_algorithm() {
|
|
_has_bits_[0] |= 0x00000008u;
|
|
}
|
|
inline void EncryptedMessage::clear_has_algorithm() {
|
|
_has_bits_[0] &= ~0x00000008u;
|
|
}
|
|
inline void EncryptedMessage::clear_algorithm() {
|
|
algorithm_ = 1;
|
|
clear_has_algorithm();
|
|
}
|
|
inline ::encrypted_messages::EncryptedMessage_Algorithm EncryptedMessage::algorithm() const {
|
|
// @@protoc_insertion_point(field_get:encrypted_messages.EncryptedMessage.algorithm)
|
|
return static_cast< ::encrypted_messages::EncryptedMessage_Algorithm >(algorithm_);
|
|
}
|
|
inline void EncryptedMessage::set_algorithm(::encrypted_messages::EncryptedMessage_Algorithm value) {
|
|
assert(::encrypted_messages::EncryptedMessage_Algorithm_IsValid(value));
|
|
set_has_algorithm();
|
|
algorithm_ = value;
|
|
// @@protoc_insertion_point(field_set:encrypted_messages.EncryptedMessage.algorithm)
|
|
}
|
|
|
|
#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
|
|
} // namespace encrypted_messages
|
|
|
|
#ifndef SWIG
|
|
namespace google {
|
|
namespace protobuf {
|
|
|
|
template <> struct is_proto_enum< ::encrypted_messages::EncryptedMessage_Algorithm> : ::google::protobuf::internal::true_type {};
|
|
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
#endif // SWIG
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
|
|
#endif // PROTOBUF_encrypted_5fmessage_2eproto__INCLUDED
|