First draft of the remote API
This commit is contained in:
@@ -0,0 +1,246 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: common.proto
|
||||
|
||||
#ifndef PROTOBUF_common_2eproto__INCLUDED
|
||||
#define PROTOBUF_common_2eproto__INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
|
||||
#if GOOGLE_PROTOBUF_VERSION < 2005000
|
||||
#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 2005000 < 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/generated_message_util.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
// Internal implementation detail -- do not call these.
|
||||
void protobuf_AddDesc_common_2eproto();
|
||||
void protobuf_AssignDesc_common_2eproto();
|
||||
void protobuf_ShutdownFile_common_2eproto();
|
||||
|
||||
class Error;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class Error : public ::google::protobuf::Message {
|
||||
public:
|
||||
Error();
|
||||
virtual ~Error();
|
||||
|
||||
Error(const Error& from);
|
||||
|
||||
inline Error& operator=(const Error& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
return _unknown_fields_;
|
||||
}
|
||||
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
return &_unknown_fields_;
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const Error& default_instance();
|
||||
|
||||
void Swap(Error* other);
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
Error* New() const;
|
||||
void CopyFrom(const ::google::protobuf::Message& from);
|
||||
void MergeFrom(const ::google::protobuf::Message& from);
|
||||
void CopyFrom(const Error& from);
|
||||
void MergeFrom(const Error& from);
|
||||
void Clear();
|
||||
bool IsInitialized() const;
|
||||
|
||||
int ByteSize() const;
|
||||
bool MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input);
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const;
|
||||
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
|
||||
int GetCachedSize() const { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const;
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
// required bool error = 1;
|
||||
inline bool has_error() const;
|
||||
inline void clear_error();
|
||||
static const int kErrorFieldNumber = 1;
|
||||
inline bool error() const;
|
||||
inline void set_error(bool value);
|
||||
|
||||
// optional string message = 2;
|
||||
inline bool has_message() const;
|
||||
inline void clear_message();
|
||||
static const int kMessageFieldNumber = 2;
|
||||
inline const ::std::string& message() const;
|
||||
inline void set_message(const ::std::string& value);
|
||||
inline void set_message(const char* value);
|
||||
inline void set_message(const char* value, size_t size);
|
||||
inline ::std::string* mutable_message();
|
||||
inline ::std::string* release_message();
|
||||
inline void set_allocated_message(::std::string* message);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:Error)
|
||||
private:
|
||||
inline void set_has_error();
|
||||
inline void clear_has_error();
|
||||
inline void set_has_message();
|
||||
inline void clear_has_message();
|
||||
|
||||
::google::protobuf::UnknownFieldSet _unknown_fields_;
|
||||
|
||||
::std::string* message_;
|
||||
bool error_;
|
||||
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
|
||||
|
||||
friend void protobuf_AddDesc_common_2eproto();
|
||||
friend void protobuf_AssignDesc_common_2eproto();
|
||||
friend void protobuf_ShutdownFile_common_2eproto();
|
||||
|
||||
void InitAsDefaultInstance();
|
||||
static Error* default_instance_;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// Error
|
||||
|
||||
// required bool error = 1;
|
||||
inline bool Error::has_error() const {
|
||||
return (_has_bits_[0] & 0x00000001u) != 0;
|
||||
}
|
||||
inline void Error::set_has_error() {
|
||||
_has_bits_[0] |= 0x00000001u;
|
||||
}
|
||||
inline void Error::clear_has_error() {
|
||||
_has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline void Error::clear_error() {
|
||||
error_ = false;
|
||||
clear_has_error();
|
||||
}
|
||||
inline bool Error::error() const {
|
||||
return error_;
|
||||
}
|
||||
inline void Error::set_error(bool value) {
|
||||
set_has_error();
|
||||
error_ = value;
|
||||
}
|
||||
|
||||
// optional string message = 2;
|
||||
inline bool Error::has_message() const {
|
||||
return (_has_bits_[0] & 0x00000002u) != 0;
|
||||
}
|
||||
inline void Error::set_has_message() {
|
||||
_has_bits_[0] |= 0x00000002u;
|
||||
}
|
||||
inline void Error::clear_has_message() {
|
||||
_has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline void Error::clear_message() {
|
||||
if (message_ != &::google::protobuf::internal::kEmptyString) {
|
||||
message_->clear();
|
||||
}
|
||||
clear_has_message();
|
||||
}
|
||||
inline const ::std::string& Error::message() const {
|
||||
return *message_;
|
||||
}
|
||||
inline void Error::set_message(const ::std::string& value) {
|
||||
set_has_message();
|
||||
if (message_ == &::google::protobuf::internal::kEmptyString) {
|
||||
message_ = new ::std::string;
|
||||
}
|
||||
message_->assign(value);
|
||||
}
|
||||
inline void Error::set_message(const char* value) {
|
||||
set_has_message();
|
||||
if (message_ == &::google::protobuf::internal::kEmptyString) {
|
||||
message_ = new ::std::string;
|
||||
}
|
||||
message_->assign(value);
|
||||
}
|
||||
inline void Error::set_message(const char* value, size_t size) {
|
||||
set_has_message();
|
||||
if (message_ == &::google::protobuf::internal::kEmptyString) {
|
||||
message_ = new ::std::string;
|
||||
}
|
||||
message_->assign(reinterpret_cast<const char*>(value), size);
|
||||
}
|
||||
inline ::std::string* Error::mutable_message() {
|
||||
set_has_message();
|
||||
if (message_ == &::google::protobuf::internal::kEmptyString) {
|
||||
message_ = new ::std::string;
|
||||
}
|
||||
return message_;
|
||||
}
|
||||
inline ::std::string* Error::release_message() {
|
||||
clear_has_message();
|
||||
if (message_ == &::google::protobuf::internal::kEmptyString) {
|
||||
return NULL;
|
||||
} else {
|
||||
::std::string* temp = message_;
|
||||
message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
inline void Error::set_allocated_message(::std::string* message) {
|
||||
if (message_ != &::google::protobuf::internal::kEmptyString) {
|
||||
delete message_;
|
||||
}
|
||||
if (message) {
|
||||
set_has_message();
|
||||
message_ = message;
|
||||
} else {
|
||||
clear_has_message();
|
||||
message_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
#ifndef SWIG
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
|
||||
|
||||
} // namespace google
|
||||
} // namespace protobuf
|
||||
#endif // SWIG
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#endif // PROTOBUF_common_2eproto__INCLUDED
|
||||
Reference in New Issue
Block a user