diff options
author | Ed Tanous <ed.tanous@intel.com> | 2018-08-09 00:16:49 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2018-09-19 00:16:25 +0300 |
commit | e3cb5a319a303ab43a32465c68bfcb1374b53657 (patch) | |
tree | 99e817145e78f14eca845e3705f75adb26f82c71 /include/async_resp.hpp | |
parent | 683f7276576dbf0bf7770570190f6b5b4e84d4c9 (diff) | |
download | bmcweb-e3cb5a319a303ab43a32465c68bfcb1374b53657.tar.xz |
Clean up rest-dbus interface
This is the first round of making the rest-dbus interface use the
modern practices, like shared_ptr responses, and no-throw XML parsing.
While it makes the implementation better, it does not fix everything.
Change-Id: I985d45b03f1992e334f8a650f7f9392cc5fff30c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'include/async_resp.hpp')
-rw-r--r-- | include/async_resp.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/async_resp.hpp b/include/async_resp.hpp new file mode 100644 index 0000000000..af4edebc53 --- /dev/null +++ b/include/async_resp.hpp @@ -0,0 +1,25 @@ +#pragma once + +namespace bmcweb +{ + +/** + * AsyncResp + * Gathers data needed for response processing after async calls are done + */ +class AsyncResp +{ + public: + AsyncResp(crow::Response& response) : res(response) + { + } + + ~AsyncResp() + { + res.end(); + } + + crow::Response& res; +}; + +} // namespace bmcweb
\ No newline at end of file |