Commit 8b4ec846 authored by zhujiashun's avatar zhujiashun

adapt callback.h after pb3.7 & remove unnecessary files

parent a3cc09cd
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#define BRPC_CALLBACK_H #define BRPC_CALLBACK_H
#include <google/protobuf/stubs/common.h> // Closure #include <google/protobuf/stubs/common.h> // Closure
#if GOOGLE_PROTOBUF_VERSION >= 3007000
// After protobuf 3.7.0, callback.h is removed from common.h, we need to explicitly
// include this file.
#include <google/protobuf/stubs/callback.h>
#endif
namespace brpc { namespace brpc {
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
// Authors: Ge,Jun (gejun@baidu.com) // Authors: Ge,Jun (gejun@baidu.com)
#include <algorithm> #include <algorithm>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h> #include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h> #include <google/protobuf/wire_format.h>
#include "butil/string_printf.h" #include "butil/string_printf.h"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#define BRPC_MEMCACHE_H #define BRPC_MEMCACHE_H
#include <string> #include <string>
#include "google/protobuf/message.h" #include <google/protobuf/message.h>
#include "butil/iobuf.h" #include "butil/iobuf.h"
#include "butil/strings/string_piece.h" #include "butil/strings/string_piece.h"
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#ifndef BRPC_NSHEAD_MESSAGE_H #ifndef BRPC_NSHEAD_MESSAGE_H
#define BRPC_NSHEAD_MESSAGE_H #define BRPC_NSHEAD_MESSAGE_H
#include <string>
#include <google/protobuf/message.h> #include <google/protobuf/message.h>
#include "brpc/nshead.h" // nshead_t #include "brpc/nshead.h" // nshead_t
#include "butil/iobuf.h" // IOBuf #include "butil/iobuf.h" // IOBuf
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef BRPC_PROGRESSIVE_ATTACHMENT_H #ifndef BRPC_PROGRESSIVE_ATTACHMENT_H
#define BRPC_PROGRESSIVE_ATTACHMENT_H #define BRPC_PROGRESSIVE_ATTACHMENT_H
#include <google/protobuf/stubs/callback.h> #include "brpc/callback.h"
#include "butil/atomicops.h" #include "butil/atomicops.h"
#include "butil/iobuf.h" #include "butil/iobuf.h"
#include "butil/endpoint.h" // butil::EndPoint #include "butil/endpoint.h" // butil::EndPoint
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "brpc/socket_id.h" // SocketUniquePtr #include "brpc/socket_id.h" // SocketUniquePtr
#include "brpc/shared_object.h" // SharedObject #include "brpc/shared_object.h" // SharedObject
namespace brpc { namespace brpc {
class ProgressiveAttachment : public SharedObject { class ProgressiveAttachment : public SharedObject {
......
syntax="proto2"; syntax="proto2";
import "google/protobuf/descriptor.proto";
package brpc; package brpc;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <google/protobuf/reflection_ops.h> // ReflectionOps::Merge #include <google/protobuf/reflection_ops.h> // ReflectionOps::Merge
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <butil/status.h> #include "butil/status.h"
#include "brpc/redis.h" #include "brpc/redis.h"
#include "brpc/redis_command.h" #include "brpc/redis_command.h"
......
...@@ -17,10 +17,7 @@ ...@@ -17,10 +17,7 @@
#ifndef BRPC_REDIS_H #ifndef BRPC_REDIS_H
#define BRPC_REDIS_H #define BRPC_REDIS_H
#include <string>
#include <google/protobuf/message.h> #include <google/protobuf/message.h>
#include "butil/iobuf.h" #include "butil/iobuf.h"
#include "butil/strings/string_piece.h" #include "butil/strings/string_piece.h"
#include "butil/arena.h" #include "butil/arena.h"
...@@ -193,7 +190,9 @@ public: ...@@ -193,7 +190,9 @@ public:
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const RedisResponse& default_instance(); static const RedisResponse& default_instance();
::google::protobuf::Metadata GetMetadata() const;
protected:
::google::protobuf::Metadata GetMetadata() const override;
private: private:
void SharedCtor(); void SharedCtor();
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#ifndef BRPC_THRIFT_MESSAGE_H #ifndef BRPC_THRIFT_MESSAGE_H
#define BRPC_THRIFT_MESSAGE_H #define BRPC_THRIFT_MESSAGE_H
#include <functional>
#include <string>
#include <google/protobuf/message.h> #include <google/protobuf/message.h>
#include "butil/iobuf.h" #include "butil/iobuf.h"
#include "butil/class_name.h" #include "butil/class_name.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment