diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-04-28 22:14:14 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-05-17 19:02:14 +0300 |
commit | 9f5b820aec37ac0a929e074ae2c859229da33b0f (patch) | |
tree | add2dfb2b0de92bed914ec22fee9373e31874c97 /mod/mod-upload.hxx | |
parent | 756d871cc55c56eed160a2cfe6ea5fe7de783bf3 (diff) |
Add support for upload handlers and implement brep-upload-bindist handler
Diffstat (limited to 'mod/mod-upload.hxx')
-rw-r--r-- | mod/mod-upload.hxx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mod/mod-upload.hxx b/mod/mod-upload.hxx new file mode 100644 index 0000000..6cc723b --- /dev/null +++ b/mod/mod-upload.hxx @@ -0,0 +1,41 @@ +// file : mod/mod-upload.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#ifndef MOD_MOD_UPLOAD_HXX +#define MOD_MOD_UPLOAD_HXX + +#include <libbrep/types.hxx> +#include <libbrep/utility.hxx> + +#include <mod/module-options.hxx> +#include <mod/build-result-module.hxx> + +namespace brep +{ + class upload: public build_result_module + { + public: + upload () = default; + + // Create a shallow copy (handling instance) if initialized and a deep + // copy (context exemplar) otherwise. + // + explicit + upload (const upload&); + + virtual bool + handle (request&, response&); + + virtual const cli::options& + cli_options () const {return options::upload::description ();} + + private: + virtual void + init (cli::scanner&); + + private: + shared_ptr<options::upload> options_; + }; +} + +#endif // MOD_MOD_UPLOAD_HXX |