aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/support/status.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc++/support/status.h')
-rw-r--r--include/grpc++/support/status.h41
1 files changed, 2 insertions, 39 deletions
diff --git a/include/grpc++/support/status.h b/include/grpc++/support/status.h
index e59bac92d1..a33fbedf12 100644
--- a/include/grpc++/support/status.h
+++ b/include/grpc++/support/status.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,43 +34,6 @@
#ifndef GRPCXX_SUPPORT_STATUS_H
#define GRPCXX_SUPPORT_STATUS_H
-#include <grpc++/support/config.h>
-#include <grpc++/support/status_code_enum.h>
-
-namespace grpc {
-
-/// Did it work? If it didn't, why?
-///
-/// See \a grpc::StatusCode for details on the available code and their meaning.
-class Status {
- public:
- /// Construct an OK instance.
- Status() : code_(StatusCode::OK) {}
-
- /// Construct an instance with associated \a code and \a details (also
- // referred to as "error_message").
- Status(StatusCode code, const grpc::string& details)
- : code_(code), details_(details) {}
-
- // Pre-defined special status objects.
- /// An OK pre-defined instance.
- static const Status& OK;
- /// A CANCELLED pre-defined instance.
- static const Status& CANCELLED;
-
- /// Return the instance's error code.
- StatusCode error_code() const { return code_; }
- /// Return the instance's error message.
- grpc::string error_message() const { return details_; }
-
- /// Is the status OK?
- bool ok() const { return code_ == StatusCode::OK; }
-
- private:
- StatusCode code_;
- grpc::string details_;
-};
-
-} // namespace grpc
+#include <grpc++/impl/codegen/status.h>
#endif // GRPCXX_SUPPORT_STATUS_H