Webdar 1.0.0
Web user interface to libdar
html_archive_isolate.hpp
1/*********************************************************************/
2// webdar - a web server and interface program to libdar
3// Copyright (C) 2013-2025 Denis Corbin
4//
5// This file is part of Webdar
6//
7// Webdar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// Webdar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Webdar. If not, see <http://www.gnu.org/licenses/>
19//
20//----
21// to contact the author: dar.linux@free.fr
22/*********************************************************************/
23#ifndef HTML_ARCHIVE_ISOLATE_HPP
24#define HTML_ARCHIVE_ISOLATE_HPP
25
26 // C system header files
27#include "my_config.h"
28extern "C"
29{
30
31}
32
33 // C++ system header files
34#include <libthreadar/libthreadar.hpp>
35
36 // webdar headers
37#include "html_form_input_file.hpp"
38#include "html_options_isolate.hpp"
39#include "body_builder.hpp"
40#include "html_derouleur.hpp"
41#include "actor.hpp"
42#include "html_libdar_running_popup.hpp"
43#include "guichet.hpp"
44
46
47class html_archive_isolate: public body_builder, public libthreadar::thread_signal, public actor
48{
49public:
51 html_archive_isolate(const html_archive_isolate & ref) = delete;
52 html_archive_isolate(html_archive_isolate && ref) noexcept = delete;
53 html_archive_isolate & operator = (const html_archive_isolate & ref) = delete;
54 html_archive_isolate & operator = (html_archive_isolate && ref) noexcept = delete;
55 ~html_archive_isolate() { cancel(); join(); };
56
58 void set_biblio(const std::shared_ptr<bibliotheque> & ptr);
59
60
61 const std::string & get_archive_path() const { return sauv_path.get_value(); };
62 const std::string & get_archive_basename() const;
63 libdar::archive_options_isolate get_options_isolate(std::shared_ptr<html_web_user_interaction> & webui) const { return options->get_options(webui); };
64
66 virtual void on_event(const std::string & event_name) override;
67
68protected:
69
71 virtual std::string inherited_get_body_part(const chemin & path,
72 const request & req) override;
73
75 virtual void new_css_library_available() override;
76
78 virtual void inherited_run() override;
79
81 virtual void signaled_inherited_cancel() override;
82
83
84private:
85 html_derouleur deroule;
86 html_form form;
88 html_form_input_file sauv_path;
89 html_form_input basename;
91
92 guichet guichet_options;
93 std::shared_ptr<html_options_isolate> options;
94
95
97
100 bool need_entrepot_update;
101
102 void update_entrepot();
103};
104
105#endif
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
class body_builder is the root class of object generating HTML body
Definition: body_builder.hpp:99
class chemin definition
Definition: chemin.hpp:51
class guichet let one fetch config from a bibliotheque, save as or setup manually for a given compone...
Definition: guichet.hpp:92
html component used to let the user provide parameters for an isolation operation
Definition: html_archive_isolate.hpp:48
virtual void inherited_run() override
inherited from libthreadar::thread
Definition: html_archive_isolate.cpp:181
virtual std::string inherited_get_body_part(const chemin &path, const request &req) override
inherited from body_builder
Definition: html_archive_isolate.cpp:164
virtual void signaled_inherited_cancel() override
inherited from libthreadar::thread
Definition: html_archive_isolate.cpp:190
virtual void new_css_library_available() override
inherited from body_builder
Definition: html_archive_isolate.cpp:172
html_archive_isolate()
Definition: html_archive_isolate.cpp:43
void set_biblio(const std::shared_ptr< bibliotheque > &ptr)
mandatory call to invoke ASAP after constructor
Definition: html_archive_isolate.cpp:105
virtual void on_event(const std::string &event_name) override
inherited from actor
Definition: html_archive_isolate.cpp:143
class html_derouleur is a pure virtual class
Definition: html_derouleur.hpp:55
class html_form_fieldset implements HTML fieldset feature
Definition: html_form_fieldset.hpp:51
class html_form_input_file provides a mean to the user to navigate in a file system to select a file ...
Definition: html_form_input_file.hpp:60
class html_form_input implements HTML input feature
Definition: html_form_input.hpp:57
class html_form implements HTML form feature
Definition: html_form.hpp:51
html_libdar_running_popup wraps up an html_web_user_interaction in a html_popup component
Definition: html_libdar_running_popup.hpp:48
class holding fields of an HTTP request (method, URI, header, cookies, and so on)
Definition: request.hpp:45