From a7ae434c48c14bfde46a871455a3aa2ac0b81376 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 26 May 2024 13:46:55 +0300 Subject: Add CI cancel handler --- mod/mod-ci.hxx | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'mod/mod-ci.hxx') diff --git a/mod/mod-ci.hxx b/mod/mod-ci.hxx index a83b9d3..bd91e99 100644 --- a/mod/mod-ci.hxx +++ b/mod/mod-ci.hxx @@ -16,6 +16,7 @@ #include #include +#include #if defined(BREP_CI_TENANT_SERVICE_UNLOADED) && !defined(BREP_CI_TENANT_SERVICE) # error BREP_CI_TENANT_SERVICE must be defined if BREP_CI_TENANT_SERVICE_UNLOADED is defined @@ -23,10 +24,6 @@ #ifdef BREP_CI_TENANT_SERVICE # include - -#ifdef BREP_CI_TENANT_SERVICE_UNLOADED -# include -#endif #endif namespace brep @@ -110,6 +107,32 @@ namespace brep tenant_service_map& tenant_service_map_; #endif }; + + class ci_cancel: public database_module, + private ci_start + { + public: + ci_cancel () = default; + + // Create a shallow copy (handling instance) if initialized and a deep + // copy (context exemplar) otherwise. + // + explicit + ci_cancel (const ci_cancel&); + + virtual bool + handle (request&, response&) override; + + virtual const cli::options& + cli_options () const override {return options::ci_cancel::description ();} + + private: + virtual void + init (cli::scanner&) override; + + private: + shared_ptr options_; + }; } #endif // MOD_MOD_CI_HXX -- cgit v1.1