aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl/codegen/grpc_library.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc++/impl/codegen/grpc_library.h')
-rw-r--r--include/grpc++/impl/codegen/grpc_library.h47
1 files changed, 6 insertions, 41 deletions
diff --git a/include/grpc++/impl/codegen/grpc_library.h b/include/grpc++/impl/codegen/grpc_library.h
index 6036ad7eaa..33c3e2546c 100644
--- a/include/grpc++/impl/codegen/grpc_library.h
+++ b/include/grpc++/impl/codegen/grpc_library.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2016 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,48 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H
#define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H
-#include <grpc++/impl/codegen/core_codegen_interface.h>
-
-namespace grpc {
-
-class GrpcLibraryInterface {
- public:
- virtual void init() = 0;
- virtual void shutdown() = 0;
-};
-
-/// Initialized by \a grpc::GrpcLibraryInitializer from
-/// <grpc++/impl/grpc_library.h>
-extern GrpcLibraryInterface* g_glip;
-
-/// Classes that require gRPC to be initialized should inherit from this class.
-class GrpcLibraryCodegen {
- public:
- GrpcLibraryCodegen(bool call_grpc_init = true) : grpc_init_called_(false) {
- if (call_grpc_init) {
- GPR_CODEGEN_ASSERT(g_glip &&
- "gRPC library not initialized. See "
- "grpc::internal::GrpcLibraryInitializer.");
- g_glip->init();
- grpc_init_called_ = true;
- }
- }
- virtual ~GrpcLibraryCodegen() {
- if (grpc_init_called_) {
- GPR_CODEGEN_ASSERT(g_glip &&
- "gRPC library not initialized. See "
- "grpc::internal::GrpcLibraryInitializer.");
- g_glip->shutdown();
- }
- }
-
- private:
- bool grpc_init_called_;
-};
-
-} // namespace grpc
+#include <grpcpp/impl/codegen/grpc_library.h>
#endif // GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H