RpcHandler.h 809 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef NET_RPC_HANDLER_H
  2. #define NET_RPC_HANDLER_H
  3. #include "boost/shared_ptr.hpp"
  4. namespace Egametang {
  5. class google::protobuf::RpcController;
  6. class google::protobuf::Message;
  7. class google::protobuf::Closure;
  8. class RpcHandler
  9. {
  10. private:
  11. google::protobuf::RpcController* controller_;
  12. google::protobuf::Message* response_;
  13. google::protobuf::Closure* done_;
  14. public:
  15. RpcHandler(google::protobuf::RpcController* controller,
  16. google::protobuf::Message* response,
  17. google::protobuf::Closure* done);
  18. google::protobuf::RpcController *GetController() const;
  19. google::protobuf::Closure *GetDone() const;
  20. google::protobuf::Message *GetResponse() const;
  21. };
  22. typedef boost::shared_ptr<RpcHandler> RpcHandlerPtr;
  23. } // namespace Egametang
  24. #endif // NET_RPC_HANDLER_H