MethodInfo.h 692 B

1234567891011121314151617181920212223242526
  1. #ifndef RPC_METHODINFO_H
  2. #define RPC_METHODINFO_H
  3. #include <google/protobuf/service.h>
  4. #include <google/protobuf/message.h>
  5. #include "Rpc/Typedef.h"
  6. namespace Egametang {
  7. class MethodInfo
  8. {
  9. private:
  10. ProtobufServicePtr service;
  11. const google::protobuf::MethodDescriptor* methodDescriptor;
  12. public:
  13. MethodInfo(ProtobufServicePtr service, const google::protobuf::MethodDescriptor* methodDescriptor);
  14. ProtobufServicePtr GetService();
  15. const google::protobuf::MethodDescriptor& GetMethodDescriptor() const;
  16. const google::protobuf::Message& GetRequestPrototype() const;
  17. const google::protobuf::Message& GetResponsePrototype() const;
  18. };
  19. } // namespace Egametang
  20. #endif // RPC_METHODINFO_H