aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/python_generator.h
diff options
context:
space:
mode:
authorGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2015-03-20 06:48:47 -0700
committerGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2015-03-20 16:24:22 -0700
commit65c803b083a576acbccde803a3fed0ebc21ae83d (patch)
treed684d05f321a4634d2a9fb75a60d4189380963d9 /src/compiler/python_generator.h
parent3bd5fa6c78fb3b0dc389038e765d399e54e740b5 (diff)
Sanitize Python plugin
Diffstat (limited to 'src/compiler/python_generator.h')
-rw-r--r--src/compiler/python_generator.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h
index 67686dbdfe..b47f3c1243 100644
--- a/src/compiler/python_generator.h
+++ b/src/compiler/python_generator.h
@@ -34,41 +34,33 @@
#ifndef GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_H
-#include <string>
#include <utility>
-#include <google/protobuf/compiler/code_generator.h>
-#include <google/protobuf/descriptor.h>
-
-namespace google {
-namespace protobuf {
-class FileDescriptor;
-} // namespace protobuf
-} // namespace google
+#include "src/compiler/config.h"
namespace grpc_python_generator {
// Data pertaining to configuration of the generator with respect to anything
// that may be used internally at Google.
struct GeneratorConfiguration {
- std::string implementations_package_root;
+ grpc::string implementations_package_root;
};
-class PythonGrpcGenerator : public google::protobuf::compiler::CodeGenerator {
+class PythonGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
public:
PythonGrpcGenerator(const GeneratorConfiguration& config);
~PythonGrpcGenerator();
- bool Generate(const google::protobuf::FileDescriptor* file,
- const std::string& parameter,
- google::protobuf::compiler::GeneratorContext* context,
- std::string* error) const;
+ bool Generate(const grpc::protobuf::FileDescriptor* file,
+ const grpc::string& parameter,
+ grpc::protobuf::compiler::GeneratorContext* context,
+ grpc::string* error) const;
private:
GeneratorConfiguration config_;
};
-std::pair<bool, std::string> GetServices(
- const google::protobuf::FileDescriptor* file,
+std::pair<bool, grpc::string> GetServices(
+ const grpc::protobuf::FileDescriptor* file,
const GeneratorConfiguration& config);
} // namespace grpc_python_generator